ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/scripts/gffcount
Revision: 71
Committed: Fri Sep 23 19:23:49 2011 UTC (7 years, 11 months ago) by gpertea
File size: 1037 byte(s)
Log Message:
gridx fixed to export PERL5LIB and PYTHONPATH

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-C") then
15 shift
16 perl -ne 'chomp;@t=split(/\t/);print "$1\n" if ($t[2] eq "CDS") && m/Parent=([^;]+)/' $1 | sort -u | wc -l
17 exit
18 endif
19
20 if ("x"$1 == "x-Cl") then
21 shift
22 perl -ne 'chomp;@t=split(/\t/);print "$1\n" if ($t[2] eq "CDS") && m/Parent=([^;]+)/' $1 | sort -u
23 exit
24 endif
25
26 if ("x"$1 == "x-l") then
27 shift
28 perl -ne 'chomp;@t=split(/\t/);print "$1\n" if ($t[2]=~m/exon$/ && m/Parent=([^;]+)/)' $1 | sort -u
29 exit
30 endif
31
32 #perl -ne 'chomp;@t=split(/\t/);print "$1\n" if ($t[2]!~m/(?:exon|CDS|gene)$/) && m/ID=([^;]+)/' $1 | sort -u | wc -l
33 perl -ne 'chomp;@t=split(/\t/);print "$1\n" if ($t[2]=~m/exon$/ && m/Parent=([^;]+)/)' $1 | sort -u | wc -l

Properties

Name Value
svn:executable *