[Biojava-dev] GenbankReader info
Paolo Pavan
paolo.pavan at gmail.com
Wed Sep 24 17:59:18 UTC 2014
Dear Andreas,
I have gone deep in it. I had a look inside the code and I've modified it
to accomplish the task. If you find it appropriate I can contribute with it.
Cheers,
Paolo
2014-09-24 0:12 GMT+02:00 Paolo Pavan <paolo.pavan at gmail.com>:
> 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/a481f2f6/attachment.html>
More information about the biojava-dev
mailing list