Mercurial > repos > greg > snpeff_v2_from_pablo
comparison snpEff_2_1a/scripts/file2GenomeName.pl @ 0:f8eaa3f8194b default tip
Uploaded snpEff_v2_1a_core.tgz from Pablo Cingolani
| author | greg |
|---|---|
| date | Fri, 20 Apr 2012 14:47:09 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f8eaa3f8194b |
|---|---|
| 1 #!/usr/bin/perl | |
| 2 | |
| 3 #------------------------------------------------------------------------------- | |
| 4 # | |
| 5 # Transform file name to genome short name | |
| 6 # | |
| 7 #------------------------------------------------------------------------------- | |
| 8 | |
| 9 $file = $ARGV[0]; | |
| 10 print "$file"; | |
| 11 | |
| 12 $base = `basename $file`; | |
| 13 chomp $base; | |
| 14 print "\t$base"; | |
| 15 | |
| 16 if( $base =~ /(.*?)\.(.*)\..?dna\.(.*)\.fa\.gz/ ) { ($gen, $short) = ($1, $2); } | |
| 17 elsif( $base =~ /(.*?)\.(.*)\.gtf\.gz/ ) { ($gen, $short) = ($1, $2); } | |
| 18 elsif( $base =~ /(.*?)\.(.*)\.pep\.all\.fa\.gz/ ) { ($gen, $short) = ($1, $2); } | |
| 19 $full = "$gen.$short"; | |
| 20 print "\t$full\t$gen\t$short"; | |
| 21 | |
| 22 | |
| 23 print "\n"; | |
| 24 |
