Commit 16830b02 authored by Hanna  JULIENNE's avatar Hanna JULIENNE

Example tutorial

parent 196d70d8
......@@ -5,7 +5,31 @@ We present here a nextflow pipeline to harmonize, impute and analyze jointly GWA
The current pipeline integrate the following workflow:
![workflow image](./doc/workflow.png=650x570)
![workflow image](./doc/workflow.png)
## Quick Start - Run pipeline on test data
Install nextflow as explain here : https://www.nextflow.io/docs/latest/getstarted.html
Clone the current repository locally:
```
git clone https://gitlab.pasteur.fr/statistical-genetics/jass_suite_pipeline.git
```
Place your Reference Panel into the /Ref_Panel subfolder
Download and extract reference panel for LD-score in the pipeline folder:
```
wget https://data.broadinstitute.org/alkesgroup/LDSCORE/eur_w_ld_chr.tar.bz2
tar -jxvf eur_w_ld_chr.tar.bz2
```
Once done you can launch the pipeline as:
```
nextflow run jass_pipeline.nf --ref_panel {ABSOLUTE_PATH_TO_PIPELINE_FOLDER}/Ref_panel --gwas_folder {ABSOLUTE_PATH_TO_PIPELINE_FOLDER}/test_data/ -with-report jass_report.html
```
## Required Input
......@@ -23,14 +47,3 @@ The following Item are necessary to run JASS pipeline
* --output_folder : A path toward a folder to write pipeline results (inittable, worktable...). by default results will be publish in the workflow directory.
## Usage of nextflow pipeline
Install nextflow as explain here : https://www.nextflow.io/docs/latest/getstarted.html
Clone the current repository locally:
```
git clone https://gitlab.pasteur.fr/statistical-genetics/jass_suite_pipeline.git
```
Once done you can launch the pipeline as:
......@@ -10,7 +10,7 @@ params.ref_panel = '/pasteur/projets/policy01/PCMA/1._DATA/ImpG_refpanel/'
params.group = "${baseDir}/input_files/group.txt"
group = file(params.group)
params.region = "${baseDir}/input_files/fourier_ls-all.bed"
params.output_folder = "$baseDir"
params.output_folder = "${baseDir}"
diagnostic_folder= params.output_folder + "/sample_size/"
harmonized_GWAS_folder = params.output_folder + "harmonized_GWAS_by_chr/"
......@@ -103,14 +103,14 @@ process meta_data_GWAS{
process Clean_GWAS {
publishDir "${output_folder}/harmonized_GWAS_files/", pattern: "*.txt", mode: 'copy'
publishDir "${output_folder}", pattern: "*.txt", mode: 'copy'
publishDir "${params.output_folder}/harmonized_GWAS_files/", pattern: "*.txt", mode: 'copy'
publishDir "${params.output_folder}", pattern: "*.txt", mode: 'copy'
input:
file ref_panel from ref_panel_wg_channel
file meta_chunk from meta_data
output:
file "harmonized_GWAS_1_file/*.txt" into cleaned_gwas mode flatten
file "harmonized_GWAS_1_file/*.txt" into cleaned_gwas_channel
file "*.txt" into cleaned_gwas_chr_channel mode flatten
file "*.txt" into cleaned_gwas_chr_channel2 mode flatten
"""
......@@ -132,7 +132,7 @@ process Clean_GWAS {
process Impute_GWAS {
publishDir "${output_folder}", pattern: "imputed_GWAS/*.txt", mode: 'copy'
publishDir "${params.output_folder}", pattern: "imputed_GWAS/*.txt", mode: 'copy'
memory '8 GB'
time '8h'
input:
......@@ -182,20 +182,23 @@ process Do_not_Impute_GWAS {
/*
process related to LD-score calculation
#
*/
process Munge_LDSC_data {
publishDir "${output_folder}", pattern: "ldsc_data/data_*.sumstats.gz", mode: 'copy'
publishDir "${params.output_folder}", pattern: "ldsc_data/data_*.sumstats.gz", mode: 'copy'
input:
file clean_gwas from cleaned_gwas
file extract_sample_size_script from extract_sample_size_script_channel
file clean_gwas from cleaned_gwas_channel.flatten()
//file extract_sample_size_script from extract_sample_size_script_channel.flatten()
output:
file "ldsc_data/*.sumstats.gz" into ldsc_data_channel
file "ldsc_data/*.sumstats.gz" into ldsc_data_channel_bis
when:
params.compute_LDSC_matrix
"""
Nsamp=\$(python2.7 ${extract_sample_size_script} ${clean_gwas} ${params.meta_data})
cp ${baseDir}/extract_sample_size.py ./
Nsamp=\$(python2.7 extract_sample_size.py ${clean_gwas} ${params.meta_data})
if [ ! -d "ldsc_data" ]
then
......@@ -228,7 +231,7 @@ process Generate_trait_pair {
process Correlation_LDSC_data {
publishDir "${output_folder}/cor_data/", pattern: "*.log", mode: 'copy'
publishDir "${params.output_folder}/cor_data/", pattern: "*.log", mode: 'copy'
input:
file trait_pair from combi_channel
file ldsc_data from ldsc_data_channel_bis.collect()
......@@ -258,7 +261,7 @@ process Correlation_LDSC_data {
process Correlation_matrices {
publishDir "${output_folder}/Correlation_matrices/", pattern: "*.csv", mode: 'copy'
publishDir "${params.output_folder}/Correlation_matrices/", pattern: "*.csv", mode: 'copy'
input:
file parsing_script from parse_correlation_channel
......@@ -276,7 +279,7 @@ process Correlation_matrices {
process Create_inittable_LDSC {
publishDir "${output_folder}/init_table/", pattern: "*.hdf5", mode: 'copy'
publishDir "${params.output_folder}/init_table/", pattern: "*.hdf5", mode: 'copy'
input:
file cleaned_gwas_chr from imputed_gwas_channel.mix(not_imputed_gwas_channel).collect()
file Covariance_H0 from cov_H0_matrice_channel
......@@ -300,7 +303,7 @@ process Create_inittable_LDSC {
process Create_inittable {
publishDir "${output_folder}/init_table/", pattern: "*.hdf5", mode: 'copy'
publishDir "${params.output_folder}/init_table/", pattern: "*.hdf5", mode: 'copy'
input:
file cleaned_gwas_chr from imputed_gwas_channel2.mix(not_imputed_gwas_channel2).collect()
file Regions from Region_channel2
......
......@@ -54,32 +54,33 @@ process{
}
withName: 'Munge_LDSC_data' {
container='docker://quay.io/biocontainers/ldsc_1.0.1--py_0'
container='docker://quay.io/biocontainers/ldsc:1.0.1--py_0'
cpus=1
}
withName: 'Generate_trait_pair' {
container='docker://quay.io/biocontainers/jass_preprocessing_2.0.1--py_0'
container='docker://quay.io/biocontainers/jass_preprocessing:2.0.1--py_0'
cpus=1
}
withName: 'Correlation_LDSC_data' {
container="docker://quay.io/biocontainers/ldsc_1.0.1--py_0.sif"
container="docker://quay.io/biocontainers/ldsc:1.0.1--py_0"
cpus=1
}
withName: 'Correlation_matrices' {
container='docker://quay.io/biocontainers/jass_preprocessing_2.0.1--py_0'
container='docker://quay.io/biocontainers/jass_preprocessing:2.0.1--py_0'
cpus=1
}
withName: 'Create_inittable_LDSC' {
container='docker://quay.io/biocontainers/jass_2.0--pyh5ca1d4c_0'
container='docker://quay.io/biocontainers/jass:2.0--pyh5ca1d4c_0'
cpus=1
}
withName: 'Create_inittable' {
container='docker://quay.io/biocontainers/jass_2.0--pyh5ca1d4c_0'
container='docker://quay.io/biocontainers/jass:2.0--pyh5ca1d4c_0'
cpus=1
}
......@@ -88,7 +89,7 @@ process{
}
withName: 'Create_project_data' {
container='docker://quay.io/biocontainers/jass_2.0--pyh5ca1d4c_0'
container='docker://quay.io/biocontainers/jass:2.0--pyh5ca1d4c_0'
cpus=1
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment