SEQanswers

Go Back   SEQanswers > Applications Forums > RNA Sequencing

Similar Threads
Thread Thread Starter Forum Replies Last Post
RNA-Seq: RNA-Seq Read Alignments with PALMapper. Newsbot! Literature Watch 1 02-26-2012 11:57 PM
RNA-Seq: Characterizing short read sequencing for gene discovery and RNA-Seq analysis Newsbot! Literature Watch 0 01-17-2012 05:50 AM
RNA-Seq: Single Read and Paired End mRNA-Seq Illumina Libraries from 10 Nanograms Tot Newsbot! Literature Watch 0 11-09-2011 02:10 AM
RNA-Seq: Modeling non-uniformity in short-read rates in RNA-Seq data. Newsbot! Literature Watch 2 06-29-2010 01:47 PM

Reply
 
Thread Tools
Old 07-12-2011, 10:57 AM   #1
ashiq.hussain
Junior Member
 
Location: New Haven, USA

Join Date: Jun 2011
Posts: 6
Default number of read in RNA-seq?

another biologist here.

I got RNA sequence (in .txt format) back from sequencing facility. Each file of 2 lanes high throughput sequencing is nearly 25GB.

I want to know the number of read in each file. Which programmer or code I should use.

thanks you.
ashiq.hussain is offline   Reply With Quote
Old 07-12-2011, 11:14 AM   #2
kwatts59
Member
 
Location: nevada

Join Date: Apr 2011
Posts: 39
Default

Try the LINUX command "wc -l <filename>". This will count the number of lines in the file. If the file is in fastq format, you will have to divide the number of lines by 4. This will give you the number of reads.
kwatts59 is offline   Reply With Quote
Old 07-12-2011, 11:28 AM   #3
ashiq.hussain
Junior Member
 
Location: New Haven, USA

Join Date: Jun 2011
Posts: 6
Default

why we use -l in the command?

Last edited by ashiq.hussain; 07-12-2011 at 12:17 PM.
ashiq.hussain is offline   Reply With Quote
Old 07-12-2011, 11:45 AM   #4
upendra_35
Senior Member
 
Location: USA

Join Date: Apr 2010
Posts: 100
Default

its not -1 it is -l and the command wc -l counts the number of lines in the file. The easiest way to find out the number of reads in a fastq file with one command is grep "@" -c <filename>. Hope this helps
upendra_35 is offline   Reply With Quote
Old 07-12-2011, 11:58 AM   #5
kmcarr
Senior Member
 
Location: USA, Midwest

Join Date: May 2008
Posts: 974
Default

Quote:
Originally Posted by upendra_35 View Post
its not -1 it is -l and the command wc -l counts the number of lines in the file. The easiest way to find out the number of reads in a fastq file with one command is grep "@" -c <filename>. Hope this helps
This will not work! The '@' character may appear in fastq quality lines as well as the seq-id line. See this thread for a discussion on the problems of using grep to count reads in fastq files.
kmcarr is offline   Reply With Quote
Old 07-12-2011, 12:17 PM   #6
ashiq.hussain
Junior Member
 
Location: New Haven, USA

Join Date: Jun 2011
Posts: 6
Default

thank you all.
ashiq.hussain is offline   Reply With Quote
Old 07-12-2011, 02:52 PM   #7
upendra_35
Senior Member
 
Location: USA

Join Date: Apr 2010
Posts: 100
Default

Sorry I missed "^" with @. It should be grep "^@" -c <filename>. However I agree with kmcarr that '@' is a character that may appear in fastq quality lines as well (sometimes at the start of the line) and so even that may not work. So the best way to do it is in two lines: wc -l <filename> followed by expr <no.of.lines> / 4
upendra_35 is offline   Reply With Quote
Old 04-16-2013, 01:07 AM   #8
JahnDavik
Junior Member
 
Location: Norway

Join Date: Aug 2012
Posts: 8
Default compressed files

Does it work with .gz files, or do I have to unpack them?
JahnDavik is offline   Reply With Quote
Old 04-16-2013, 01:51 AM   #9
NicoBxl
not just another member
 
Location: Belgium

Join Date: Aug 2010
Posts: 263
Default

no use the power of piping

gzip -d -c input.fastq.gz | wc -l
NicoBxl is offline   Reply With Quote
Old 08-16-2013, 05:10 AM   #10
CGarde
Junior Member
 
Location: Denmark

Join Date: Aug 2013
Posts: 1
Default

I don't mean to revive a closed thread, just in case someone needs to know the number of lines in multiple compressed fastq files...

for file in *.bz2; do echo $file; b=$(bzcat $file | wc -l); echo $(($b/4)); done;
CGarde is offline   Reply With Quote
Old 08-16-2013, 06:03 AM   #11
JahnDavik
Junior Member
 
Location: Norway

Join Date: Aug 2012
Posts: 8
Default

Great. Thanks. Very useful for me.
JahnDavik is offline   Reply With Quote
Reply

Tags
rna-seq

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:24 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.