[Biojava-dev] GenbankReader info

Paolo Pavan paolo.pavan at gmail.com
Tue Sep 23 22:12:16 UTC 2014


Dear Andreas,
Thank you for your answer. The file I'm trying to load has been downloaded
from the link below:
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000009065.1_ASM906v1/GCA_000009065.1_ASM906v1_genomic.gbff.gz

I'm trying to access information stored in CDS tags. The code I'm using to
parse is:

        org.biojava3.core.sequence.compound.DNACompoundSet compoundSet
                = new AmbiguityDNACompoundSet();
        org.biojava3.core.sequence.io.template.SequenceParserInterface
parser
                = new GenbankSequenceParser();

        for (String fn : fileNames) {
            File f = new File(fn);
            GenbankReader gbProxyReader
                    = new GenbankReader(
                            f,
                            new GenericGenbankHeaderParser(),
                            new FileProxyDNASequenceCreator(
                                    f,
                                    compoundSet,
                                    parser
                            )
                    );
            LinkedHashMap<String, ChromosomeSequence> ss =
gbProxyReader.process();

            for (DNASequence s : ss.values()) {
                List<FeatureInterface<AbstractSequence<NucleotideCompound>,
NucleotideCompound>> features = s.getFeatures();

                System.out.println(features.size());
    }

I have had a look at the code and maybe it could be that I'm missing
something. For instance, am I using the right DNASequenceCreator /
FileProxyDNASequenceCreator?

Thank you,
Paolo



2014-09-22 18:28 GMT+02:00 Andreas Prlic <andreas at sdsc.edu>:

> Hi,
>
> apologies for the slow response.  Can you point us to the file that you
> can't parse so we can take a look?
>
> Andreas
>
>
>
> On Mon, Sep 15, 2014 at 11:20 AM, Paolo Pavan <paolo.pavan at gmail.com>
> wrote:
>
>> Dear all,
>> I'm having trouble in parsing a genbank flat file file using
>> GenbankReader. While the sequence and some global information are loaded
>> correctly, I cannot load annotations (i.e. those in sectionKey=="FEATURES")
>> and s.getFeatures().size() == 0 .
>> Am I missing something? Before posting the code, is the GenbankReader in
>> biojava3.1.0 a still in progress parser?
>>
>> Thank you,
>> Paolo
>>
>> _______________________________________________
>> biojava-dev mailing list
>> biojava-dev at mailman.open-bio.org
>> http://mailman.open-bio.org/mailman/listinfo/biojava-dev
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biojava-dev/attachments/20140924/7fc7fc29/attachment.html>


More information about the biojava-dev mailing list