diff --git a/CLIP/iCLIP.snakefile b/CLIP/iCLIP.snakefile index dc5e72ef8b5e5921c8937c8ce9271f509cb2e04c..b56f1546587c98699873869210a20cd486f2757a 100644 --- a/CLIP/iCLIP.snakefile +++ b/CLIP/iCLIP.snakefile @@ -32,6 +32,7 @@ from libworkflows import last_lines, ensure_relative, SHELL_FUNCTIONS, warn_cont from libworkflows import feature_orientation2stranded from libworkflows import sum_by_family, read_feature_counts, sum_feature_counts from smincludes import rules as irules +from smwrappers import wrappers_dir # Define functions to be used in shell portions shell.prefix(SHELL_FUNCTIONS) @@ -426,7 +427,7 @@ rule map_on_genome: err = OPJ(log_dir, "{trimmer}", aligner, "map_{read_type}_on_genome", "{lib}_{rep}.err"), threads: 12 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/map_on_genome" + f"file://{wrappers_dir}/map_on_genome" rule remap_on_genome: @@ -454,7 +455,7 @@ rule remap_on_genome: err = OPJ(log_dir, "{trimmer}", aligner, "remap_{read_type}_unmapped_on_genome", "{lib}_{rep}.err"), threads: 12 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/map_on_genome" + f"file://{wrappers_dir}/map_on_genome" rule sam2indexedbam: @@ -473,7 +474,7 @@ rule sam2indexedbam: resources: mem_mb=4100 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/sam2indexedbam" + f"file://{wrappers_dir}/sam2indexedbam" rule compute_mapping_stats: diff --git a/Degradome-seq/Degradome-seq.snakefile b/Degradome-seq/Degradome-seq.snakefile index d16a60ebc46d34f93552e0a9ac5fd192f8771b51..f91c701b5e8d57102f8f9b83ec3efe9528e9eb7b 100644 --- a/Degradome-seq/Degradome-seq.snakefile +++ b/Degradome-seq/Degradome-seq.snakefile @@ -20,6 +20,7 @@ from functools import reduce from operator import or_ as union from smincludes import rules as irules +from smwrappers import wrappers_dir from libworkflows import ( cleanup_and_backup, column_converter, @@ -169,7 +170,7 @@ rule map_on_genome: threads: 4 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/map_on_genome" + f"file://{wrappers_dir}/map_on_genome" rule sam2indexedbam: @@ -188,7 +189,7 @@ rule sam2indexedbam: resources: mem_mb=4100 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/sam2indexedbam" + f"file://{wrappers_dir}/sam2indexedbam" def biotype2annot(wildcards): @@ -395,7 +396,7 @@ rule compute_RPK: # rpk = 1000 * counts_data.loc[common].div(feature_lengths.loc[common]["union_exon_len"], axis="index") # rpk.to_csv(output.rpk_file, sep="\t") wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/compute_RPK" + f"file://{wrappers_dir}/compute_RPK" # Compute TPM using total number of mappers divided by genome length @@ -417,7 +418,7 @@ rule compute_TPM: # tpm = 1000000 * rpk / rpk.sum() # tpm.to_csv(output.tpm_file, sep="\t") wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/compute_TPM" + f"file://{wrappers_dir}/compute_TPM" # TODO: Is it better to compute the mean and then the fold of the means? diff --git a/PRO-seq/PRO-seq.snakefile b/PRO-seq/PRO-seq.snakefile index 7bf0fe83f5d0535bf1ee356a23a8858b397bf5f6..b1d73f0428049baa1a4837f56cd33a3fdcd95f2a 100644 --- a/PRO-seq/PRO-seq.snakefile +++ b/PRO-seq/PRO-seq.snakefile @@ -70,6 +70,7 @@ from libworkflows import sum_by_family from libworkflows import read_htseq_counts, sum_htseq_counts from libworkflows import read_feature_counts, sum_feature_counts from smincludes import rules as irules +from smwrappers import wrappers_dir alignment_settings = {"bowtie2": ""} @@ -490,7 +491,7 @@ rule map_on_genome: # eval ${{cmd}} 1>> {log.log} 2>> {log.err} # """ wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/map_on_genome" + f"file://{wrappers_dir}/map_on_genome" rule sam2indexedbam: @@ -509,7 +510,7 @@ rule sam2indexedbam: resources: mem_mb=4100 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/sam2indexedbam" + f"file://{wrappers_dir}/sam2indexedbam" rule fuse_bams: @@ -654,7 +655,7 @@ rule htseq_count_reads: log = OPJ(log_dir, "{trimmer}", "htseq_count_reads", "{lib}_{rep}_{biotype}_{orientation}.log"), err = OPJ(log_dir, "{trimmer}", "htseq_count_reads", "{lib}_{rep}_{biotype}_{orientation}.err") wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/htseq_count_reads" + f"file://{wrappers_dir}/htseq_count_reads" def parse_htseq_counts(counts_filename): @@ -963,7 +964,7 @@ rule compute_RPK: # rpk = 1000 * counts_data.loc[common].div(feature_lengths.loc[common]["union_exon_len"], axis="index") # rpk.to_csv(output.rpk_file, sep="\t") wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/compute_RPK" + f"file://{wrappers_dir}/compute_RPK" rule compute_sum_million_RPK: @@ -994,7 +995,7 @@ rule compute_TPM: # tpm = 1000000 * rpk / rpk.sum() # tpm.to_csv(output.tpm_file, sep="\t") wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/compute_TPM" + f"file://{wrappers_dir}/compute_TPM" @wc_applied diff --git a/RNA_Seq_Cecere/RNA-seq.snakefile b/RNA_Seq_Cecere/RNA-seq.snakefile index 9f32a1f9f7e53cd6d2d8426d96c56b7e04de4d0b..534c17404a4541ea43eb46f6942096520be74322 100644 --- a/RNA_Seq_Cecere/RNA-seq.snakefile +++ b/RNA_Seq_Cecere/RNA-seq.snakefile @@ -107,6 +107,7 @@ from libworkflows import read_htseq_counts, sum_htseq_counts from libworkflows import read_intersect_counts, sum_intersect_counts from libworkflows import read_feature_counts, sum_feature_counts from smincludes import rules as irules +from smwrappers import wrappers_dir alignment_settings = {"bowtie2": "", "hisat2": "", "crac": "-k 20 --stranded --use-x-in-cigar"} @@ -565,7 +566,7 @@ rule map_on_genome: #shell: # mapping_command(aligner) wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/map_on_genome" + f"file://{wrappers_dir}/map_on_genome" rule extract_nomap_polyU: @@ -618,7 +619,7 @@ rule remap_on_genome: #shell: # mapping_command(aligner) wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/map_on_genome" + f"file://{wrappers_dir}/map_on_genome" def source_sam(wildcards): @@ -658,7 +659,7 @@ rule sam2indexedbam: threads: 8 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/sam2indexedbam" + f"file://{wrappers_dir}/sam2indexedbam" rule compute_mapping_stats: @@ -837,7 +838,7 @@ def biotype2annot(wildcards): # log = OPJ(log_dir, "htseq_count_reads", "{lib}_{rep}_{biotype}_{orientation}.log"), # err = OPJ(log_dir, "htseq_count_reads", "{lib}_{rep}_{biotype}_{orientation}.err"), # wrapper: -# "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/htseq_count_reads" +# f"file://{wrappers_dir}/htseq_count_reads" def source_sorted_bam(wildcards): @@ -983,7 +984,7 @@ rule feature_count_reads: # err = OPJ(log_dir, "intersect_count_reads", "{lib}_{rep}_{biotype}_{orientation}.err"), # threads: 4 # to limit memory usage, actually # wrapper: -# "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/intersect_count_reads" +# f"file://{wrappers_dir}/intersect_count_reads" rule summarize_counts: @@ -1107,7 +1108,7 @@ rule compute_RPK: # rpk = 1000 * counts_data.loc[common].div(feature_lengths.loc[common]["union_exon_len"], axis="index") # rpk.to_csv(output.rpk_file, sep="\t") wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/compute_RPK" + f"file://{wrappers_dir}/compute_RPK" rule compute_sum_million_RPK: @@ -1142,7 +1143,7 @@ rule compute_TPM: # tpm = 1000000 * rpk / rpk.sum() # tpm.to_csv(output.tpm_file, sep="\t") wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/compute_TPM" + f"file://{wrappers_dir}/compute_TPM" # Useful to compute translation efficiency in the Ribo-seq pipeline diff --git a/Ribo-seq/Ribo-seq.snakefile b/Ribo-seq/Ribo-seq.snakefile index 4b0b89c6f4f00a481d9b5851a262646446ddb2d6..8d45d1555a4772a4e0332c88035d49fa87a0e15b 100644 --- a/Ribo-seq/Ribo-seq.snakefile +++ b/Ribo-seq/Ribo-seq.snakefile @@ -139,6 +139,7 @@ from libworkflows import get_chrom_sizes, column_converter, make_id_list_getter from libworkflows import read_int_from_file, strip_split, file_len, last_lines, save_plot, SHELL_FUNCTIONS from libworkflows import sum_by_family, read_feature_counts, sum_feature_counts, sum_htseq_counts, warn_context from smincludes import rules as irules +from smwrappers import wrappers_dir strip = str.strip alignment_settings = {"bowtie2": "-L 6 -i S,1,0.8 -N 0"} @@ -751,7 +752,7 @@ rule map_on_genome: threads: 4 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/map_on_genome" + f"file://{wrappers_dir}/map_on_genome" def source_sam(wildcards): @@ -785,7 +786,7 @@ rule sam2indexedbam: resources: mem_mb=4100 wrapper: - "file:///pasteur/homes/bli/src/bioinfo_utils/snakemake_wrappers/sam2indexedbam" + f"file://{wrappers_dir}/sam2indexedbam" rule compute_mapping_stats: diff --git a/snakemake_wrappers b/snakemake_wrappers index e8105a64fe84747d407b19ca8db69bd54b66cb2e..6bbed10e5ab6f8b195a0a562376fbc5bc487cb06 160000 --- a/snakemake_wrappers +++ b/snakemake_wrappers @@ -1 +1 @@ -Subproject commit e8105a64fe84747d407b19ca8db69bd54b66cb2e +Subproject commit 6bbed10e5ab6f8b195a0a562376fbc5bc487cb06