'Reading and writing genbank flat format file
You have to prepare a parser for a given text file with the following instructions:
Download the attachment SequenceParse.zip.
The given assignment has one Sequence.txt file with three parts: Header, Feature, and Sequence. The class Sequence has a relationship with the Header and Feature class. Sequence and Header have one to one relationship and Sequence and Feature has one to many relationship. Create a List of Feature class and an object of Header class in Sequence class.
There is an interface for Sequence Parsing (ISequenceParser) and a custom exception InvalidFileFormatException.
Create a main class SequenceParser that implements the interface ISequenceParser and its methods which can be like parseSequence, setFile and getSequence. The method parseSequence throws the InvalidFileFormatException
You have to parse the file Sequence.txt which is kept under the input folder and set the Sequence object as per its fields and save this object into a file using the serialization.
After writing the object file, read it again and display the Header, Features and Sequence on the console.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
