Mercurial > repos > mcharles > rapsosnp
changeset 4:9074a5104cdd draft
Uploaded
author | mcharles |
---|---|
date | Wed, 17 Sep 2014 04:20:08 -0400 |
parents | 9332b9da7491 |
children | b0cbb9d21aa9 |
files | rapsodyn/PrepareFastqLight.pl |
diffstat | 1 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/rapsodyn/PrepareFastqLight.pl Thu Sep 11 07:31:20 2014 -0400 +++ b/rapsodyn/PrepareFastqLight.pl Wed Sep 17 04:20:08 2014 -0400 @@ -279,7 +279,8 @@ my $startnoN = 0; my $stopnoN = length($quality)-1; - #print "SEQ :\n$seq\n"; +#print "HEAD:\t$header"; +#print "SEQ:\t$seq\n"; my $chercheN = $seq; my @bad_position; @@ -306,14 +307,18 @@ } my $lengthnoN = $stopnoN - $startnoN + 1; my $seqnoN = substr($seq,$startnoN,$lengthnoN); - #print "$seqnoN\n"; +# print "SEQnoN\t:$seqnoN\n"; +# for (my $i=0;$i<=$#bad_position;$i++){ +# print $bad_position[$i]."\t"; +# } +# print "\n"; if ($lengthnoN >= $MIN_LENGTH){ my $startTrim = $startnoN; my $stopTrim = $stopnoN; my $quality_converted=""; - my @bad_position; + #my @bad_position; my @q = split(//,$quality); #print "QUALITY\n"; @@ -336,10 +341,11 @@ if ($#bad_position>=0){ - # for (my $i=0;$i<=$#bad_position;$i++){ - # print $bad_position[$i]."\t"; - # } - # print "\n"; + @bad_position = sort {$a <=> $b} @bad_position; +# for (my $i=0;$i<=$#bad_position;$i++){ +# print $bad_position[$i]."\t"; +# } +# print "\n"; my %coord=%{&extract_longer_string_coordinates_from_bad_position($startnoN,$stopnoN,\@bad_position)}; $startTrim = $coord{"start"}; $stopTrim = $coord{"stop"}; @@ -356,7 +362,9 @@ $fastq_lines .= substr($seq,$startTrim,$lengthTrim)."\n"; $fastq_lines .= "+\n"; $fastq_lines .= substr($quality,$startTrim,$lengthTrim)."\n"; +# print $fastq_lines; return $fastq_lines; + } else { return "";