Commit 0414cb1a authored by Blaise Li's avatar Blaise Li
Browse files

No DESeq2 and replicates comparison if REPS == 1.

parent 14b5f981
......@@ -394,25 +394,28 @@ if contrasts_dict["de"]:
else:
de_fold_boxplots = []
de_files = [
expand(
de_files = []
if len(REPS) > 1:
de_files += expand(
OPJ(aligner, f"mapped_{genome}", "{counter}",
"deseq2_{mapped_type}", "{contrast}", "{orientation}_{biotype}", "{contrast}_counts_and_res.txt"),
counter=COUNTERS, mapped_type=[f"on_{genome}", f"unique_on_{genome}"],
contrast=DE_CONTRASTS, orientation=ORIENTATIONS, biotype=DE_BIOTYPES),
expand(
contrast=DE_CONTRASTS, orientation=ORIENTATIONS, biotype=DE_BIOTYPES)
de_files += expand(
OPJ(aligner, f"mapped_{genome}", "{counter}",
"deseq2_{mapped_type}", "{contrast}", "{orientation}_{biotype}", "{contrast}_{fold_type}_distribution.pdf"),
counter=COUNTERS, mapped_type=[f"on_{genome}", f"unique_on_{genome}"],
contrast=DE_CONTRASTS, orientation=ORIENTATIONS, biotype=DE_BIOTYPES,
fold_type=["log2FoldChange"]),
expand(
fold_type=["log2FoldChange"])
de_files += expand(
OPJ(aligner, f"mapped_{genome}", "{counter}",
"deseq2_{mapped_type}", "{contrast}", "{orientation}_{biotype}", "{contrast}_MA_with_{id_list}.pdf"),
counter=COUNTERS, mapped_type=[f"on_{genome}", f"unique_on_{genome}"],
contrast=DE_CONTRASTS, orientation=ORIENTATIONS, biotype=DE_BIOTYPES,
id_list=ID_LISTS + ["lfc_statuses"]),
de_fold_boxplots]
id_list=ID_LISTS + ["lfc_statuses"])
de_files += de_fold_boxplots
else:
warnings.warn("DESeq2 analyses will not be run because there are not enough replicates.\n")
bigwig_files = [
# expand(
......@@ -446,6 +449,34 @@ if spikein_microliter_equivalent:
else:
spikein_files = []
replicates_comparisons = []
if len(REPS) > 1:
## TODO: debug:
# Something to do with partial expand on quantification type?
# Missing input files for rule compare_replicates:
# results_44hph/hisat2/mapped_C_elegans/{counter}/all_{mapped_type}/{biotype}_{orientation}_RPM.txt
# MissingInputException in line 1646 of /home/bli/src/bioinfo_utils/RNA-seq/RNA-seq.snakefile:
# Missing input files for rule differential_expression:
# results_44hph_vs_38hph/hisat2/mapped_C_elegans/{counter}/all_{mapped_type}/{biotype}_{orientation}_counts.txt
# see https://bitbucket.org/snakemake/snakemake/issues/956/placeholders-not-properly-matched-with
replicates_comparisons.extend(
expand(
OPJ(aligner, f"mapped_{genome}", "{counter}",
"all_{mapped_type}", "replicates_comparison",
"{lib}", "{biotype}_{orientation}_{quantif_type}_correlations.txt"),
counter=COUNTERS, mapped_type=[f"on_{genome}", f"unique_on_{genome}"],
lib=LIBS, biotype=["alltypes"],
orientation=ORIENTATIONS, quantif_type=["TPM"]))
replicates_comparisons.extend(
expand(
OPJ(aligner, f"mapped_{genome}", "{counter}",
"all_{mapped_type}", "replicates_comparison",
"{lib}", "{biotype}_{orientation}_{quantif_type}_correlations.txt"),
counter=COUNTERS, mapped_type=[f"on_{genome}", f"unique_on_{genome}"],
lib=LIBS, biotype=BIOTYPES + ["alltypes"],
orientation=ORIENTATIONS, quantif_type=["counts", "RPM"]))
else:
warnings.warn("Replicates comparisons will not be run because there are not enough replicates.\n")
rule all:
input:
......@@ -476,28 +507,7 @@ rule all:
de_files,
ip_fold_boxplots,
counts_files,
## TODO: debug:
# Something to do with partial expand on quantification type?
# Missing input files for rule compare_replicates:
# results_44hph/hisat2/mapped_C_elegans/{counter}/all_{mapped_type}/{biotype}_{orientation}_RPM.txt
# MissingInputException in line 1646 of /home/bli/src/bioinfo_utils/RNA-seq/RNA-seq.snakefile:
# Missing input files for rule differential_expression:
# results_44hph_vs_38hph/hisat2/mapped_C_elegans/{counter}/all_{mapped_type}/{biotype}_{orientation}_counts.txt
# see https://bitbucket.org/snakemake/snakemake/issues/956/placeholders-not-properly-matched-with
expand(
OPJ(aligner, f"mapped_{genome}", "{counter}",
"all_{mapped_type}", "replicates_comparison",
"{lib}", "{biotype}_{orientation}_{quantif_type}_correlations.txt"),
counter=COUNTERS, mapped_type=[f"on_{genome}", f"unique_on_{genome}"],
lib=LIBS, biotype=["alltypes"],
orientation=ORIENTATIONS, quantif_type=["TPM"]),
expand(
OPJ(aligner, f"mapped_{genome}", "{counter}",
"all_{mapped_type}", "replicates_comparison",
"{lib}", "{biotype}_{orientation}_{quantif_type}_correlations.txt"),
counter=COUNTERS, mapped_type=[f"on_{genome}", f"unique_on_{genome}"],
lib=LIBS, biotype=BIOTYPES + ["alltypes"],
orientation=ORIENTATIONS, quantif_type=["counts", "RPM"]),
replicates_comparisons,
##
......
Supports Markdown
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