ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/scripts/fqcount
Revision: 24
Committed: Tue Jul 26 21:46:39 2011 UTC (8 years, 1 month ago) by gpertea
File size: 448 byte(s)
Log Message:
Line File contents
1 #!/bin/tcsh -f
2 if ("x"$1 == 'x-h') then
3 echo "Usage: fqcount [-M] <fastq_input>"
4 echo ""
5 echo "Count the number of reads in a fastq file"
6 echo ""
7 echo "Use -M to get the 'real' count if the duplicate reads were collapsed"
8 echo "and reads have the '_xN' suffix"
9 exit 1
10 endif
11 if ( "x"$1 == 'x-M' ) then
12 shift
13 perl -e '$n=0; while (<>) { if (m/^\@/ && m/_x(\d+)$/) {$n+=$1} } print $n."\n"' $1
14 exit
15 endif
16 set n=`wc -l $1`
17 @ n /= 4
18 echo $n

Properties

Name Value
svn:executable *