bodkan / admixr

An R package for reproducible and automated ADMIXTOOLS analyses
https://bodkan.net/admixr
Other
28 stars 9 forks source link

Convenient function for generating badsnp_file #4

Closed bodkan closed 6 years ago

bodkan commented 7 years ago

It would be nice to have a built-in function to generate a bad_snp file given a set of requirements.

Perhaps it could accept a list of functions (predicates) that could be applied to each site from a specified snp file and it would save only those SNPs that pass/don't pass all of these predicates?

As an example, passing in a function with

    (ref == "C" & alt == "T") |
    (ref == "T" & alt == "C") |
    (ref == "G" & alt == "A") |
    (ref == "A" & alt == "G")

would filter for transversions only.

bodkan commented 6 years ago

Implemented as remove_transitions() function.