Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import and tidy ADMIXTURE output #17

Open
6 tasks
dramanica opened this issue Mar 24, 2024 · 2 comments
Open
6 tasks

Import and tidy ADMIXTURE output #17

dramanica opened this issue Mar 24, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@dramanica
Copy link
Member

dramanica commented Mar 24, 2024

We want to have a function that allows us to import the output from ADMIXTURE. The expected path would be:

  1. generate a BED from a gen_tibble (after filtering/clumping for LD)
  2. run ADMIXTURE in bash as usual
  3. in R, use a simple gt_import_admixture which reads in the admixture files and creates a sensible structure, with class gt_admixture. We might want to consider a super-class gt_cluster which would then allow us to recycle tidiers and autoplot for all clustering approaches.
  4. Operate with that object via tidy, augment and autoplot
    Things to do:
  • select a simple dataset that we can play with. Ideally the same dataset that we will use for other analyses. Currently we have a dataset on anolis lizard that could work in inst/extdata/anolis. It is based on the tutorial:
    https://connor-french.github.io/intro-pop-structure-r/
    There is a .Rmd that replicates the first part of the analysis (DAPC) in /data-raw/adegenet, which also has the code to read and format the dataset as a gen_tibble.
  • create a BED from a gen_tibble and then run ADMIXTURE
  • include the outputs in inst/extdata for a few clusters
  • write the import function (look at the tutorial on lizards as it has some code to do that)
  • write tidiers methods (tidy() and augment()) (look at the tutorial on lizards as it has some code to do that)
  • write autoplot() method (look at the tutorial on lizards as it has some code to do that)
@dramanica dramanica added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Mar 24, 2024
@dramanica
Copy link
Member Author

dramanica commented Jun 11, 2024

Ok, basic functions and an example with LEA are now in the main branch of tidypopgen. Ideally, we should create a run of ADMIXTURE for an example dataset, and write a function to make it easy to import a Q file into the right kind of object for everything else to work.

@dramanica
Copy link
Member Author

This is now fully implemented, we just need to update the vignette.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant