Skip to content
Snippets Groups Projects
Commit a16efa76 authored by Rachel  LEGENDRE's avatar Rachel LEGENDRE
Browse files

Upload New File

parent 46c9d0f2
Branches
No related tags found
No related merge requests found
#########################################################################
# RNAsig: an automated pipeline to detect RNA signatures on viruses #
# #
# Authors: Rachel Legendre #
# Copyright (c) 2020-2021 Institut Pasteur (Paris). #
# #
# This file is part of RNAsig workflow. #
# #
# RNAsig 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. #
# #
# RNAsig 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 RNAsig (LICENSE). #
# If not, see <https://www.gnu.org/licenses/>. #
#########################################################################
rule adapters:
input:
fastq = __adapters__input_fastq
output:
__adapters__output
params:
wkdir = __adapters__wkdir,
options = __adapters__options,
adapters = __adapters__adapt_list,
mode = __adapters__mode,
min = __adapters_min,
qual = __adapters_qual
singularity:
"chipuana.img"
threads: config['adapters']['threads'] if 'threads' in config['adapters'] else 4
log:
__adapters__log
shell:
"""
set +o pipefail
tmp="{input}"
infiles=($tmp)
tmp="{output}"
outfiles=($tmp)
cmd="cutadapt "
# add mode and adapter sequences
cmd+=" -{params.mode} {params.adapters} -m {params.min} -q {params.qual} {params.options} "
# paired end or single end
if [[ ${{#infiles[@]}} -eq 2 ]];
then
cmd+=" -o ${{outfiles[0]}} -p ${{outfiles[1]}} ${{infiles[0]}} ${{infiles[1]}} "
else
cmd+=" -o ${{outfiles[0]}} ${{infiles[0]}}"
fi
#run command
eval "${{cmd}} > {log}"
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment