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

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 • 2.9k 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.1 years ago
tothepoint ▴ 800

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

Login before adding your answer.

Traffic: 2971 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