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

add star

parent 4d43cdbd
No related branches found
No related tags found
No related merge requests found
...@@ -23,41 +23,21 @@ ...@@ -23,41 +23,21 @@
rule feature_counts: 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: input:
bam = __feature_counts__input bam = __feature_counts__input
output: output:
count = __feature_counts__output_count, full_count = __feature_counts__output_count,
gene_count = __feature_counts__output_gene_count gene_count = __feature_counts__output_gene_count
params: params:
gff = __feature_counts__gff, gff = __feature_counts__gff,
mapp = config['feature_counts']["options"] # -t exon mapp = config['feature_counts']["options"] # -t exon
log: log:
__feature_counts__log err = __feature_counts__logs_err,
out = __feature_counts__logs_out
threads: threads:
config['feature_counts']['threads'] config['feature_counts']['threads']
run: run:
shell("""featureCounts -T {threads} {params.mapp} \ shell("""featureCounts -T {threads} {params.mapp} \
-a {params.gff} -o {output.count} {input.bam} 2> {log}""") -a {params.gff} -o {output.full_count} {input.bam} > {log.out} 2> {log.err}""")
shell("""cut -f 1,7- {output.count} | sed '2d' > {output.gene_count}""") shell("""cut -f 1,7- {output.full_count} | sed '2d' > {output.gene_count}""")
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
rule star_index: rule star_index:
input: input:
fasta = __star_index__fasta fasta = __star_index__fasta
output: output:
......
#########################################################################
# 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 star_mapping:
input:
fastq = __star_mapping__input,
index = __star_mapping__index_done
log:
__star_mapping__logs
output:
__star_mapping__sort
params:
prefix = temp(__star_mapping__output_prefix),
index = __star_mapping__index,
#read_groups = __star_mapping__read_groups,
kwargs = config['star_mapping']['options']
threads:
config['star_mapping']['threads']
shell:
"""
STAR --genomeDir {params.index} \
--readFilesIn {input.fastq} \
--runThreadN {threads} \
--genomeLoad NoSharedMemory \
--outSAMtype BAM SortedByCoordinate \
--readFilesCommand zcat \
--seedSearchStartLmax 20 \
--outFileNamePrefix {params.prefix1} \
{params.kwargs} 2> {log}
samtools index {params.prefix}Aligned.sortedByCoord.out.bam 2>> {log}
"""
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment