Question: Extract SNPs and SNP ID's from vcf file
1
gravatar for aadhirareddy1323
2.4 years ago by
aadhirareddy132330 wrote:

Hi all,

I have vcf file.I am trying to extract ID ,SNPs and SNP ID's in the following way : It has to conform with the following format.

i)The first row should contain the IDs of subjects.
ii)The first column should contain the IDs of SNPs.
iii)Entry (i,j) should indicate the value of subject j in SNP i. The entry of the first row-first column is a string "SNP".

Please help me how to do this by using vcf or bcftools. Thanks in Advance

extract snps 1000genomes vcf • 1.7k views
ADD COMMENTlink modified 15 months ago by zx87549.1k • written 2.4 years ago by aadhirareddy132330
1

You are not going to be able to get that format with just vcf or bcftools. It's also not clear what you mean by 'value of subject j in SNP i' - do you mean the genotype?

You can probably do most of this with a combination of excel and GATK's VariantsToTable tool.

ADD REPLYlink written 2.4 years ago by jared.andrews075.3k
1

Please post example input and expected output.

ADD REPLYlink written 2.4 years ago by cpad011212k

i)The first row should contain the IDs of subjects. ii)The first column should contain the IDs of SNPs. iii)Entry (i,j) should indicate the value of subject j in SNP i.

You actually describe the format of a vcf file here.

ADD REPLYlink written 2.4 years ago by WouterDeCoster43k

I have done it myself. Thank you for the reply :)

ADD REPLYlink written 2.4 years ago by aadhirareddy132330
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1185 users visited in the last hour