diff scripts/pickUniqIntervalPos.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 28d1a6f8143f
children
line wrap: on
line diff
--- a/scripts/pickUniqIntervalPos.pl	Wed Oct 26 07:24:45 2016 -0400
+++ b/scripts/pickUniqIntervalPos.pl	Mon Dec 05 09:58:47 2016 -0500
@@ -10,7 +10,9 @@
 	chomp;
 	my @f=split/\t/,$_,12;
 	## read number 1 or 2
-	my ($rnum)=$f[1]=~/(\d)$/;
+	#my ($rnum)=$f[1]=~/(\d)$/;
+	my $rnum=1;
+	if (($f[1] & 128) == 128) {$rnum=2;}
 
 	## XT:A:* 
 	my ($xt)=$f[11]=~/XT:A:(.)/;
@@ -18,7 +20,7 @@
 	my $strand="+";
 
 	## parse CIGAR
-	if(($f[1]=~/R/)&&($f[8] > $ARGV[1])&&($f[8] <= 10000))
+	if((($f[1] & 32) == 32)&&($f[8] > $ARGV[1])&&($f[8] <= 10000))
         {
                 # CIGAR
                 my (@cigar_m)=$f[5]=~/(\d+)M/g;