Question: How to create a data of genotypes for each SNP for each individual
0
gravatar for Ale Lope
8 months ago by
Ale Lope10
Ale Lope10 wrote:

Hello everyone,

I would like to create a data followed by the genotype on each SNP for each individual.

Does someone knows how to get the next followed structure? or Is there any existing tool that provides the below data?

Individuals ID_SPNs Genotype
  ind_1     rs01    AA
  ind_1     rs02    TT
  ind_1     rs03    CC
  :
  .     
  ind_2     rs01    AG
  ind_2     rs02    TC
  ind_2     rs03    AC
  :
  .
  ind_n     rs01    GG
  ind_n     rs02    CC
  ind_n     rs03    AA

I have vcf and plink (bed, fam and bim) format files.

Hopefully someone can give me a hint!

Thanks,

Ale.

geno plink blog genotype • 208 views
ADD COMMENTlink modified 8 months ago by chrchang5237.1k • written 8 months ago by Ale Lope10

It looks like the format is 23andme format?

ADD REPLYlink written 8 months ago by Shicheng Guo8.2k
1
gravatar for chrchang523
8 months ago by
chrchang5237.1k
United States
chrchang5237.1k wrote:

If you are fine with the records being grouped by SNP first and individuals second, rather than the other way around,

plink --bfile ... --recode lgen

generates almost exactly what you want (you'd then just need to get rid of the first chromosome-# column, and the space between the two alleles; this can be done with a bash one-liner).

ADD COMMENTlink modified 8 months ago • written 8 months ago by chrchang5237.1k

Thank you so much, it works perfectly!

ADD REPLYlink written 8 months ago by Ale Lope10
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: 1613 users visited in the last hour