|
0
|
1 #!/usr/bin/perl
|
|
|
2
|
|
|
3
|
|
|
4 print "##INFO=<ID=SIFT_SCORE,Number=1,Type=Float,Description=\"SIFT score, 0 = Damaging, 1=Tolerated\">\n";
|
|
|
5 print "##INFO=<ID=SIFT_CONS,Number=1,Type=Float,Description=\"SIFT median conservation value, as log2. 0=High confidence, 4.32=Low confidence\">\n";
|
|
|
6 print "##INFO=<ID=SIFT_SEQS,Number=1,Type=Integer,Description=\"SIFT number of sequences at position\">\n";
|
|
|
7 print "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n";
|
|
|
8
|
|
|
9 while( $l = <STDIN> ) {
|
|
|
10 chomp $l;
|
|
|
11 ($chr, $coord1, $nt1, $nt2, $score, $median, $seqs_rep) = split /\t/, $l;
|
|
|
12
|
|
|
13 # Trim spaces
|
|
|
14 if( $seqs_rep =~ /\s(.*)/ ) { $seqs_rep = $1; }
|
|
|
15
|
|
|
16 $coord1++; # Get it in one-based coordinates
|
|
|
17
|
|
|
18 print "$chr\t$coord1\t.\t$nt1\t$nt2\t.\t.\tSIFT_SCORE=$score;SIFT_CONS=$median;SIFT_SEQS=$seqs_rep\n";
|
|
|
19 }
|