Mendelian Randomization Analysis Pipeline: mr-seek

public public 1yr ago Version: v0.3.2 0 bookmarks

mr-seek 🔬

Mendelian randomization pipeline

 
This is the home of the pipeline, mr-seek. Its long-term goals: to perform Mendelian randomization analysis like no pipeline before!

Overview

Welcome to mr-seek! Before getting started, we highly recommend reading through mr-seek's documentation .

The ./mr-seek pipeline is composed several inter-related sub commands to setup and run the pipeline across different systems. Each of the available sub commands perform different functions:

mr-seek is a comprehensive an awesome mendelian randomization pipeline. It relies on technologies like Singularity1 to maintain the highest-level of reproducibility. The pipeline consists of a series of data processing and quality-control steps orchestrated by Snakemake2 , a flexible and scalable workflow management system, to submit jobs to a cluster.

The pipeline is compatible with data generated from Illumina short-read sequencing technologies. As input, it accepts a set of QTL files and outcome phenotypes and can be run on-premise using a cluster. A user can define the method or mode of execution. The pipeline can submit jobs to a cluster using a job scheduler like SLURM (more coming soon!). A hybrid approach ensures the pipeline is accessible to all users.

Before getting started, we highly recommend reading through the usage section of each available sub command.

For more information about issues or trouble-shooting a problem, please checkout our FAQ prior to opening an issue on Github .

Dependencies

Requires: singularity>=3.5 snakemake>=6.0

At the current moment, the pipeline uses a mixture of enviroment modules and docker images; however, this will be changing soon! In the very near future, the pipeline will only use docker images. With that being said, snakemake and singularity must be installed on the target system. Snakemake orchestrates the execution of each step in the pipeline. To guarantee the highest level of reproducibility, each step of the pipeline will rely on versioned images from DockerHub . Snakemake uses singularity to pull these images onto the local filesystem prior to job execution, and as so, snakemake and singularity will be the only two dependencies in the future.

Installation

Please clone this repository to your local filesystem using the following command:

# Clone Repository from Github
git clone https://github.com/OpenOmics/mr-seek.git
# Change your working directory
cd mr-seek/
# Add dependencies to $PATH
# Biowulf users should run
module load snakemake singularity
# Get usage information
./mr-seek -h

Contribute

This site is a living document, created for and by members like you. mr-seek is maintained by the members of OpenOmics and is improved by continuous feedback! We encourage you to contribute new content and make improvements to existing content via pull request to our GitHub repository .

References

1. Kurtzer GM, Sochat V, Bauer MW (2017). Singularity: Scientific containers for mobility of compute. PLoS ONE 12(5): e0177459.
2. Koster, J. and S. Rahmann (2018). "Snakemake-a scalable bioinformatics workflow engine." Bioinformatics 34(20): 3600.

Code Snippets

76
77
78
79
80
81
shell:
  """
  cd {params.tmpdir}
  python3 {params.snp_script} -o "{params.sample}.convert.tsv" -i "{params.neale_path}/{params.sample}.tsv.bgz" -t {params.threshold} -p {params.population} --filter &&
  mv "filter.{params.sample}.convert.tsv.gz" "{output.gwas}" || touch "{output.gwas}" "{workpath}/{params.sample}.error"
  """
SnakeMake From line 76 of rules/mr.smk
 94
 95
 96
 97
 98
 99
100
shell:
    """
    Rscript {params.script} --query {input.query} \\
        --manifest {params.manifest} \\
        --output {output.phenotype_list} \\
        --metadata {output.phenotype_metadata}
    """
SnakeMake From line 94 of rules/mr.smk
115
116
117
118
119
120
121
122
123
shell:
    """
    Rscript {params.script} --query {input.query} \\
        --pop {params.pop_flag} \\
        --manifest {params.manifest} \\
        --output {output.phenotype_list} \\
        --error {params.error_log} \\
        --metadata {output.phenotype_metadata}
    """
SnakeMake From line 115 of rules/mr.smk
150
151
152
153
154
155
156
157
158
159
160
161
shell:
    """
    Rscript {params.script} \\
        --workdir {params.outdir} \\
        --exp "{params.exposure}" \\
        --out "{params.outcome}" \\
        --pop {params.pop_flag} \\
        --path {params.path} \\
        --error {params.error_log} \\
        {params.add_flag} \\
     > {log} 2>&1
    """
SnakeMake From line 150 of rules/mr.smk
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
shell:
    """
    Rscript {params.script} --res {input.res} \\
        --data {input.data} \\
        --single {input.single} \\
        --loo {input.loo} \\
        --heterogeneity {input.heterogeneity} \\
        --pleiotropy {input.pleiotropy} \\
        --metadata {input.phenotype_metadata} \\
        --out {output.rds} \\
        --version {input.sessionInfo} \\
        --failed {params.error} \\
        --include_data \\
        {params.additional_flags} \\
        > {log} 2>&1
    """
SnakeMake From line 183 of rules/mr.smk
ShowHide 5 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://openomics.github.io/mr-seek/
Name: mr-seek
Version: v0.3.2
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: MIT License
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...