Git Product home page Git Product logo

phenowrangle's Introduction

lifebit-ai/phenowrangle

Workflow for processing phenotypic information from CB.

Nextflow Docker

Introduction

The pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.

Quick Start

  1. Install nextflow

  2. Install either Docker or Singularity for full pipeline reproducibility (please only use Conda as a last resort; see docs)

  3. Download the pipeline and test it on a minimal dataset with a single command:

    nextflow run lifebit-ai/phenowrangle -profile plink_binary
  4. Start running your own analysis!

    nextflow run main.nf --mode "plink" \
                        --pheno_data "s3://lifebit-featured-datasets/pipelines/biobank-gwas/cohort_data_phenos.csv" \
                        --pheno_metadata "s3://lifebit-featured-datasets/pipelines/biobank-gwas/metadata.csv" \
                        --continuous_var_aggregation "mean" \
                        --continuous_var_transformation "zscore" \
                        --pheno_col "Specimen type" \
                        --design_mode 'case_vs_control_contrast' \
                        --case_group "NOSE" \
                        --trait_type "binary" \

See usage docs for all of the available options when running the pipeline.

Documentation

The lifebit-ai/phenowrangle pipeline comes with documentation about the pipeline which you can read at https://lifebit-ai/phenowrangle/docs or find in the docs/ directory.

Credits

lifebit-ai/phenowrangle was originally written by Marcos Cámara Donoso & Christina Chatzipantsiou.

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

NOTE: This pipeline was created using the nf-core template. For further information or help with nf-core pipelines, you can get in touch with the core developers and community on Slack (you can join with this invite).

Citation

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x. ReadCube: Full Access Link

phenowrangle's People

Contributors

mcamarad avatar cgpu avatar mmeier93 avatar

Watchers

Bruno Vieira avatar Konrad Zych avatar James Cloos avatar Pablo Prieto avatar  avatar Bruno Gonçalves avatar Panos Matzavinos avatar  avatar

phenowrangle's Issues

Refactor: plink phenofile script & phenocode count code table

Transform pipeline so it produces plink phenofiles and phenocode count code table.

Requirements

  • Merge phewas and gwas script under plink phenofile script
  • Separate phenocode from the rest of covariates and put them into a phenocode count code table
    • Research how to perform the count of the phenocode
      • Count how many times the pheno happens in a given individual vs how many times happens overall: Inspect example pheno files
  • Remove and modify processes accordingly
  • Update docs
  • Update CI testing

Notes

For phenocode count table: As requiring multiple codes occurring on different days for a given diagnosis improves phenotype precision, users can specify count thresholds required to establish a patient as a ‘case’ for a given phenotype or simply use the code count in the regression model. From: https://academic.oup.com/bioinformatics/article/30/16/2375/2748157

Add query functionality that works in all the cases with CohortBrowser outputs

Requirements

  • Ensure query works for generating plink pheno files (regardless of phewas/gwas)
  • Ensure it handles multiple hits
  • Make sure that ICD10 codes are treated as they should:
    • Not used for GWAS
    • Used for pheWAS: generate code counts file

Implementation

The query functionality should read the query file from CB and perform queries accordingly to select phenotypes of interests from the different columns.

It should be able to merge or prioritise hits when multiple hits occur for a given sample in multiple measured samples

Phenotypic code (ICD, HPO, etc) should be handled in such a way that are not included in the plink phenofile, but kept apart and put into a code-count table.

Adds support for longitudinal phenotypes

The basic idea behind this, is to pass the instances as new observations for the same individual. For this we would need to find a way to gather phenotypes per visit to the clinician.

Use case:

Assumptions
Instance 1.0 should record all phenotypes taken on XX/YY/ZZZZ date. Array 1.1, 1.2... should record multiple measurements on the same day, and they should aggregated using mean or user defined function.

Instance-array 2.0 should record all phenotypes taken on the following visit.

Solution

Instead of aggregating everything to one column, we would take all phenotypes and aggregate all the arrays using the user defined option and split them by instances as new observations for the same patient.

Support format like this: https://github.com/montilab/nf-gwas-pipeline/blob/master/data/1KG_pheno_longitudinal.csv

Remove vcf ids checking

Issue

Vcf ids checking not needed for phenotypic data, that should be done either within the pipeline or manually from a jupyter session

Requirement

  • Remove vcf ids check process and dependencies

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.