From 5e5da78e409d804c714c44d900f9b63bb2c0a1f0 Mon Sep 17 00:00:00 2001 From: Blaise Li <blaise.li__git@nsup.org> Date: Tue, 4 Dec 2018 17:55:18 +0100 Subject: [PATCH] No PCA when only one library. Also updated one gene list name. --- PRO-seq/PRO-seq.snakefile | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/PRO-seq/PRO-seq.snakefile b/PRO-seq/PRO-seq.snakefile index 7adb766..fba5319 100644 --- a/PRO-seq/PRO-seq.snakefile +++ b/PRO-seq/PRO-seq.snakefile @@ -169,7 +169,7 @@ ID_LISTS = [ "germline_specific", "histone", "spermatogenic_Ortiz_2014", "oogenic_Ortiz_2014", - "piRNA_dependent_prot_si_down4_WR_RT_top200", "piRNA_dependent_prot_si_down4", + "piRNA_dependent_prot_si_down4_WR_RT_top200", "piRNA_dependent_prot_si_22G_down4", "csr1_prot_si_supertargets_common"] annot_dir = config["annot_dir"] gene_lists_dir = "/pasteur/entites/Mhe/bli/Gene_lists" @@ -287,6 +287,14 @@ wildcard_constraints: # Define functions to be used in shell portions shell.prefix(SHELL_FUNCTIONS) +if len(CONDITIONS) < 2: + pca_figs = [] +else: + pca_figs = expand(OPJ( + output_dir, "{trimmer}", "figures", aligner, "{counter}", + "{biotype}_{orientation}_PCA.pdf"), + trimmer=TRIMMERS, counter=COUNTERS, biotype=COUNT_BIOTYPES, + orientation=ORIENTATIONS), rule all: """This top rule is used to drive the whole workflow by taking as input its final products.""" @@ -306,11 +314,12 @@ rule all: "deseq2", "{contrast}", "{orientation}_{biotype}", "counts_and_res.txt"), trimmer=TRIMMERS, counter=COUNTERS, contrast=CONTRASTS, orientation=ORIENTATIONS, biotype=DE_BIOTYPES), - expand(OPJ( - output_dir, "{trimmer}", "figures", aligner, "{counter}", - "{biotype}_{orientation}_PCA.pdf"), - trimmer=TRIMMERS, counter=COUNTERS, biotype=COUNT_BIOTYPES, - orientation=ORIENTATIONS), + pca_figs, + #expand(OPJ( + # output_dir, "{trimmer}", "figures", aligner, "{counter}", + # "{biotype}_{orientation}_PCA.pdf"), + # trimmer=TRIMMERS, counter=COUNTERS, biotype=COUNT_BIOTYPES, + # orientation=ORIENTATIONS), #expand(OPJ(output_dir, "{trimmer}", aligner, "mapped_C_elegans", "{counter}", "all_on_C_elegans", "alltypes_{orientation}_counts.txt"), trimmer=TRIMMERS, counter=COUNTERS, orientation=["all"]), #expand(expand(OPJ(output_dir, "{{trimmer}}", aligner, "mapped_C_elegans", "{{counter}}", "{lib}_{rep}_on_C_elegans", "{{biotype}}_{{orientation}}_counts.txt"), filtered_product, lib=LIBS, rep=REPS), trimmer=TRIMMERS, counter=COUNTERS, biotype=COUNT_BIOTYPES, orientation=["all"]), expand(expand(OPJ( -- GitLab