comparison scripts/pickUniqPairFastq.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 e19d9742c99b
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)=$f[11]=~/XT:A:(.)/; 21 my ($xt)=$f[11]=~/XT:A:(.)/;
20 22
21 ## revcom the read mapped to the reverse strand 23 ## revcom the read mapped to the reverse strand
22 if($f[1]=~/r/) 24 if(($f[1] & 16) == 16)
23 { 25 {
24 my $seq=Bio::Seq->new(-seq=>$f[9], -alphabet => 'dna'); 26 my $seq=Bio::Seq->new(-seq=>$f[9], -alphabet => 'dna');
25 $f[9]=$seq->revcom->seq; 27 $f[9]=$seq->revcom->seq;
26 $f[10]=reverse $f[10]; 28 $f[10]=reverse $f[10];
27 } 29 }