annotate rapsodyn/PileupVariant.pl @ 5:b0cbb9d21aa9 draft

Uploaded
author mcharles
date Mon, 22 Sep 2014 10:19:53 -0400
parents 442a7c88b886
children 3f7b0788a1c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
1 #!/usr/bin/perl
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
2 use strict;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
3
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
4 my $inputfile = $ARGV[0];
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
5 open(IF, $inputfile) or die("Can't open $inputfile\n");
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
6
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
7 #Extraction des variants
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
8 my $nb_line=0;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
9 while (my $line=<IF>){
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
10 my $test = $line;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
11 $test =~ s/\$//g; #the read start at this position
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
12 $test =~ s/\^.//g; #the read end at this position followed by quality char
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
13 my @field = split(/\s+/,$test);
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
14
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
15 if ($field[4]=~/[ATGCN]/i){
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
16 print $line;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
17 }
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
18 }
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
19 close(IF);