Good Morning Hiram, Thank you very much for your suggestion. Well my vcf format is that of v4.1 generated from samtools. It looks similar to the format that you have shown. I'll try this out and see if it works out, hopefully.
Thank you, Warm Regards, Nandini > Date: Tue, 2 Aug 2011 10:06:23 -0700 > From: [email protected] > To: [email protected] > CC: [email protected] > Subject: Re: [Genome] liftover hg19 to hg18 > > Good Morning Nandini: > > You can convert your VCF files to bed format. > > If your VCF files follow the format: > http://www.1000genomes.org/node/101 > > This awk command will convert them to bed format (assuming | is not a > character found in the vcf fields): > > grep -v "^#" yourFile.vcf | awk '{printf "%s\t%d\t%d\t%s|%s|%s|%s|%s|%s\n", > $1,$2-1,$2,$3,$4,$5,$6,$7,$8}' > yourFile.bed > liftOver yourFile.bed hg19ToHg18.over.chain newFile.bed unMapped > > Then, from that lifted bed file back to vcf: > > awk '{printf "%s\t%d\t%s\n", $1,$2+1,$4}' newFile.bed | tr '[|]' '[\t]' > > newFile.vcf > > You may need to adjust these awk statements depending upon the exact format > of your vcf file. > > --Hiram > > Nandini B wrote: > > Hello, > > I am trying to use liftover for my SNPs from hg19 to hg18. But I have my > > SNP files in either gff3 format or vcf (v4.1). Is it possible to use these > > files to execute the command > > liftOver -gff oldFile.gff3 hg19ToHg18.over.chain newFile.gff3 unMapped or > > > > liftOver -vcf oldFile.vcf hg19ToHg18.over.chain newFile.vcf unMapped > > > > Or do I have to convert them into BED format, if so, is there any tool that > > could do this ? > > > > > > Thank you, > > Warm Regards, > > > > Nandini Badarinarayan _______________________________________________ Genome maillist - [email protected] https://lists.soe.ucsc.edu/mailman/listinfo/genome
