comparison rapsodyn/filtersam_mapped_and_unique.pl @ 0:442a7c88b886 draft

Uploaded
author mcharles
date Wed, 10 Sep 2014 09:18:15 -0400
parents
children 3f7b0788a1c4
comparison
equal deleted inserted replaced
-1:000000000000 0:442a7c88b886
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 open(IN, $ARGV[0]) or die ("Can't open $ARGV[0]\n");
6 while (my $line=<IN>){
7 if ($line =~ /^\@/){
8 #Header conservation
9 print $line;
10 }
11 else {
12 #Optionnal flag verification
13 if (($line =~ /XT\:A\:U/)&&($line =~ /X0\:i\:1/)&&($line =~ /X1\:i\:0\s/)){
14 my @fields = split (/\s+/,$line);
15 if (($fields[1]==83)||($fields[1]==163)||($fields[1]==147)||($fields[1]==99)){
16 print $line;
17 }
18 }
19 }
20 }
21
22
23 close (IN);