#!/usr/bin/perl -w use warnings; use strict; use autodie; # revise CHROM, POS and ID in the file(vcf) from stacks open stacks, "batch_1.vcf" or die; # the file is the output file in the pipeline "populations"; open OUT, ">3pine_stacks.vcf" or die; while (){ chomp; if(/^#/){ print OUT $_; }else{ my $i=0; my @temp=split /\t/,$_; $temp[0]=$temp[2]; $temp[1]=$temp[1]-(($temp[2]-1)*80); $temp[2]="."; for($i=0;$i<=$#temp;$i++){ print OUT $temp[$i]."\t"; } } print OUT "\n"; } close stacks;