Skip to content
Snippets Groups Projects
Commit c1234ab7 authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

readme and channel for script

parent d2bb4089
No related branches found
No related tags found
No related merge requests found
# JASS analysis pipeline
We present here a nextflow pipeline to harmonize, impute and analyze jointly GWAS summary statistics.
The current pipeline integrate the following workflow:
![workflow image](./doc/workflow.png)
doc/workflow.png

103 KiB

params.compute_project=false
params.compute_LDSC_matrix=false
params.compute_imputation=true
params.compute_LDSC_matrix=true
params.compute_imputation=false
params.group = "$baseDir/input_files/group.txt"
group = file(params.group)
......@@ -25,6 +25,8 @@ ld_channel=Channel.fromPath("/pasteur/projets/policy01/PCMA/WKD_Hanna/impute_for
Region_channel = Channel.fromPath('/pasteur/projets/policy01/PCMA/jass_analysis_pipeline/input_files/fourier_ls-all.bed')
Region_channel2 = Channel.fromPath('/pasteur/projets/policy01/PCMA/jass_analysis_pipeline/input_files/fourier_ls-all.bed')
extract_sample_size_script_channel = Channel.fromPath('/pasteur/projets/policy01/PCMA/jass_analysis_pipeline/extract_sample_size.py')
process Compute_MAF{
input:
file ref_panel from ref_chr_channel3.collect()
......@@ -157,12 +159,18 @@ process Do_not_Impute_GWAS {
input:
file gwas_files from cleaned_gwas_chr_channel2.collect()
output:
file "*.txt" into not_imputed_gwas_channel
file "*.txt" into not_imputed_gwas_channel2
file "clean_gwas/*.txt" into not_imputed_gwas_channel
file "clean_gwas/*.txt" into not_imputed_gwas_channel2
when:
!params.compute_imputation
script:
"""
if [ ! -d "clean_gwas" ]
then
mkdir clean_gwas
fi
cp -L *.txt ./clean_gwas
"""
}
......@@ -175,14 +183,14 @@ process Munge_LDSC_data {
input:
file clean_gwas from cleaned_gwas
file extract_sample_size_script from extract_sample_size_script_channel
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 ${baseDir}/extract_sample_size.py ${clean_gwas} ${GWAS_labels})
Nsamp=\$(python2.7 ${extract_sample_size_script} ${clean_gwas} ${GWAS_labels})
if [ ! -d "ldsc_data" ]
then
......@@ -301,7 +309,7 @@ process Create_inittable {
date_init=\$(date +"%m_%d_%Y-%H:%M")
init_name="inittable_NO_LDSC_\$date_init.hdf5"
jass create-inittable --input-data-path "\$e" --regions-map-path ${Regions} --description-file-path ${GWAS_labels} --init-table-path inittable_no_LDSC.hdf5
jass create-inittable --input-data-path "\$e" --regions-map-path ${Regions} --description-file-path ${GWAS_labels} --init-table-path inittable_no_LDSC.hdf5 --init-covariance-path ${baseDir}/Correlation_matrices/Covariance_matrix_H0.csv
"""
}
......
......@@ -21,12 +21,12 @@ singularity {
process{
executor='slurm'
maxErrors=10
maxRetries=3
maxErrors=10
maxRetries=3
maxForks=400
queueSize=500
errorStrategy='retry'
cache='deep'
cache='deep'
withName: 'Compute_MAF' {
......@@ -44,7 +44,6 @@ process{
cpus=1
}
withName: 'Clean_GWAS' {
//container='jass_preprocessing_1.0--py_0.sif'
cpus=1
......@@ -55,7 +54,6 @@ process{
cpus=1
}
withName: 'Munge_LDSC_data' {
container='ldsc_1.0.1--py_0.sif'
cpus=1
......@@ -63,7 +61,7 @@ process{
withName: 'Generate_trait_pair' {
container='jass_preprocessing_1.0--py_0.sif'
cpus=1
cpus=1
}
withName: 'Correlation_LDSC_data' {
......
......@@ -33,7 +33,7 @@ module load singularity/3.4.0
cd /pasteur/projets/policy01/PCMA/jass_analysis_pipeline
source /pasteur/homes/hjulienn/jass_suite/jass_suite/bin/activate
nextflow run jass_pipeline.nf -with-report jass_report.html -with-timeline jass_timeline.html -with-dag dag.png
nextflow run jass_pipeline.nf -resume -with-report jass_report.html -with-timeline jass_timeline.html -with-dag dag.png
# Finish the script
deactivate
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment