diff vcf2pgSnp.pl @ 3:edf12470a1a6 default tip

Bugfix from Belinda, in vcf2pgSnp.pl
author Cathy Riemer <cathy+hg@bx.psu.edu>
date Thu, 19 Mar 2015 12:06:34 -0400
parents 35c20b109be5
children
line wrap: on
line diff
--- a/vcf2pgSnp.pl	Tue May 28 17:54:02 2013 -0400
+++ b/vcf2pgSnp.pl	Thu Mar 19 12:06:34 2015 -0400
@@ -13,7 +13,7 @@
    $stCol = shift @ARGV;
    $in = shift @ARGV;
    if ($stCol eq 'all') { $stCol = 10; }
-   else { $endCol = $stCol; }
+   else {  $endCol = $stCol - 1; }  #want 0 based column number
    $stCol--; #go from 1 based to zero based column number
    if ($stCol < 9) { 
       print "ERROR genotype fields don't start until column 10\n";
@@ -21,7 +21,7 @@
    }
 }elsif (@ARGV && scalar @ARGV == 1) {
    $in = shift @ARGV;
-}elsif (@ARGV) {
+}else {
    print "usage: vcf2pgSnp.pl [indColNum default=all] file.vcf > file.pgSnp\n";
    exit;
 }