Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
ID:A0AWZ5 HIT:PF12951 SCORE:40.0 EVALUE:2.2e-10 HMM_START:2 HMM_END: +32 SEQ_START:421 SEQ_END:455 HIT:PF03797 SCORE:130.7 EVALUE:3.6e-40 HMM_START:7 HMM_END +:261 SEQ_START:822 SEQ_END:1073 HIT:PF12951 SCORE:38.7 EVALUE:5.5e-10 HMM_START:1 HMM_END: +32 SEQ_START:515 SEQ_END:547 //
$/="//\n"; while(<>) { if($_=~/^ID:(.*)/m) { $id=$1; $seq=$hash_f{$id}; @AoA=(); while($_=~/^HIT:(.*?)\tSCORE:[\d\.]+\tEVALUE:[\d\.\-\w]+\tHMM_ +START:\d+\tHMM_END:\d+\tSEQ_START:(\d+)\tSEQ_END:(\d+)/mg) { $pfam_name=$1; $seq_start=$2; $seq_end=$3; push @AoA, [ $pfam_name, $seq_start, $seq_end ]; } } print $id."\n"; for $i ( 0 .. $#AoA ) { print "$i\t [ @{$AoA[$i]} ],\n"; } } $/="\n";
A0AWZ5 0 [ PF12951 421 455 ], 1 [ PF03797 822 1073 ], 2 [ PF12951 515 547 ],
|
---|