From amr_alhossary at hotmail.com Tue Nov 6 06:11:45 2012 From: amr_alhossary at hotmail.com (Amr AL-HOSSARY) Date: Tue, 6 Nov 2012 19:11:45 +0800 Subject: [Biojava-l] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT Message-ID: Dear all, I added stockholm parser beta to the package "org.biojava3.alignment.io" of "biojava3-alignment" project.It should be ready on on the latest Biojava snapshot build after 20 mins. As stockholm format structure is not well defined (at least in contrast to PDB), Not all of the features are well implemented yet.Please test it against different files you have, and feed me back; so that I start with the most important/most used features first. Thanks to Marko Vas for his code base. I built on his code and that saved a lot of unnecessary time. Best Regards, Amr AL-HOSSARY Amr Ali AL-HOSSARY | Ph.D. Student | International PhD program in Computational Biology and Bioinformatics | School of Computer Engineering | Nanyang Technological University | Singapore | Email: amra0001 at e.ntu.edu.sg | From andreas at sdsc.edu Tue Nov 6 11:58:37 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Tue, 6 Nov 2012 08:58:37 -0800 Subject: [Biojava-l] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT In-Reply-To: References: Message-ID: Hi Amr, This is great! Did you try to load a couple of different files from the Pfam web site? That should be good for testing... Andreas On Tue, Nov 6, 2012 at 3:11 AM, Amr AL-HOSSARY wrote: > Dear all, > I added stockholm parser beta to the package "org.biojava3.alignment.io" > of "biojava3-alignment" project.It should be ready on on the latest Biojava > snapshot build after 20 mins. > As stockholm format structure is not well defined (at least in contrast to > PDB), Not all of the features are well implemented yet.Please test it > against different files you have, and feed me back; so that I start with > the most important/most used features first. > Thanks to Marko Vas for his code base. I built on his code and that saved > a lot of unnecessary time. > > > Best Regards, > > > Amr AL-HOSSARY > > > > > > > > > > Amr Ali AL-HOSSARY | > Ph.D. Student | > International PhD program in Computational Biology and Bioinformatics | > School of Computer Engineering | > Nanyang Technological University | > Singapore | > Email: amra0001 at e.ntu.edu.sg > | > > > > > > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > > -- ----------------------------------------------------------------------- Dr. Andreas Prlic Senior Scientist, RCSB PDB Protein Data Bank University of California, San Diego (+1) 858.246.0526 ----------------------------------------------------------------------- From amr_alhossary at hotmail.com Wed Nov 7 01:54:47 2012 From: amr_alhossary at hotmail.com (Amr AL-HOSSARY) Date: Wed, 7 Nov 2012 14:54:47 +0800 Subject: [Biojava-l] [Biojava-dev] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT In-Reply-To: References: , Message-ID: Yes.I have a cache of Pfam23 database. I tried it on the first 10 alignments in the database on 2 successive calls to parse(pathName, 5) and parseNext(5), and it worked well. RegardsAmr > Date: Tue, 6 Nov 2012 08:58:37 -0800 > From: andreas at sdsc.edu > To: amr_alhossary at hotmail.com > CC: biojava-dev at lists.open-bio.org; biojava-l at lists.open-bio.org > Subject: Re: [Biojava-dev] [Biojava-l] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT > > Hi Amr, > > This is great! Did you try to load a couple of different files from the > Pfam web site? That should be good for testing... > > Andreas > > > On Tue, Nov 6, 2012 at 3:11 AM, Amr AL-HOSSARY wrote: > > > Dear all, > > I added stockholm parser beta to the package "org.biojava3.alignment.io" > > of "biojava3-alignment" project.It should be ready on on the latest Biojava > > snapshot build after 20 mins. > > As stockholm format structure is not well defined (at least in contrast to > > PDB), Not all of the features are well implemented yet.Please test it > > against different files you have, and feed me back; so that I start with > > the most important/most used features first. > > Thanks to Marko Vas for his code base. I built on his code and that saved > > a lot of unnecessary time. > > > > > > Best Regards, > > > > > > Amr AL-HOSSARY > > > > > > > > > > > > > > > > > > > > Amr Ali AL-HOSSARY | > > Ph.D. Student | > > International PhD program in Computational Biology and Bioinformatics | > > School of Computer Engineering | > > Nanyang Technological University | > > Singapore | > > Email: amra0001 at e.ntu.edu.sg > > | > > > > > > > > > > > > _______________________________________________ > > Biojava-l mailing list - Biojava-l at lists.open-bio.org > > http://lists.open-bio.org/mailman/listinfo/biojava-l > > > > > > > -- > ----------------------------------------------------------------------- > Dr. Andreas Prlic > Senior Scientist, RCSB PDB Protein Data Bank > University of California, San Diego > (+1) 858.246.0526 > ----------------------------------------------------------------------- > _______________________________________________ > biojava-dev mailing list > biojava-dev at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-dev From power3d at gmail.com Thu Nov 15 09:15:53 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:15:53 +0000 Subject: [Biojava-l] access to qualities Message-ID: Hi, I am trying to access to the qualities created with the example: FastqReader fastqReader = new SangerFastqReader(); List sequences = new LinkedList(); for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} From power3d at gmail.com Thu Nov 15 09:15:53 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:15:53 +0000 Subject: [Biojava-l] access to qualities Message-ID: Hi, I am trying to access to the qualities created with the example: FastqReader fastqReader = new SangerFastqReader(); List sequences = new LinkedList(); for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} From power3d at gmail.com Thu Nov 15 09:23:41 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:23:41 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Sorry, the message went before I finish it. How can I access the qualities of each sequence? I am trying like this: List, NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); for (int i = 0; i < features.size(); i++){ System.out.println(": " + features.get(i).toString()); } How can I access the qualities? Thanks for your help, Tony On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: > Hi, > > I am trying to access to the qualities created with the example: > > FastqReader fastqReader = new SangerFastqReader(); > List sequences = new LinkedList(); > for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > > From power3d at gmail.com Thu Nov 15 09:23:41 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:23:41 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Sorry, the message went before I finish it. How can I access the qualities of each sequence? I am trying like this: List, NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); for (int i = 0; i < features.size(); i++){ System.out.println(": " + features.get(i).toString()); } How can I access the qualities? Thanks for your help, Tony On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: > Hi, > > I am trying to access to the qualities created with the example: > > FastqReader fastqReader = new SangerFastqReader(); > List sequences = new LinkedList(); > for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > > From power3d at gmail.com Thu Nov 15 10:03:59 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 15:03:59 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Thanks for the feedback. So, from the example I provided, how would you print the quality features? On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis wrote: > Tony > > The features get added as a named string to support any number of feature > types. If you look in the FastqTools code should be able to find the > string that is used to denote the quality score and then use the > corresponding get method to return the value. > > Scooter > > On 11/15/12 9:23 AM, "Tony Power" wrote: > > >Sorry, the message went before I finish it. > > > >How can I access the qualities of each sequence? > > > >I am trying like this: > >List, > >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); > >for (int i = 0; i < features.size(); i++){ > > System.out.println(": " + features.get(i).toString()); > >} > > > >How can I access the qualities? > > > >Thanks for your help, > >Tony > > > > > >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: > > > >> Hi, > >> > >> I am trying to access to the qualities created with the example: > >> > >> FastqReader fastqReader = new SangerFastqReader(); > >> List sequences = new LinkedList(); > >> for (Fastq fastq : fastqReader.read(new File > >>< > http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I > >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ > >> sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > >> > >> > >_______________________________________________ > >Biojava-l mailing list - Biojava-l at lists.open-bio.org > >http://lists.open-bio.org/mailman/listinfo/biojava-l > > From heuermh at gmail.com Thu Nov 15 11:34:44 2012 From: heuermh at gmail.com (Michael Heuer) Date: Thu, 15 Nov 2012 10:34:44 -0600 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Hello Tony, The javadoc here http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 says "The quality scores are stored in a QualityFeature with a type "qualityScores" the same length as the sequence." QualityFeature has several different methods to access the quality scores, List getQualities, Number getQualitiesAt(int index), etc. http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html Alternatively, it may be more efficient to not create DNASequence objects, something like FastqReader fastqReader = new SangerFastqReader(); InputSupplier inputSupplier = Files.newReaderSupplier(new File("sanger.fastq")); fastqReader.stream(inputSupplier, new StreamListener() { @Override public void fastq(final Fastq fastq) { int size = fastq.getSequence().length(); double[] qualityScores = FastqTools.qualityScores(fastq, new double[size]); .... } }); michael On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: > Thanks for the feedback. > So, from the example I provided, how would you print the quality features? > > > On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis wrote: > >> Tony >> >> The features get added as a named string to support any number of feature >> types. If you look in the FastqTools code should be able to find the >> string that is used to denote the quality score and then use the >> corresponding get method to return the value. >> >> Scooter >> >> On 11/15/12 9:23 AM, "Tony Power" wrote: >> >> >Sorry, the message went before I finish it. >> > >> >How can I access the qualities of each sequence? >> > >> >I am trying like this: >> >List, >> >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); >> >for (int i = 0; i < features.size(); i++){ >> > System.out.println(": " + features.get(i).toString()); >> >} >> > >> >How can I access the qualities? >> > >> >Thanks for your help, >> >Tony >> > >> > >> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: >> > >> >> Hi, >> >> >> >> I am trying to access to the qualities created with the example: >> >> >> >> FastqReader fastqReader = new SangerFastqReader(); >> >> List sequences = new LinkedList(); >> >> for (Fastq fastq : fastqReader.read(new File >> >>< >> http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I >> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ >> >> sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} >> >> >> >> >> >_______________________________________________ >> >Biojava-l mailing list - Biojava-l at lists.open-bio.org >> >http://lists.open-bio.org/mailman/listinfo/biojava-l >> >> > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l From heuermh at gmail.com Thu Nov 15 11:37:57 2012 From: heuermh at gmail.com (Michael Heuer) Date: Thu, 15 Nov 2012 10:37:57 -0600 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Hello Tony, This unit test shows how to access the qualities in a QualityFeature public void testCreateDNASequenceWithQualityScores() { DNASequence sequence = FastqTools.createDNASequenceWithQualityScores(builder.build()); assertNotNull(sequence); List features = sequence.getFeaturesByType("qualityScores"); assertNotNull(features); assertEquals(1, features.size()); QualityFeature qualityScores = (QualityFeature) features.get(0); assertEquals(sequence.getLength(), qualityScores.getQualities().size()); assertEquals(sequence.getLength(), qualityScores.getLocations().getLength()); } http://code.open-bio.org/biojava-live/trunk/biojava3-sequencing/src/test/java/org/biojava3/sequencing/io/fastq/FastqToolsTest.java?revision=9583&root=biojava&view=markup michael On Thu, Nov 15, 2012 at 10:34 AM, Michael Heuer wrote: > Hello Tony, > > The javadoc here > > http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 > > says "The quality scores are stored in a QualityFeature with a type > "qualityScores" the same length as the sequence." > > QualityFeature has several different methods to access the quality > scores, List getQualities, Number getQualitiesAt(int index), > etc. > > http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html > > > Alternatively, it may be more efficient to not create DNASequence > objects, something like > > FastqReader fastqReader = new SangerFastqReader(); > InputSupplier inputSupplier = Files.newReaderSupplier(new File("sanger.fastq")); > > fastqReader.stream(inputSupplier, new StreamListener() > { > @Override > public void fastq(final Fastq fastq) > { > int size = fastq.getSequence().length(); > double[] qualityScores = FastqTools.qualityScores(fastq, new > double[size]); > .... > } > }); > > michael > > > On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: >> Thanks for the feedback. >> So, from the example I provided, how would you print the quality features? >> >> >> On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis wrote: >> >>> Tony >>> >>> The features get added as a named string to support any number of feature >>> types. If you look in the FastqTools code should be able to find the >>> string that is used to denote the quality score and then use the >>> corresponding get method to return the value. >>> >>> Scooter >>> >>> On 11/15/12 9:23 AM, "Tony Power" wrote: >>> >>> >Sorry, the message went before I finish it. >>> > >>> >How can I access the qualities of each sequence? >>> > >>> >I am trying like this: >>> >List, >>> >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); >>> >for (int i = 0; i < features.size(); i++){ >>> > System.out.println(": " + features.get(i).toString()); >>> >} >>> > >>> >How can I access the qualities? >>> > >>> >Thanks for your help, >>> >Tony >>> > >>> > >>> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: >>> > >>> >> Hi, >>> >> >>> >> I am trying to access to the qualities created with the example: >>> >> >>> >> FastqReader fastqReader = new SangerFastqReader(); >>> >> List sequences = new LinkedList(); >>> >> for (Fastq fastq : fastqReader.read(new File >>> >>< >>> http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I >>> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ >>> >> sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} >>> >> >>> >> >>> >_______________________________________________ >>> >Biojava-l mailing list - Biojava-l at lists.open-bio.org >>> >http://lists.open-bio.org/mailman/listinfo/biojava-l >>> >>> >> _______________________________________________ >> Biojava-l mailing list - Biojava-l at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/biojava-l From power3d at gmail.com Fri Nov 16 05:03:40 2012 From: power3d at gmail.com (Tony Power) Date: Fri, 16 Nov 2012 10:03:40 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: This is what I really needed as suggested by Michael: List features = sequence.getFeaturesByType("qualityScores"); Instead what I was doing: List, NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); Thanks you all guys for your feedback, Tony On Thu, Nov 15, 2012 at 4:37 PM, Michael Heuer wrote: > Hello Tony, > > This unit test shows how to access the qualities in a QualityFeature > > public void testCreateDNASequenceWithQualityScores() > { > DNASequence sequence = > FastqTools.createDNASequenceWithQualityScores(builder.build()); > assertNotNull(sequence); > > List features = sequence.getFeaturesByType("qualityScores"); > assertNotNull(features); > assertEquals(1, features.size()); > QualityFeature qualityScores = (QualityFeature) features.get(0); > assertEquals(sequence.getLength(), > qualityScores.getQualities().size()); > assertEquals(sequence.getLength(), > qualityScores.getLocations().getLength()); > } > > > http://code.open-bio.org/biojava-live/trunk/biojava3-sequencing/src/test/java/org/biojava3/sequencing/io/fastq/FastqToolsTest.java?revision=9583&root=biojava&view=markup > > michael > > > On Thu, Nov 15, 2012 at 10:34 AM, Michael Heuer wrote: > > Hello Tony, > > > > The javadoc here > > > > > http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 > > > > says "The quality scores are stored in a QualityFeature with a type > > "qualityScores" the same length as the sequence." > > > > QualityFeature has several different methods to access the quality > > scores, List getQualities, Number getQualitiesAt(int index), > > etc. > > > > > http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html > > > > > > Alternatively, it may be more efficient to not create DNASequence > > objects, something like > > > > FastqReader fastqReader = new SangerFastqReader(); > > InputSupplier inputSupplier = Files.newReaderSupplier(new > File("sanger.fastq")); > > > > fastqReader.stream(inputSupplier, new StreamListener() > > { > > @Override > > public void fastq(final Fastq fastq) > > { > > int size = fastq.getSequence().length(); > > double[] qualityScores = FastqTools.qualityScores(fastq, new > > double[size]); > > .... > > } > > }); > > > > michael > > > > > > On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: > >> Thanks for the feedback. > >> So, from the example I provided, how would you print the quality > features? > >> > >> > >> On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis > wrote: > >> > >>> Tony > >>> > >>> The features get added as a named string to support any number of > feature > >>> types. If you look in the FastqTools code should be able to find the > >>> string that is used to denote the quality score and then use the > >>> corresponding get method to return the value. > >>> > >>> Scooter > >>> > >>> On 11/15/12 9:23 AM, "Tony Power" wrote: > >>> > >>> >Sorry, the message went before I finish it. > >>> > > >>> >How can I access the qualities of each sequence? > >>> > > >>> >I am trying like this: > >>> >List, > >>> >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); > >>> >for (int i = 0; i < features.size(); i++){ > >>> > System.out.println(": " + features.get(i).toString()); > >>> >} > >>> > > >>> >How can I access the qualities? > >>> > > >>> >Thanks for your help, > >>> >Tony > >>> > > >>> > > >>> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power > wrote: > >>> > > >>> >> Hi, > >>> >> > >>> >> I am trying to access to the qualities created with the example: > >>> >> > >>> >> FastqReader fastqReader = new SangerFastqReader(); > >>> >> List sequences = new LinkedList(); > >>> >> for (Fastq fastq : fastqReader.read(new File > >>> >>< > >>> > http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I > >>> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ > >>> >> > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > >>> >> > >>> >> > >>> >_______________________________________________ > >>> >Biojava-l mailing list - Biojava-l at lists.open-bio.org > >>> >http://lists.open-bio.org/mailman/listinfo/biojava-l > >>> > >>> > >> _______________________________________________ > >> Biojava-l mailing list - Biojava-l at lists.open-bio.org > >> http://lists.open-bio.org/mailman/listinfo/biojava-l > From andreas at sdsc.edu Fri Nov 16 10:55:07 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Fri, 16 Nov 2012 07:55:07 -0800 Subject: [Biojava-l] [Biojava-dev] access to qualities In-Reply-To: References: Message-ID: Perhaps might be good to also add this as a cookbook recipe on the wiki? Andreas On Fri, Nov 16, 2012 at 2:03 AM, Tony Power wrote: > This is what I really needed as suggested by Michael: > List features = sequence.getFeaturesByType("qualityScores"); > > Instead what I was doing: > List, > NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); > > Thanks you all guys for your feedback, > Tony > > > On Thu, Nov 15, 2012 at 4:37 PM, Michael Heuer wrote: > > > Hello Tony, > > > > This unit test shows how to access the qualities in a QualityFeature > > > > public void testCreateDNASequenceWithQualityScores() > > { > > DNASequence sequence = > > FastqTools.createDNASequenceWithQualityScores(builder.build()); > > assertNotNull(sequence); > > > > List features = sequence.getFeaturesByType("qualityScores"); > > assertNotNull(features); > > assertEquals(1, features.size()); > > QualityFeature qualityScores = (QualityFeature) features.get(0); > > assertEquals(sequence.getLength(), > > qualityScores.getQualities().size()); > > assertEquals(sequence.getLength(), > > qualityScores.getLocations().getLength()); > > } > > > > > > > http://code.open-bio.org/biojava-live/trunk/biojava3-sequencing/src/test/java/org/biojava3/sequencing/io/fastq/FastqToolsTest.java?revision=9583&root=biojava&view=markup > > > > michael > > > > > > On Thu, Nov 15, 2012 at 10:34 AM, Michael Heuer > wrote: > > > Hello Tony, > > > > > > The javadoc here > > > > > > > > > http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 > > > > > > says "The quality scores are stored in a QualityFeature with a type > > > "qualityScores" the same length as the sequence." > > > > > > QualityFeature has several different methods to access the quality > > > scores, List getQualities, Number getQualitiesAt(int index), > > > etc. > > > > > > > > > http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html > > > > > > > > > Alternatively, it may be more efficient to not create DNASequence > > > objects, something like > > > > > > FastqReader fastqReader = new SangerFastqReader(); > > > InputSupplier inputSupplier = Files.newReaderSupplier(new > > File("sanger.fastq")); > > > > > > fastqReader.stream(inputSupplier, new StreamListener() > > > { > > > @Override > > > public void fastq(final Fastq fastq) > > > { > > > int size = fastq.getSequence().length(); > > > double[] qualityScores = FastqTools.qualityScores(fastq, new > > > double[size]); > > > .... > > > } > > > }); > > > > > > michael > > > > > > > > > On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: > > >> Thanks for the feedback. > > >> So, from the example I provided, how would you print the quality > > features? > > >> > > >> > > >> On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis > > wrote: > > >> > > >>> Tony > > >>> > > >>> The features get added as a named string to support any number of > > feature > > >>> types. If you look in the FastqTools code should be able to find the > > >>> string that is used to denote the quality score and then use the > > >>> corresponding get method to return the value. > > >>> > > >>> Scooter > > >>> > > >>> On 11/15/12 9:23 AM, "Tony Power" wrote: > > >>> > > >>> >Sorry, the message went before I finish it. > > >>> > > > >>> >How can I access the qualities of each sequence? > > >>> > > > >>> >I am trying like this: > > >>> >List, > > >>> >NucleotideCompound>> features = > s.getFeaturesByType("qualityScores"); > > >>> >for (int i = 0; i < features.size(); i++){ > > >>> > System.out.println(": " + > features.get(i).toString()); > > >>> >} > > >>> > > > >>> >How can I access the qualities? > > >>> > > > >>> >Thanks for your help, > > >>> >Tony > > >>> > > > >>> > > > >>> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power > > wrote: > > >>> > > > >>> >> Hi, > > >>> >> > > >>> >> I am trying to access to the qualities created with the example: > > >>> >> > > >>> >> FastqReader fastqReader = new SangerFastqReader(); > > >>> >> List sequences = new LinkedList(); > > >>> >> for (Fastq fastq : fastqReader.read(new File > > >>> >>< > > >>> > > http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I > > >>> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ > > >>> >> > > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > > >>> >> > > >>> >> > > >>> >_______________________________________________ > > >>> >Biojava-l mailing list - Biojava-l at lists.open-bio.org > > >>> >http://lists.open-bio.org/mailman/listinfo/biojava-l > > >>> > > >>> > > >> _______________________________________________ > > >> Biojava-l mailing list - Biojava-l at lists.open-bio.org > > >> http://lists.open-bio.org/mailman/listinfo/biojava-l > > > _______________________________________________ > biojava-dev mailing list > biojava-dev at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-dev > -- ----------------------------------------------------------------------- Dr. Andreas Prlic Senior Scientist, RCSB PDB Protein Data Bank University of California, San Diego (+1) 858.246.0526 ----------------------------------------------------------------------- From andreas at sdsc.edu Sat Nov 17 14:21:56 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Sat, 17 Nov 2012 11:21:56 -0800 Subject: [Biojava-l] biojava 3.0.5 release plan Message-ID: Hi, I am planning to release biojava 3.0.5 on Nov. 30th. Please commit all outstanding code for this release by Nov. 29th. For the github conversion I am targeting the first weeks of January. The major todo item for that until then is to setup the mapping of usernames in our current SVN to the corresponding github accounts, in order to preserve the contributions of the various developers. Andreas From andreas at sdsc.edu Mon Nov 19 20:39:09 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Mon, 19 Nov 2012 17:39:09 -0800 Subject: [Biojava-l] new feature - CATH parser Message-ID: Hi, Thanks to Daniel Asarnow for the latest contribution to BioJava: a parser and API for the protein structure classification CATH. - you can access various levels of information from the CATH classification. - it automatically downloads and installs CATH locally - you can request coordinates for CATH domains using the AtomCache / the new org.biojava3.structure.StructureIO utility classes. Andreas From andreas at sdsc.edu Fri Nov 30 19:57:55 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Fri, 30 Nov 2012 16:57:55 -0800 Subject: [Biojava-l] biojava 3.0.5 released Message-ID: BioJava 3.0.5 has been released and is available from http://www.biojava.org/wiki/BioJava:Download as well as from the BioJava maven repository at http://www.biojava.org/download/maven/ . New Features: - New parser for CATH classification - New parser for Stockholm file format - Significantly improved representation of biological assemblies of protein structures. Now can re-create biological assembly from asymmetric unit - Several bug fixes Thanks to Daniel Asarnow for contributing the CATH parser and Amr Al Hossary and Marco Vaz for their contributions to the Stockholm parser. Happy BioJava-ing, Andreas From amr_alhossary at hotmail.com Tue Nov 6 11:11:45 2012 From: amr_alhossary at hotmail.com (Amr AL-HOSSARY) Date: Tue, 6 Nov 2012 19:11:45 +0800 Subject: [Biojava-l] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT Message-ID: Dear all, I added stockholm parser beta to the package "org.biojava3.alignment.io" of "biojava3-alignment" project.It should be ready on on the latest Biojava snapshot build after 20 mins. As stockholm format structure is not well defined (at least in contrast to PDB), Not all of the features are well implemented yet.Please test it against different files you have, and feed me back; so that I start with the most important/most used features first. Thanks to Marko Vas for his code base. I built on his code and that saved a lot of unnecessary time. Best Regards, Amr AL-HOSSARY Amr Ali AL-HOSSARY | Ph.D. Student | International PhD program in Computational Biology and Bioinformatics | School of Computer Engineering | Nanyang Technological University | Singapore | Email: amra0001 at e.ntu.edu.sg | From andreas at sdsc.edu Tue Nov 6 16:58:37 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Tue, 6 Nov 2012 08:58:37 -0800 Subject: [Biojava-l] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT In-Reply-To: References: Message-ID: Hi Amr, This is great! Did you try to load a couple of different files from the Pfam web site? That should be good for testing... Andreas On Tue, Nov 6, 2012 at 3:11 AM, Amr AL-HOSSARY wrote: > Dear all, > I added stockholm parser beta to the package "org.biojava3.alignment.io" > of "biojava3-alignment" project.It should be ready on on the latest Biojava > snapshot build after 20 mins. > As stockholm format structure is not well defined (at least in contrast to > PDB), Not all of the features are well implemented yet.Please test it > against different files you have, and feed me back; so that I start with > the most important/most used features first. > Thanks to Marko Vas for his code base. I built on his code and that saved > a lot of unnecessary time. > > > Best Regards, > > > Amr AL-HOSSARY > > > > > > > > > > Amr Ali AL-HOSSARY | > Ph.D. Student | > International PhD program in Computational Biology and Bioinformatics | > School of Computer Engineering | > Nanyang Technological University | > Singapore | > Email: amra0001 at e.ntu.edu.sg > | > > > > > > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > > -- ----------------------------------------------------------------------- Dr. Andreas Prlic Senior Scientist, RCSB PDB Protein Data Bank University of California, San Diego (+1) 858.246.0526 ----------------------------------------------------------------------- From amr_alhossary at hotmail.com Wed Nov 7 06:54:47 2012 From: amr_alhossary at hotmail.com (Amr AL-HOSSARY) Date: Wed, 7 Nov 2012 14:54:47 +0800 Subject: [Biojava-l] [Biojava-dev] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT In-Reply-To: References: , Message-ID: Yes.I have a cache of Pfam23 database. I tried it on the first 10 alignments in the database on 2 successive calls to parse(pathName, 5) and parseNext(5), and it worked well. RegardsAmr > Date: Tue, 6 Nov 2012 08:58:37 -0800 > From: andreas at sdsc.edu > To: amr_alhossary at hotmail.com > CC: biojava-dev at lists.open-bio.org; biojava-l at lists.open-bio.org > Subject: Re: [Biojava-dev] [Biojava-l] Stockholm Parser is on Biojava 3.0.5 SNAPSHOT > > Hi Amr, > > This is great! Did you try to load a couple of different files from the > Pfam web site? That should be good for testing... > > Andreas > > > On Tue, Nov 6, 2012 at 3:11 AM, Amr AL-HOSSARY wrote: > > > Dear all, > > I added stockholm parser beta to the package "org.biojava3.alignment.io" > > of "biojava3-alignment" project.It should be ready on on the latest Biojava > > snapshot build after 20 mins. > > As stockholm format structure is not well defined (at least in contrast to > > PDB), Not all of the features are well implemented yet.Please test it > > against different files you have, and feed me back; so that I start with > > the most important/most used features first. > > Thanks to Marko Vas for his code base. I built on his code and that saved > > a lot of unnecessary time. > > > > > > Best Regards, > > > > > > Amr AL-HOSSARY > > > > > > > > > > > > > > > > > > > > Amr Ali AL-HOSSARY | > > Ph.D. Student | > > International PhD program in Computational Biology and Bioinformatics | > > School of Computer Engineering | > > Nanyang Technological University | > > Singapore | > > Email: amra0001 at e.ntu.edu.sg > > | > > > > > > > > > > > > _______________________________________________ > > Biojava-l mailing list - Biojava-l at lists.open-bio.org > > http://lists.open-bio.org/mailman/listinfo/biojava-l > > > > > > > -- > ----------------------------------------------------------------------- > Dr. Andreas Prlic > Senior Scientist, RCSB PDB Protein Data Bank > University of California, San Diego > (+1) 858.246.0526 > ----------------------------------------------------------------------- > _______________________________________________ > biojava-dev mailing list > biojava-dev at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-dev From power3d at gmail.com Thu Nov 15 14:15:53 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:15:53 +0000 Subject: [Biojava-l] access to qualities Message-ID: Hi, I am trying to access to the qualities created with the example: FastqReader fastqReader = new SangerFastqReader(); List sequences = new LinkedList(); for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} From power3d at gmail.com Thu Nov 15 14:15:53 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:15:53 +0000 Subject: [Biojava-l] access to qualities Message-ID: Hi, I am trying to access to the qualities created with the example: FastqReader fastqReader = new SangerFastqReader(); List sequences = new LinkedList(); for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} From power3d at gmail.com Thu Nov 15 14:23:41 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:23:41 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Sorry, the message went before I finish it. How can I access the qualities of each sequence? I am trying like this: List, NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); for (int i = 0; i < features.size(); i++){ System.out.println(": " + features.get(i).toString()); } How can I access the qualities? Thanks for your help, Tony On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: > Hi, > > I am trying to access to the qualities created with the example: > > FastqReader fastqReader = new SangerFastqReader(); > List sequences = new LinkedList(); > for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > > From power3d at gmail.com Thu Nov 15 14:23:41 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 14:23:41 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Sorry, the message went before I finish it. How can I access the qualities of each sequence? I am trying like this: List, NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); for (int i = 0; i < features.size(); i++){ System.out.println(": " + features.get(i).toString()); } How can I access the qualities? Thanks for your help, Tony On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: > Hi, > > I am trying to access to the qualities created with the example: > > FastqReader fastqReader = new SangerFastqReader(); > List sequences = new LinkedList(); > for (Fastq fastq : fastqReader.read(new File ("sanger.fastq"))){ > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > > From power3d at gmail.com Thu Nov 15 15:03:59 2012 From: power3d at gmail.com (Tony Power) Date: Thu, 15 Nov 2012 15:03:59 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Thanks for the feedback. So, from the example I provided, how would you print the quality features? On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis wrote: > Tony > > The features get added as a named string to support any number of feature > types. If you look in the FastqTools code should be able to find the > string that is used to denote the quality score and then use the > corresponding get method to return the value. > > Scooter > > On 11/15/12 9:23 AM, "Tony Power" wrote: > > >Sorry, the message went before I finish it. > > > >How can I access the qualities of each sequence? > > > >I am trying like this: > >List, > >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); > >for (int i = 0; i < features.size(); i++){ > > System.out.println(": " + features.get(i).toString()); > >} > > > >How can I access the qualities? > > > >Thanks for your help, > >Tony > > > > > >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: > > > >> Hi, > >> > >> I am trying to access to the qualities created with the example: > >> > >> FastqReader fastqReader = new SangerFastqReader(); > >> List sequences = new LinkedList(); > >> for (Fastq fastq : fastqReader.read(new File > >>< > http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I > >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ > >> sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > >> > >> > >_______________________________________________ > >Biojava-l mailing list - Biojava-l at lists.open-bio.org > >http://lists.open-bio.org/mailman/listinfo/biojava-l > > From heuermh at gmail.com Thu Nov 15 16:34:44 2012 From: heuermh at gmail.com (Michael Heuer) Date: Thu, 15 Nov 2012 10:34:44 -0600 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Hello Tony, The javadoc here http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 says "The quality scores are stored in a QualityFeature with a type "qualityScores" the same length as the sequence." QualityFeature has several different methods to access the quality scores, List getQualities, Number getQualitiesAt(int index), etc. http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html Alternatively, it may be more efficient to not create DNASequence objects, something like FastqReader fastqReader = new SangerFastqReader(); InputSupplier inputSupplier = Files.newReaderSupplier(new File("sanger.fastq")); fastqReader.stream(inputSupplier, new StreamListener() { @Override public void fastq(final Fastq fastq) { int size = fastq.getSequence().length(); double[] qualityScores = FastqTools.qualityScores(fastq, new double[size]); .... } }); michael On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: > Thanks for the feedback. > So, from the example I provided, how would you print the quality features? > > > On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis wrote: > >> Tony >> >> The features get added as a named string to support any number of feature >> types. If you look in the FastqTools code should be able to find the >> string that is used to denote the quality score and then use the >> corresponding get method to return the value. >> >> Scooter >> >> On 11/15/12 9:23 AM, "Tony Power" wrote: >> >> >Sorry, the message went before I finish it. >> > >> >How can I access the qualities of each sequence? >> > >> >I am trying like this: >> >List, >> >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); >> >for (int i = 0; i < features.size(); i++){ >> > System.out.println(": " + features.get(i).toString()); >> >} >> > >> >How can I access the qualities? >> > >> >Thanks for your help, >> >Tony >> > >> > >> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: >> > >> >> Hi, >> >> >> >> I am trying to access to the qualities created with the example: >> >> >> >> FastqReader fastqReader = new SangerFastqReader(); >> >> List sequences = new LinkedList(); >> >> for (Fastq fastq : fastqReader.read(new File >> >>< >> http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I >> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ >> >> sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} >> >> >> >> >> >_______________________________________________ >> >Biojava-l mailing list - Biojava-l at lists.open-bio.org >> >http://lists.open-bio.org/mailman/listinfo/biojava-l >> >> > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l From heuermh at gmail.com Thu Nov 15 16:37:57 2012 From: heuermh at gmail.com (Michael Heuer) Date: Thu, 15 Nov 2012 10:37:57 -0600 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: Hello Tony, This unit test shows how to access the qualities in a QualityFeature public void testCreateDNASequenceWithQualityScores() { DNASequence sequence = FastqTools.createDNASequenceWithQualityScores(builder.build()); assertNotNull(sequence); List features = sequence.getFeaturesByType("qualityScores"); assertNotNull(features); assertEquals(1, features.size()); QualityFeature qualityScores = (QualityFeature) features.get(0); assertEquals(sequence.getLength(), qualityScores.getQualities().size()); assertEquals(sequence.getLength(), qualityScores.getLocations().getLength()); } http://code.open-bio.org/biojava-live/trunk/biojava3-sequencing/src/test/java/org/biojava3/sequencing/io/fastq/FastqToolsTest.java?revision=9583&root=biojava&view=markup michael On Thu, Nov 15, 2012 at 10:34 AM, Michael Heuer wrote: > Hello Tony, > > The javadoc here > > http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 > > says "The quality scores are stored in a QualityFeature with a type > "qualityScores" the same length as the sequence." > > QualityFeature has several different methods to access the quality > scores, List getQualities, Number getQualitiesAt(int index), > etc. > > http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html > > > Alternatively, it may be more efficient to not create DNASequence > objects, something like > > FastqReader fastqReader = new SangerFastqReader(); > InputSupplier inputSupplier = Files.newReaderSupplier(new File("sanger.fastq")); > > fastqReader.stream(inputSupplier, new StreamListener() > { > @Override > public void fastq(final Fastq fastq) > { > int size = fastq.getSequence().length(); > double[] qualityScores = FastqTools.qualityScores(fastq, new > double[size]); > .... > } > }); > > michael > > > On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: >> Thanks for the feedback. >> So, from the example I provided, how would you print the quality features? >> >> >> On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis wrote: >> >>> Tony >>> >>> The features get added as a named string to support any number of feature >>> types. If you look in the FastqTools code should be able to find the >>> string that is used to denote the quality score and then use the >>> corresponding get method to return the value. >>> >>> Scooter >>> >>> On 11/15/12 9:23 AM, "Tony Power" wrote: >>> >>> >Sorry, the message went before I finish it. >>> > >>> >How can I access the qualities of each sequence? >>> > >>> >I am trying like this: >>> >List, >>> >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); >>> >for (int i = 0; i < features.size(); i++){ >>> > System.out.println(": " + features.get(i).toString()); >>> >} >>> > >>> >How can I access the qualities? >>> > >>> >Thanks for your help, >>> >Tony >>> > >>> > >>> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power wrote: >>> > >>> >> Hi, >>> >> >>> >> I am trying to access to the qualities created with the example: >>> >> >>> >> FastqReader fastqReader = new SangerFastqReader(); >>> >> List sequences = new LinkedList(); >>> >> for (Fastq fastq : fastqReader.read(new File >>> >>< >>> http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I >>> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ >>> >> sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} >>> >> >>> >> >>> >_______________________________________________ >>> >Biojava-l mailing list - Biojava-l at lists.open-bio.org >>> >http://lists.open-bio.org/mailman/listinfo/biojava-l >>> >>> >> _______________________________________________ >> Biojava-l mailing list - Biojava-l at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/biojava-l From power3d at gmail.com Fri Nov 16 10:03:40 2012 From: power3d at gmail.com (Tony Power) Date: Fri, 16 Nov 2012 10:03:40 +0000 Subject: [Biojava-l] access to qualities In-Reply-To: References: Message-ID: This is what I really needed as suggested by Michael: List features = sequence.getFeaturesByType("qualityScores"); Instead what I was doing: List, NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); Thanks you all guys for your feedback, Tony On Thu, Nov 15, 2012 at 4:37 PM, Michael Heuer wrote: > Hello Tony, > > This unit test shows how to access the qualities in a QualityFeature > > public void testCreateDNASequenceWithQualityScores() > { > DNASequence sequence = > FastqTools.createDNASequenceWithQualityScores(builder.build()); > assertNotNull(sequence); > > List features = sequence.getFeaturesByType("qualityScores"); > assertNotNull(features); > assertEquals(1, features.size()); > QualityFeature qualityScores = (QualityFeature) features.get(0); > assertEquals(sequence.getLength(), > qualityScores.getQualities().size()); > assertEquals(sequence.getLength(), > qualityScores.getLocations().getLength()); > } > > > http://code.open-bio.org/biojava-live/trunk/biojava3-sequencing/src/test/java/org/biojava3/sequencing/io/fastq/FastqToolsTest.java?revision=9583&root=biojava&view=markup > > michael > > > On Thu, Nov 15, 2012 at 10:34 AM, Michael Heuer wrote: > > Hello Tony, > > > > The javadoc here > > > > > http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 > > > > says "The quality scores are stored in a QualityFeature with a type > > "qualityScores" the same length as the sequence." > > > > QualityFeature has several different methods to access the quality > > scores, List getQualities, Number getQualitiesAt(int index), > > etc. > > > > > http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html > > > > > > Alternatively, it may be more efficient to not create DNASequence > > objects, something like > > > > FastqReader fastqReader = new SangerFastqReader(); > > InputSupplier inputSupplier = Files.newReaderSupplier(new > File("sanger.fastq")); > > > > fastqReader.stream(inputSupplier, new StreamListener() > > { > > @Override > > public void fastq(final Fastq fastq) > > { > > int size = fastq.getSequence().length(); > > double[] qualityScores = FastqTools.qualityScores(fastq, new > > double[size]); > > .... > > } > > }); > > > > michael > > > > > > On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: > >> Thanks for the feedback. > >> So, from the example I provided, how would you print the quality > features? > >> > >> > >> On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis > wrote: > >> > >>> Tony > >>> > >>> The features get added as a named string to support any number of > feature > >>> types. If you look in the FastqTools code should be able to find the > >>> string that is used to denote the quality score and then use the > >>> corresponding get method to return the value. > >>> > >>> Scooter > >>> > >>> On 11/15/12 9:23 AM, "Tony Power" wrote: > >>> > >>> >Sorry, the message went before I finish it. > >>> > > >>> >How can I access the qualities of each sequence? > >>> > > >>> >I am trying like this: > >>> >List, > >>> >NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); > >>> >for (int i = 0; i < features.size(); i++){ > >>> > System.out.println(": " + features.get(i).toString()); > >>> >} > >>> > > >>> >How can I access the qualities? > >>> > > >>> >Thanks for your help, > >>> >Tony > >>> > > >>> > > >>> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power > wrote: > >>> > > >>> >> Hi, > >>> >> > >>> >> I am trying to access to the qualities created with the example: > >>> >> > >>> >> FastqReader fastqReader = new SangerFastqReader(); > >>> >> List sequences = new LinkedList(); > >>> >> for (Fastq fastq : fastqReader.read(new File > >>> >>< > >>> > http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I > >>> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ > >>> >> > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > >>> >> > >>> >> > >>> >_______________________________________________ > >>> >Biojava-l mailing list - Biojava-l at lists.open-bio.org > >>> >http://lists.open-bio.org/mailman/listinfo/biojava-l > >>> > >>> > >> _______________________________________________ > >> Biojava-l mailing list - Biojava-l at lists.open-bio.org > >> http://lists.open-bio.org/mailman/listinfo/biojava-l > From andreas at sdsc.edu Fri Nov 16 15:55:07 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Fri, 16 Nov 2012 07:55:07 -0800 Subject: [Biojava-l] [Biojava-dev] access to qualities In-Reply-To: References: Message-ID: Perhaps might be good to also add this as a cookbook recipe on the wiki? Andreas On Fri, Nov 16, 2012 at 2:03 AM, Tony Power wrote: > This is what I really needed as suggested by Michael: > List features = sequence.getFeaturesByType("qualityScores"); > > Instead what I was doing: > List, > NucleotideCompound>> features = s.getFeaturesByType("qualityScores"); > > Thanks you all guys for your feedback, > Tony > > > On Thu, Nov 15, 2012 at 4:37 PM, Michael Heuer wrote: > > > Hello Tony, > > > > This unit test shows how to access the qualities in a QualityFeature > > > > public void testCreateDNASequenceWithQualityScores() > > { > > DNASequence sequence = > > FastqTools.createDNASequenceWithQualityScores(builder.build()); > > assertNotNull(sequence); > > > > List features = sequence.getFeaturesByType("qualityScores"); > > assertNotNull(features); > > assertEquals(1, features.size()); > > QualityFeature qualityScores = (QualityFeature) features.get(0); > > assertEquals(sequence.getLength(), > > qualityScores.getQualities().size()); > > assertEquals(sequence.getLength(), > > qualityScores.getLocations().getLength()); > > } > > > > > > > http://code.open-bio.org/biojava-live/trunk/biojava3-sequencing/src/test/java/org/biojava3/sequencing/io/fastq/FastqToolsTest.java?revision=9583&root=biojava&view=markup > > > > michael > > > > > > On Thu, Nov 15, 2012 at 10:34 AM, Michael Heuer > wrote: > > > Hello Tony, > > > > > > The javadoc here > > > > > > > > > http://www.biojava.org/docs/api/org/biojava3/sequencing/io/fastq/FastqTools.html#createDNASequenceWithQualityScores%28org.biojava3.sequencing.io.fastq.Fastq%29 > > > > > > says "The quality scores are stored in a QualityFeature with a type > > > "qualityScores" the same length as the sequence." > > > > > > QualityFeature has several different methods to access the quality > > > scores, List getQualities, Number getQualitiesAt(int index), > > > etc. > > > > > > > > > http://www.biojava.org/docs/api/org/biojava3/core/sequence/features/QualityFeature.html > > > > > > > > > Alternatively, it may be more efficient to not create DNASequence > > > objects, something like > > > > > > FastqReader fastqReader = new SangerFastqReader(); > > > InputSupplier inputSupplier = Files.newReaderSupplier(new > > File("sanger.fastq")); > > > > > > fastqReader.stream(inputSupplier, new StreamListener() > > > { > > > @Override > > > public void fastq(final Fastq fastq) > > > { > > > int size = fastq.getSequence().length(); > > > double[] qualityScores = FastqTools.qualityScores(fastq, new > > > double[size]); > > > .... > > > } > > > }); > > > > > > michael > > > > > > > > > On Thu, Nov 15, 2012 at 9:03 AM, Tony Power wrote: > > >> Thanks for the feedback. > > >> So, from the example I provided, how would you print the quality > > features? > > >> > > >> > > >> On Thu, Nov 15, 2012 at 2:46 PM, Scooter Willis > > wrote: > > >> > > >>> Tony > > >>> > > >>> The features get added as a named string to support any number of > > feature > > >>> types. If you look in the FastqTools code should be able to find the > > >>> string that is used to denote the quality score and then use the > > >>> corresponding get method to return the value. > > >>> > > >>> Scooter > > >>> > > >>> On 11/15/12 9:23 AM, "Tony Power" wrote: > > >>> > > >>> >Sorry, the message went before I finish it. > > >>> > > > >>> >How can I access the qualities of each sequence? > > >>> > > > >>> >I am trying like this: > > >>> >List, > > >>> >NucleotideCompound>> features = > s.getFeaturesByType("qualityScores"); > > >>> >for (int i = 0; i < features.size(); i++){ > > >>> > System.out.println(": " + > features.get(i).toString()); > > >>> >} > > >>> > > > >>> >How can I access the qualities? > > >>> > > > >>> >Thanks for your help, > > >>> >Tony > > >>> > > > >>> > > > >>> >On Thu, Nov 15, 2012 at 2:15 PM, Tony Power > > wrote: > > >>> > > > >>> >> Hi, > > >>> >> > > >>> >> I am trying to access to the qualities created with the example: > > >>> >> > > >>> >> FastqReader fastqReader = new SangerFastqReader(); > > >>> >> List sequences = new LinkedList(); > > >>> >> for (Fastq fastq : fastqReader.read(new File > > >>> >>< > > >>> > > http://www.google.com/search?hl=en&q=allinurl%3Afile+java.sun.com&btnI=I > > >>> >>%27m%20Feeling%20Lucky>("sanger.fastq"))){ > > >>> >> > > sequences.add(FastqTools.createDNASequenceWithQualityScores(fastq));} > > >>> >> > > >>> >> > > >>> >_______________________________________________ > > >>> >Biojava-l mailing list - Biojava-l at lists.open-bio.org > > >>> >http://lists.open-bio.org/mailman/listinfo/biojava-l > > >>> > > >>> > > >> _______________________________________________ > > >> Biojava-l mailing list - Biojava-l at lists.open-bio.org > > >> http://lists.open-bio.org/mailman/listinfo/biojava-l > > > _______________________________________________ > biojava-dev mailing list > biojava-dev at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-dev > -- ----------------------------------------------------------------------- Dr. Andreas Prlic Senior Scientist, RCSB PDB Protein Data Bank University of California, San Diego (+1) 858.246.0526 ----------------------------------------------------------------------- From andreas at sdsc.edu Sat Nov 17 19:21:56 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Sat, 17 Nov 2012 11:21:56 -0800 Subject: [Biojava-l] biojava 3.0.5 release plan Message-ID: Hi, I am planning to release biojava 3.0.5 on Nov. 30th. Please commit all outstanding code for this release by Nov. 29th. For the github conversion I am targeting the first weeks of January. The major todo item for that until then is to setup the mapping of usernames in our current SVN to the corresponding github accounts, in order to preserve the contributions of the various developers. Andreas From andreas at sdsc.edu Tue Nov 20 01:39:09 2012 From: andreas at sdsc.edu (Andreas Prlic) Date: Mon, 19 Nov 2012 17:39:09 -0800 Subject: [Biojava-l] new feature - CATH parser Message-ID: Hi, Thanks to Daniel Asarnow for the latest contribution to BioJava: a parser and API for the protein structure classification CATH. - you can access various levels of information from the CATH classification. - it automatically downloads and installs CATH locally - you can request coordinates for CATH domains using the AtomCache / the new org.biojava3.structure.StructureIO utility classes. Andreas