Skip to content

Commit

Permalink
Adding sqanti ML filter rule
Browse files Browse the repository at this point in the history
  • Loading branch information
skchronicles committed Sep 19, 2023
1 parent a5ae210 commit 1d0d08c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
5 changes: 5 additions & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ rule all:
# Characterize and annotate collapsed transcripts from flair
# @imported from `rule sqanti_qc` in rules/sqanti.smk
join(workpath, "project", "counts", "novel", "sqanti.isoforms_classification.txt"),
# SQANTI3 ML Filter, known/novel isoform quantification
# Filters characterized transcripts from Sqanti QC
# @imported from `rule sqanti_ml_filter` in rules/sqanti.smk
join(workpath, "project", "counts", "novel", "sqanti.isoforms_MLresult_classification.txt"),
# Nanopolish polyA tail length estimation,
# needs index to map basecalled reads to
# raw signal from the ONT sequencer
Expand Down Expand Up @@ -332,3 +336,4 @@ include: join("rules", "editing_a-to-i.smk")
include: join("rules", "polya.smk")
include: join("rules", "diffexp.smk")
include: join("rules", "altsplice.smk")
include: join("rules", "hooks.smk")
30 changes: 28 additions & 2 deletions workflow/rules/sqanti.smk
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,35 @@ rule sqanti_ml_filter:
https://github.com/ConesaLab/SQANTI3/wiki/
Github: https://github.com/ConesaLab/SQANTI3
@Input:
Sqanti Classification file (TSV)
@Output:
Sqanti Classification file (TSV),
Corrected Annotation (GTF),
Corrected Transcriptome (FASTA)
@Input:
ML Filtered Sqanti Classification file (TSV),
ML Filtered Corrected Annotation (GTF),
ML Filtered Corrected Transcriptome (FASTA)
"""
input:
txt = join(workpath, "project", "counts", "novel", "sqanti.isoforms_classification.txt"),
fa = join(workpath, "project", "counts", "novel", "sqanti.isoforms_corrected.fasta"),
gtf = join(workpath, "project", "counts", "novel", "sqanti.isoforms_corrected.gtf"),
output:
txt = join(workpath, "project", "counts", "novel", "sqanti.isoforms_MLresult_classification.txt"),
fa = join(workpath, "project", "counts", "novel", "sqanti.isoforms.filtered.fasta"),
gtf = join(workpath, "project", "counts", "novel", "sqanti.isoforms.filtered.gtf"),
params:
rname = "sqanti_ml_filter",
prefix = "sqanti.isoforms",
outdir = join(workpath, "project", "counts", "novel"),
container: depending(config['images']['sqanti3'], use_singularity),
threads: int(allocated("threads", "sqanti_ml_filter", cluster)),
shell: """
# Applies ML filter on selected
# SQANTI3 QC classification file
sqanti3_filter.py ML \\
--output {params.prefix} \\
--dir {params.outdir} \\
--gtf {input.gtf} \\
--isoforms {input.fa} \\
{input.txt}
"""

0 comments on commit 1d0d08c

Please sign in to comment.