GrindeLab / STEAM

Significance Threshold Estimation for Admixture Mapping, an R package.
Other
7 stars 3 forks source link

RFMIx v2 - calculate local ancestry correlation #3

Open guidebortoli opened 1 year ago

guidebortoli commented 1 year ago

Hi, I am wondering if you have worked with RFMIx v2 and found a way to convert local ancestry calls into SeqArray GDS files...

The GitHub page says:

Convert local ancestry calls into SeqArray GDS files, with one file per ancestral population and chromosome (i.e., 'chr22_afr.gds' contains local ancestry calls for chromosome 22, where alleles are coded such that 1 = allele inherited from African ancestors, 0 = allele inherited from some other ancestral population).

Is this assuming local ancestry files generated by which program?

Thank you for any help!

Cheers

kegrinde commented 1 year ago

STEAM was created before RFMix v2 came out, so I was using RFMix v1.5.4 at the time and have not tried the conversion myself using the newer version of RFMix. However, I will send an example of how to convert RFMix v1.5.4 output to VCF (which can then be converted to GDS using the vcf2gds.py script in the TOPMed analysis pipeline or the snpgdsVCF2GDS function in the SNPRelate R package). Perhaps this is something to add to a future version of the STEAM package. In the meantime, this example will hopefully serve as a starting point.