diff --git a/.test/config_lint.yaml b/.test/config_lint.yaml index d0e1e57..e043334 100644 --- a/.test/config_lint.yaml +++ b/.test/config_lint.yaml @@ -11,10 +11,11 @@ samplemanifest: "/opt2/.test/samples.test_lintr.tsv" # User parameters ##################################################################################### # run sample contrasts -run_contrasts: "Y" # Y or N +run_contrasts: true contrasts: "/opt2/.test/contrasts.test.tsv" # run_contrasts needs to be "Y" -contrasts_fdr_cutoff: "0.05" -contrasts_lfc_cutoff: "0.59" # FC of 1.5 +contrasts_fdr_cutoff: 0.05 +contrasts_lfc_cutoff: 0.59 # FC of 1.5 +run_go_enrichment: true # reference genome: "hg38" # currently supports hg38, hg19 and mm10. Custom genome can be added with appropriate additions to "reference" section below. diff --git a/config/config.yaml b/config/config.yaml index 0bf0d34..7e85729 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -17,10 +17,11 @@ samplemanifest: "WORKDIR/config/samples.tsv" # User parameters ##################################################################################### # run sample contrasts -run_contrasts: "Y" # Y or N -contrasts: "WORKDIR/config/contrasts.tsv" # run_contrasts needs to be "Y" -contrasts_fdr_cutoff: "0.05" -contrasts_lfc_cutoff: "0.59" # FC of 1.5 +run_contrasts: true # true or false, no quotes +contrasts: "WORKDIR/config/contrasts.tsv" # run_contrasts needs to be `true` +contrasts_fdr_cutoff: 0.05 +contrasts_lfc_cutoff: 0.59 # FC of 1.5 +run_go_enrichment: false # this step is long-running. use `true` if you would like to run it. # reference genome: "hg38" # currently supports hg38, hg19 and mm10. Custom genome can be added with appropriate additions to "reference" section below. diff --git a/docs/user-guide/preparing-files.md b/docs/user-guide/preparing-files.md index 18f3d7c..547738a 100644 --- a/docs/user-guide/preparing-files.md +++ b/docs/user-guide/preparing-files.md @@ -30,7 +30,7 @@ The pipeline allows for the use of a species specific spike-in control, or the u For example for ecoli spike-in: ``` -run_contrasts: "Y" +run_contrasts: true norm_method: "spikein" spikein_genome: "ecoli" spikein_reference: @@ -41,7 +41,7 @@ spikein_reference: For example for drosophila spike-in: ``` -run_contrasts: "Y" +run_contrasts: true norm_method: "spikein" spikein_genome: "drosophila" spikein_reference: diff --git a/workflow/Snakefile b/workflow/Snakefile index 011e479..3d808ba 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -97,7 +97,7 @@ def run_qc(wildcards): def run_contrasts(wildcards): files=[] - if config["run_contrasts"] == "Y": + if config["run_contrasts"]: files.append(join(RESULTSDIR,"replicate_sample.tsv")) # inputs for matrix @@ -159,7 +159,7 @@ def get_rose(wildcards): def get_enrichment(wildcards): files=[] - if config["run_contrasts"] == "Y": + if config["run_contrasts"] and config['run_go_enrichment']: if (GENOME == "hg19") or (GENOME == "hg38"): if ("macs2_narrow" in PEAKTYPE) or ("macs2_broad" in PEAKTYPE): t=expand(join(RESULTSDIR,"peaks","{qthresholds}","{peak_caller}","annotation","go_enrichment","{contrast_list}.{dupstatus}.txt"),peak_caller="macs2",qthresholds=QTRESHOLDS,contrast_list=CONTRAST_LIST,dupstatus=DUPSTATUS) diff --git a/workflow/rules/annotations.smk b/workflow/rules/annotations.smk index e88d864..389b18c 100644 --- a/workflow/rules/annotations.smk +++ b/workflow/rules/annotations.smk @@ -256,7 +256,7 @@ rule rose: echo "Less than 5 usable peaks detected (N=${{num_of_peaks}})" > {output.super_summit} fi """ -if config["run_contrasts"] == "Y": +if config["run_contrasts"]: rule create_contrast_peakcaller_files: """ Reads in all of the output from Rules create_contrast_data_files which match the same peaktype and merges them together diff --git a/workflow/rules/init.smk b/workflow/rules/init.smk index 8aa464b..e4e729a 100644 --- a/workflow/rules/init.smk +++ b/workflow/rules/init.smk @@ -185,7 +185,7 @@ QTRESHOLDS=config["quality_thresholds"] QTRESHOLDS=list(map(lambda x:x.strip(),QTRESHOLDS.split(","))) # set contrast settings -if config["run_contrasts"] == "Y": +if config["run_contrasts"]: print("#"*100) print("# Checking constrasts to run...") contrasts_table = config["contrasts"]