adimitromanolakis / sim1000G

Simulation of rare and common variants based on 1000 genomes data
17 stars 1 forks source link

REF and ALT Allel only C or A #8

Open TeaByrd opened 3 years ago

TeaByrd commented 3 years ago

Hello Apostolos,

I currently have one last question.. . When I export the simulated genotypes via: writePED(vcf, fam,filename = "MasterThesis/Aetionomy/out")

I notice, that it codes only A's and C's as REF/ALT alleles in the output, when converting it from numbers to letters via plink. This can't be correct and might cause problems in my upstream analysis.

Have a look at my outputs in the attachment. I attached both ped and map files plus the converted plink bim,fam and bed files. Any clue how to fix that?

Best Thomas Synthetic_Genotypes.zip

adimitromanolakis commented 3 years ago

Hi Thomas,

yes, because of limitations in the function writePED, it is not possible to keep the reference alleles. You could write your own writePED function based on the original from sim1000G that can keep the alleles as specified in the original vcf file.

Have a look at the source code below, which will be helpful as a starting point:

https://rdrr.io/cran/sim1000G/src/R/writeped.R

Best, Apostolos

On Mon, 2 Nov 2020 at 18:11, Thomas Lordick notifications@github.com wrote:

Hello Apostolos,

I currently have one last question.. . When I export the simulated genotypes via: writePED(vcf, fam,filename = "MasterThesis/Aetionomy/out")

I notice, that it codes only A's and C's as REF/ALT alleles in the output, when converting it from numbers to letters via plink. This can't be correct and might cause problems in my upstream analysis.

Have a look at my outputs in the attachment. I attached both ped and map files plus the converted plink bim,fam and bed files. Any clue how to fix that?

Best Thomas Synthetic_Genotypes.zip https://github.com/adimitromanolakis/sim1000G/files/5476299/Synthetic_Genotypes.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adimitromanolakis/sim1000G/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEGJVY2DPMA6N33DKS5IGNTSN3K35ANCNFSM4THVAMBQ .