How to create a data of genotypes for each SNP for each individual
1
0
Entering edit mode
4.5 years ago
Ale Lope ▴ 10

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 genotype • 883 views
ADD COMMENT
0
Entering edit mode

It looks like the format is 23andme format?

ADD REPLY
1
Entering edit mode
4.5 years ago

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 COMMENT
0
Entering edit mode

Thank you so much, it works perfectly!

ADD REPLY

Login before adding your answer.

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