SEQanswers

Go Back   SEQanswers > General



Similar Threads
Thread Thread Starter Forum Replies Last Post
BWA & Index Preloading for SOLiD Reads dp05yk Bioinformatics 0 05-10-2011 12:37 PM
Simulated reads mapping to same region - maq simulate & dwgsim gprakhar Bioinformatics 2 02-18-2011 11:12 PM
Duplicated bases in 100 bp GA2 reads wraithnot Illumina/Solexa 4 10-26-2010 01:04 PM
Filter Illumina reads & maintain PE ordering k-gun12 Bioinformatics 2 08-21-2010 02:25 PM
Paired-end & shotgun reads nickloman 454 Pyrosequencing 4 03-11-2010 12:22 AM

Reply
 
Thread Tools
Old 01-20-2012, 06:54 AM   #1
CS Student
Member
 
Location: US

Join Date: Apr 2011
Posts: 20
Default #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
File Type: txt reads.phi.x.174.fastq.txt (7.8 KB, 4 views)
CS Student is offline   Reply With Quote
Old 01-20-2012, 07:07 AM   #2
chadn737
Senior Member
 
Location: US

Join Date: Jan 2009
Posts: 392
Default

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.
chadn737 is offline   Reply With Quote
Old 01-20-2012, 07:08 AM   #3
westerman
Rick Westerman
 
Location: Purdue University, Indiana, USA

Join Date: Jun 2008
Posts: 1,104
Default

Quote:
Originally Posted by CS Student View Post
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.
westerman is offline   Reply With Quote
Old 01-20-2012, 07:12 AM   #4
westerman
Rick Westerman
 
Location: Purdue University, Indiana, USA

Join Date: Jun 2008
Posts: 1,104
Default

Quote:
Originally Posted by chadn737 View Post
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'.
westerman is offline   Reply With Quote
Old 01-20-2012, 07:25 AM   #5
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,060
Default

Quote:
Originally Posted by westerman View Post

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
GenoMax is offline   Reply With Quote
Old 01-21-2012, 03:10 AM   #6
CS Student
Member
 
Location: US

Join Date: Apr 2011
Posts: 20
Default

Thank you very much for your explainations. This is all what I wanted to know about # reads and #bases.
CS Student is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:14 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO