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

Remove related prior to PCA and HWE #21

Closed
2 tasks done
jfear opened this issue Jan 27, 2021 · 0 comments
Closed
2 tasks done

Remove related prior to PCA and HWE #21

jfear opened this issue Jan 27, 2021 · 0 comments
Assignees
Labels
bug Something isn't working workflow Anything related to snakemake componenets

Comments

@jfear
Copy link
Contributor

jfear commented Jan 27, 2021

The legacy workflow prunes sets of subjects using IBS/IBD and Call Rate [1]. These related subjects are removed prior to running PCA [2] and HWE [3]. There is some discussion about doing this in different ways (#10) but here I just want to replicate the legacy process. Unfortunately, testing is going to be difficult because the current test data does not contain any related sample/subject (#2).

Action Items

  • Create a list of related subjects using IBS/IBD and Call Rate (i.e., refactor [1])
  • Create a rule to filter these subjects and plug them into the PCA (MAF+LD) and HWE (MAF+Autosome+SNPs) filter process.

Links

  • [1]
    rule make_related_list:
    input:
    track = 'subject_level/SampleUsedforSubject.csv',
    ibd = 'ibd/samples.genome',
    fam = 'subject_level/subjects.fam',
    imiss = 'subject_level/subjects_qc.imiss'
    output:
    'remove_related/subjects_to_remove.txt'
  • [2]
    rule extract_ld_prune_pca:
    input:
    bed = 'split_by_pop/{pop}_subjects.bed',
    bim = 'split_by_pop/{pop}_subjects.bim',
    fam = 'split_by_pop/{pop}_subjects.fam',
    prune = 'pca/{pop}_ldPruneList.prune.in',
    related = 'remove_related/subjects_to_remove.txt'
  • [3]
    rule subset_controls:
    input:
    bed = 'split_by_pop/{pop}_subjects.bed',
    bim = 'split_by_pop/{pop}_subjects.bim',
    fam = 'split_by_pop/{pop}_subjects.fam',
    keep = 'HWP/{pop}_controls.txt',
    related = 'remove_related/subjects_to_remove.txt'

Related

@jfear jfear added bug Something isn't working workflow Anything related to snakemake componenets labels Jan 27, 2021
@jfear jfear added this to the Phase 1: Minimum Viable Product milestone Jan 27, 2021
@jfear jfear self-assigned this Jan 27, 2021
@jfear jfear closed this as completed Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workflow Anything related to snakemake componenets
Projects
None yet
Development

No branches or pull requests

1 participant