ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/scripts/gffcount
Revision: 24
Committed: Tue Jul 26 21:46:39 2011 UTC (13 years, 2 months ago) by gpertea
File size: 637 byte(s)
Log Message:
Line File contents
1 #!/bin/tcsh -f
2 if ("x"$1 == "x-h") then
3 echo "Usage: gffcount [-g] <gff3_file>"
4 echo " Show the count of distinct mRNA names."
5 echo " use -g option to count distinct gene names only (Name attribute)"
6 exit 1
7 endif
8 if ("x"$1 == "x-g") then
9 shift
10 perl -ne 'chomp;@t=split(/\t/);print "$1\n" if $t[2]=~m/gene$/ && m/ID=([^;]+)/' $1 | sort -u | wc -l
11 exit
12 endif
13
14 if ("x"$1 == "x-l") then
15 shift
16 perl -ne 'chomp;@t=split(/\t/);print "$1\n" if ($t[2]!~m/(?:exon|CDS|gene)$/) && m/ID=([^;]+)/' $1 | sort -u
17 exit
18 endif
19
20 perl -ne 'chomp;@t=split(/\t/);print "$1\n" if ($t[2]!~m/(?:exon|CDS|gene)$/) && m/ID=([^;]+)/' $1 | sort -u | wc -l

Properties

Name Value
svn:executable *