Created
April 8, 2014 05:04
-
-
Save hyphaltip/10092947 to your computer and use it in GitHub Desktop.
HMMER3 simple parsing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Here is code for parsing | |
use strict; | |
use warnings; | |
my $hmmertable = shift @ARGV; | |
open(HMMERTABLE, $hmmertable) || die "$hmmertable: $!"; | |
while(<HMMERTABLE>){ | |
chomp; | |
next if /^\#/ || /^\s+$/; | |
my ($domain,$domacc,$tlen,$qname,$qacc,$qlen, $fullevalue,$fullscore,$fullbias, | |
$n,$ntotal,$cvalue,$ivalue,$domscore,$dombias,$hmmfrom,$hmmto,$alifrom,$alito, $envfrom,$envto) = split(/\s+/,$_,23); | |
next if $fullevalue > $minE; | |
print "$qname\t$domain\t$fullevalue\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment