User Name Remember Me? Password
 Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 Similar Threads Thread Thread Starter Forum Replies Last Post dp05yk Bioinformatics 0 05-10-2011 01:37 PM gprakhar Bioinformatics 2 02-19-2011 12:12 AM wraithnot Illumina/Solexa 4 10-26-2010 02:04 PM k-gun12 Bioinformatics 2 08-21-2010 03:25 PM nickloman 454 Pyrosequencing 4 03-11-2010 01:22 AM

01-20-2012, 07:54 AM   #1
CS Student
Member

Location: US

Join Date: Apr 2011
Posts: 20
#bases & # reads

Hi,

I am new to bioinformatics and appreciate your help answering this question.

I have a reads file [a sample is attached] and want to count the number of #bases and number of reads in this file, how do I do this? Is there a relation between the #bases and # reads in a reads file? i,e if the #bases information is available for a particular reads file, can I immediately calculate the number of reads?

Thanks.
Attached Files
 reads.phi.x.174.fastq.txt (7.8 KB, 4 views)

 01-20-2012, 08:07 AM #2 chadn737 Senior Member   Location: US Join Date: Jan 2009 Posts: 392 Assuming that all the reads are of a uniform length and have not been modified in some way (trimmed), then each read will be the same number of bases. In your sample fastq file: HTML Code: ```@SRR019388.1.1 SLXA-EAS1_126_FC20H6L_0_7_1_490_23.1 length=35 GTCAAATATAGTGAGTACAGGAAAATAGGTGGAGA +SRR019388.1.1 SLXA-EAS1_126_FC20H6L_0_7_1_490_23.1 length=35 <<<<<<<<<<<<;<<<<<<<<<<<<<<9<<;;7<;``` So your reads are 35bps long. If you know the number of reads just multiple by 35 and that equals the number of bases.
01-20-2012, 08:08 AM   #3
westerman
Rick Westerman

Location: Purdue University, Indiana, USA

Join Date: Jun 2008
Posts: 1,104

Quote:
 Originally Posted by CS Student Hi, I am new to bioinformatics and appreciate your help answering this question. I have a reads file [a sample is attached] and want to count the number of #bases and number of reads in this file, how do I do this? Is there a relation between the #bases and # reads in a reads file? i,e if the #bases information is available for a particular reads file, can I immediately calculate the number of reads? Thanks.
There are several programs (e.g., get_fasta_stats -- search the forum for them) that will calculate read/base stats. You could also 'wc -l' the fastQ file and divide by 4 for the number of reads. Bases are bit more difficult to find via simple unix tools. Basically I suggest you do more reading and searching in the forum. Always a good way to find out information.

There is no relation between #bases and #reads.

01-20-2012, 08:12 AM   #4
westerman
Rick Westerman

Location: Purdue University, Indiana, USA

Join Date: Jun 2008
Posts: 1,104

Quote:
 Originally Posted by chadn737 Assuming that all the reads are of a uniform length and have not been modified in some way (trimmed), then each read will be the same number of bases.
And that is a big assumption. Sure, you could look at the start of the file and at the end of the file and see reads being 35 bases in length ... but are all? I wouldn't want to guarantee this on an unknown file.

Actually from the sample file, 'CS student' should be able to figure out how many reads and the length of the reads (since this is given) via simple unix tools --- which any CS student should know. I'd use 'grep', 'cut', 'sort', and 'uniq'.

01-20-2012, 08:25 AM   #5
GenoMax
Senior Member

Location: East Coast USA

Join Date: Feb 2008
Posts: 7,080

Quote:
 Originally Posted by westerman Actually from the sample file, 'CS student' should be able to figure out how many reads and the length of the reads (since this is given) via simple unix tools --- which any CS student should know. I'd use 'grep', 'cut', 'sort', and 'uniq'.
Perhaps "CS Student" needs help understanding the "fastq" file format to follow your suggestion. May be a true beginner (can't tell from looking at "CS Student's" posting history).

http://en.wikipedia.org/wiki/FASTQ_format

 01-21-2012, 04:10 AM #6 CS Student Member   Location: US Join Date: Apr 2011 Posts: 20 Thank you very much for your explainations. This is all what I wanted to know about # reads and #bases.