Mercurial > repos > greg > snpeff_v2_from_pablo
diff snpEff_2_1a/scripts/sift2vcf.pl @ 0:f8eaa3f8194b default tip
Uploaded snpEff_v2_1a_core.tgz from Pablo Cingolani
author | greg |
---|---|
date | Fri, 20 Apr 2012 14:47:09 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/snpEff_2_1a/scripts/sift2vcf.pl Fri Apr 20 14:47:09 2012 -0400 @@ -0,0 +1,19 @@ +#!/usr/bin/perl + + +print "##INFO=<ID=SIFT_SCORE,Number=1,Type=Float,Description=\"SIFT score, 0 = Damaging, 1=Tolerated\">\n"; +print "##INFO=<ID=SIFT_CONS,Number=1,Type=Float,Description=\"SIFT median conservation value, as log2. 0=High confidence, 4.32=Low confidence\">\n"; +print "##INFO=<ID=SIFT_SEQS,Number=1,Type=Integer,Description=\"SIFT number of sequences at position\">\n"; +print "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n"; + +while( $l = <STDIN> ) { + chomp $l; + ($chr, $coord1, $nt1, $nt2, $score, $median, $seqs_rep) = split /\t/, $l; + + # Trim spaces + if( $seqs_rep =~ /\s(.*)/ ) { $seqs_rep = $1; } + + $coord1++; # Get it in one-based coordinates + + print "$chr\t$coord1\t.\t$nt1\t$nt2\t.\t.\tSIFT_SCORE=$score;SIFT_CONS=$median;SIFT_SEQS=$seqs_rep\n"; +}