Is there any method to convert a text file to VCF format?
1
0
Entering edit mode
3.7 years ago
Abbas.M ▴ 20

Hello, I want to convert a text file into vcf format, is there any script or any method to convert it into vcf? It is a snp data, which is not in any format. Following are the headers of my text file.

Chromosome Position RefBase AltBase MAF RefBaseNum AltBaseNum Sample 1 Sample2 Sample3

Highly appreciated, if anyone can enlighten me about it.

SNP R gene next-gen • 3.6k views
ADD COMMENT
0
Entering edit mode

There is another thread that may help Converting Microarray SNP data into VCF format

ADD REPLY
0
Entering edit mode
3.7 years ago
tothepoint ▴ 940

Create one more text file with 1.txt:

##fileformat=VCFv4.0

#CHROM Position RefBase AltBase MAF RefBaseNum AltBaseNum Sample 1

save it and remove header from my text file and save as 2.txt and concatenate them

cat 1.txt 2.txt > your_vcf.vcf
ADD COMMENT
0
Entering edit mode

Thanks for your response, and it is highly appreciated. Sorry to say, I want a vcf file for genome wide association. This way it will create only a text file. In my genotype data the snps are not coded as numerical. It is coded in alphabets such as GG, TT, NN etc. As in vcf, snps are coded as 0, 1 or 2. I think, this method doesn't seems to apply on my data.

ADD REPLY
0
Entering edit mode

Hello Please have you found a solution to convert a txt file to vcf?

ADD REPLY
0
Entering edit mode

There is no "converting" a "txt" file to VCF format. VCF is a highly specific format while "txt" is a common file extension for plain text files. What is your data format (what do the first 10 lines look like, for example) and do you have all the information you need to build VCF entries?

ADD REPLY

Login before adding your answer.

Traffic: 2188 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6