comparison scripts/pickUniqPairFastq_MEM.pl @ 21:9672fe07a232 draft default tip

planemo upload for repository https://github.com/portiahollyoak/Tools commit 0fea84d05f8976b8360a8b4943ecb01b87e3ade0-dirty
author mvdbeek
date Mon, 05 Dec 2016 09:58:47 -0500
parents ca36262102d8
children
comparison
equal deleted inserted replaced
20:6e02b9179a24 21:9672fe07a232
11 while(<in>) 11 while(<in>)
12 { 12 {
13 chomp; 13 chomp;
14 my @f=split/\t/,$_,12; 14 my @f=split/\t/,$_,12;
15 ## read number 1 or 2 15 ## read number 1 or 2
16 my ($rnum)=$f[1]=~/(\d)$/; 16 #my ($rnum)=$f[1]=~/(\d)$/;
17 my $rnum=1;
18 if (($f[1] & 128) == 128) {$rnum=2;}
17 19
18 ## XT:A:* 20 ## XT:A:*
19 my $xt=""; 21 my $xt="";
20 my @a=split(/\s+/, $_); 22 my @a=split(/\s+/, $_);
21 my $as=0; 23 my $as=0;
32 if (($xs > 0) && ($as-$xs <= $ARGV[2])) {$xt="R";} 34 if (($xs > 0) && ($as-$xs <= $ARGV[2])) {$xt="R";}
33 elsif ($as > 0) {$xt="U";} 35 elsif ($as > 0) {$xt="U";}
34 } 36 }
35 37
36 ## revcom the read mapped to the reverse strand 38 ## revcom the read mapped to the reverse strand
37 if($f[1]=~/r/) 39 if (($f[1] & 16) == 16)
38 { 40 {
39 my $seq=Bio::Seq->new(-seq=>$f[9], -alphabet => 'dna'); 41 my $seq=Bio::Seq->new(-seq=>$f[9], -alphabet => 'dna');
40 $f[9]=$seq->revcom->seq; 42 $f[9]=$seq->revcom->seq;
41 $f[10]=reverse $f[10]; 43 $f[10]=reverse $f[10];
42 } 44 }