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

Update feature_counts

parent b4aa7c1d
Branches
Tags
No related merge requests found
#########################################################################
# 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 feature_counts:
"""
Feature counts (subread) is a highly efficient general-purpose read summarization program that counts mapped reads for genomic features such as genes, exons, promoter, gene bodies, genomic bins and chromosomal locations.
:reference: http://bioinf.wehi.edu.au/featureCounts/
Required input:
__feature_counts__input: sorted bam file
Required output:
__feature_counts__output_count: output tabulated-delimited file
__feature_counts__output_gene_count: output formatted tab-delimited file
Config:
.. code-block:: yaml
feature_counts:
gff: " " #path to the GFF/GTF annotation file
options: " " #options for featureCounts you want use
"""
input:
bam = __feature_counts__input
output:
count = __feature_counts__output_count,
gene_count = __feature_counts__output_gene_count
params:
gff = __feature_counts__gff,
mapp = config['feature_counts']["options"] # -t exon
log:
__feature_counts__log
threads:
config['feature_counts']['threads']
run:
shell("""featureCounts -T {threads} {params.mapp} \
-a {params.gff} -o {output.count} {input.bam} 2> {log}""")
shell("""cut -f 1,7- {output.count} | sed '2d' > {output.gene_count}""")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment