Skip to content

Commit 08d76a7

Browse files
committed
Adding splicing annotation script
1 parent 52f972a commit 08d76a7

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

workflow/rules/leafcutter.smk

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ rule leafcutter_gtf2exons:
2424
gtf = gtf_file
2525
output:
2626
exons = join(workpath, "temp", "exons.tsv.gz"),
27-
ann = join(workpath, "temp", "exon_annotation.tsv"),
27+
exon_ann = join(workpath, "temp", "exon_annotation.tsv"),
28+
splice_ann = join(workpath, "temp", "splicing_annotation.tsv"),
2829
params:
2930
rname = "gtf2exons",
30-
pyscript = join(workpath, "workflow", "scripts", "exon_annotation.py"),
31+
ex_script = join(workpath, "workflow", "scripts", "exon_annotation.py"),
32+
sp_script = join(workpath, "workflow", "scripts", "splicing_annotation.py"),
3133
resources:
3234
mem = allocated("mem", "leafcutter_gtf2exons", cluster),
3335
time = allocated("time", "leafcutter_gtf2exons", cluster),
@@ -51,9 +53,18 @@ rule leafcutter_gtf2exons:
5153
# transcript_name, exon_id, exon_number,
5254
# exon_start, exon_end, exon_length
5355
echo 'Getting detailed exon information...'
54-
{params.pyscript} \\
56+
{params.ex_script} \\
5557
--input {input.gtf} \\
56-
--output {output.ann}
58+
--output {output.exon_ann}
59+
# Get splicing annotation for each
60+
# transcript, contains information
61+
# about the location, number, and
62+
# and exon_id of each exon that
63+
# makes up the transcript
64+
echo 'Getting splicing annotation...'
65+
{params.sp_script} \\
66+
--exon-ann {output.exon_ann} \\
67+
--output {output.splice_ann}
5768
"""
5869

5970

0 commit comments

Comments
 (0)