Giter VIP home page Giter VIP logo

haplotype-mapping's Introduction

haplotype-mapping

Estimate founder haplotypes and map phenotypes to them

Run run.sh or single commands within it as needed.

See the R/qtl2 user guide for much more in-depth instructions.

Additional required inputs

  • founders.vcf.gz: VCF with founder genotypes. Specify its location in run.sh. run.sh processes and subsets it and puts the new version in data/.

  • genetic_map/MAP4chr{1..20}.txt: The genetic maps used by qtl2 to convert physical coordinates (bp) to genetic coordinates (centimorgans). Specify its location in run.sh.

  • data/obesity_residuals_2020.csv

  • data/P50_round2_3473_unpruned_sorted.{bed,bim,fam}

Notes

  • qtl2_geno.py checks the REF allele for founders and the cohort and outputs only SNPs where the REFs match. However, there are a lot of mismatches, perhaps because REF vs. ALT was decided arbitrarily. So you probably want to harmonize those somehow so that all valid SNPs are included.

  • SNPs are subsetted to those observed in genotype sequencing. The imputed SNPs don't really add information useful for haplotype estimation since they were imputed using estimated haplotypes. And even using only the observed SNPs takes a lot of time and memory. FYI I obtained the observed subset using:

cat /projects/ps-palmer/apurva/phased_genotypes/chr{1..20}/chr*_hap | grep -v -- '---' | cut -d' ' -f2 | gzip -c > observed_SNPs.txt.gz

  • You can adjust the density of the pseudomarker grid in run_qtl2.R to speed up mapping.

  • Instead of the basic calc_genoprob function, run_qtl2.R uses calc_genoprob_fst from the qtl2fst library, which computes probabilities one chromosome at a time, saving them to disk and returning an index pointing to the data.

  • Many cryptic errors while running qtl2 can occur from running out of memory due to large data size.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.