comparison filterReadsByLength.pl @ 50:7b5a48b972e9 draft

Uploaded
author big-tiandm
date Fri, 05 Dec 2014 00:11:02 -0500
parents ca05d68aca13
children
comparison
equal deleted inserted replaced
49:f008ab2cadc6 50:7b5a48b972e9
31 31
32 if($aline=~/:([\d|_]+)_x(\d+)$/){ 32 if($aline=~/:([\d|_]+)_x(\d+)$/){
33 my @ss=split/_/,$1; 33 my @ss=split/_/,$1;
34 for (my $i=0;$i<@ss;$i++) { 34 for (my $i=0;$i<@ss;$i++) {
35 $hash{length($seq)}[$i]++ if($ss[$i]>0); 35 $hash{length($seq)}[$i]++ if($ss[$i]>0);
36 $hash{length($seq)}[$i] +=0 if($ss[$i]>0); 36 $hash{length($seq)}[$i] +=0 if($ss[$i]==0);
37 $reads{length($seq)}[$i]+=$ss[$i]; 37 $reads{length($seq)}[$i]+=$ss[$i];
38 } 38 }
39 } 39 }
40 #else{$reads{length($seq)}+=1;} 40 #else{$reads{length($seq)}+=1;}
41 if (length ($seq)>=$opts{'min'} && length ($seq) <=$opts{'max'}) { 41 if (length ($seq)>=$opts{'min'} && length ($seq) <=$opts{'max'}) {