From 8ee4c5adbc8bc1036e412c28cc358dfbf5169bb8 Mon Sep 17 00:00:00 2001 From: rlegendr <rachel.legendre@pasteur.fr> Date: Fri, 17 Sep 2021 16:58:08 +0200 Subject: [PATCH] add minimap2 --- config/config.yaml | 28 +++++++++++++++++-- workflow/rules/minimap2.rules | 52 +++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 3 deletions(-) create mode 100755 workflow/rules/minimap2.rules diff --git a/config/config.yaml b/config/config.yaml index 02693fd..d3e76ee 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -116,6 +116,7 @@ adapters: # # :Parameters: # +# - do: if unchecked, this rule is ignored # - options: any options recognised by bowtie2 tool # - threads: number of threads to be used #=============================================================================== @@ -131,6 +132,7 @@ bowtie2_mapping: # # :Parameters: # +# - do: if unchecked, this rule is ignored # - options: any options recognised by bowtie2 tool # - threads: number of threads to be used #=============================================================================== @@ -142,11 +144,29 @@ star_mapping: options: "--outFilterMismatchNoverLmax 0.05 --outSAMunmapped Within --sjdbOverhang 250" threads: 4 + +#=============================================================================== +# Mapping with minimap2 +# +# :Parameters: +# +# - do: if unchecked, this rule is ignored +# - options: any options recognised by minimap2 tool +# - threads: number of threads to be used +#=============================================================================== + + +minimap2: + do: yes + options: "-ax sr" + threads: 4 + #=============================================================================== # pseudo mapping with kallisto # # :Parameters: # +# - do: if unchecked, this rule is ignored # - fasta: Fasta file for the kallisto index to be used for quantification # - gtf: GTF file for transcriptome information (required for --genomebam) # - kmer: k-mer (odd) length (default: 31, max value: 31) @@ -189,12 +209,14 @@ feature_counts: # # - do: if unchecked, this rule is ignored # - options: options related to deeptools -# see https://deeptools.readthedocs.io/en/latest/content/feature/effectiveGenomeSize.html -# for more information about effective Genome Size +# see https://deeptools.readthedocs.io/en/latest/content/feature/effectiveGenomeSize.html +# for more information about effective Genome Size +# - threads: number of threads to be used bamCoverage: do: yes - options: "--filterRNAstrand forward --effectiveGenomeSize 2913022398 " + options: "--filterRNAstrand forward --effectiveGenomeSize 120000 " + options_host: "--filterRNAstrand forward --effectiveGenomeSize 2913022398 " threads: 4 diff --git a/workflow/rules/minimap2.rules b/workflow/rules/minimap2.rules new file mode 100755 index 0000000..d4f7325 --- /dev/null +++ b/workflow/rules/minimap2.rules @@ -0,0 +1,52 @@ +######################################################################### +# RNAflow: an automated pipeline to analyse transcriptomic data # +# # +# Authors: Rachel Legendre # +# Copyright (c) 2021-2022 Institut Pasteur (Paris). # +# # +# This file is part of RNAflow workflow. # +# # +# RNAflow is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# RNAflow is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details . # +# # +# You should have received a copy of the GNU General Public License # +# along with RNAflow (LICENSE). # +# If not, see <https://www.gnu.org/licenses/>. # +######################################################################### + + + +rule minimap2: + input: + fastq = minimap2_input, + fasta = minimap2_genome + output: + sort = minimap2_sort, + bam = temp(minimap2_bam) + singularity: + "rnaflow.img" + log: + err = minimap2_logs_err, + out = minimap2_logs_out + params: + options = minimap2_options + threads: + config["minimap2"]["threads"] + envmodules: + "minimap2/2.17", + "samtools" + shell: + """ + minimap2 {params.options} -t {threads} {input.fasta} {input.fastq} | samtools view -Sbh - > {output.bam} + samtools sort -o {output.sort} {output.bam} + samtools index {output.sort} + + + """ -- GitLab