Skip to content
Snippets Groups Projects
Commit 4af9f0b1 authored by Dominik Burri's avatar Dominik Burri
Browse files

ALFA (un)stranded works for chr21.bam #18

parent d59c4f5d
No related branches found
No related tags found
1 merge request!39Alfa qc
Pipeline #10067 passed
......@@ -149,27 +149,31 @@ rule generate_alfa_index:
singularity:
"docker://zavolab/alfa:1.1.1"
log:
"generate_alfa_index.log"
"logs/generate_alfa_index.log"
shell:
"alfa -a {input.gtf} \
-g {params.genome_index} \
-p {threads} \
-o {params.out_dir} &> {log}"
# TODO: test with chr21.bam
# add singularity-args to this chr21.bam path
rule star_rpm_stranded:
''' Create stranded bedgraph coverage with STARs RPM normalisation '''
input:
"/scicore/home/zavolan/burri0000/test_alfa/sample/chr21.bam"
bam = "/scicore/home/zavolan/burri0000/test_alfa/sample/chr21.bam"
output:
"/scicore/home/zavolan/burri0000/rnaseqpipeline/star_rpm/STAR_Signal.UniqueMultiple.str1.out.bg",
"/scicore/home/zavolan/burri0000/rnaseqpipeline/star_rpm/STAR_Signal.UniqueMultiple.str2.out.bg"
str1 = ("/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/STAR_Signal.Unique.str1.out.bg",
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/STAR_Signal.UniqueMultiple.str1.out.bg"),
str2 = ("/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/STAR_Signal.UniqueMultiple.str2.out.bg",
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/STAR_Signal.UniqueMultiple.str2.out.bg")
params:
out_dir = "/scicore/home/zavolan/burri0000/rnaseqpipeline/star_rpm/",
filenameprefix = "/scicore/home/zavolan/burri0000/rnaseqpipeline/star_rpm/STAR_"
out_dir = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/",
filenameprefix = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/STAR_"
singularity:
"docker://zavolab/star:2.6.0a"
threads: 4
log: "logs/star_rpm.log"
log: "logs/star_rpm_stranded.log"
shell:
"""
(mkdir -p {params.out_dir}; \
......@@ -177,31 +181,38 @@ rule star_rpm_stranded:
STAR \
--runMode inputAlignmentsFromBAM \
--runThreadN {threads} \
--inputBAMfile {input} \
--inputBAMfile {input.bam} \
--outWigType "bedGraph" \
--outWigStrand "Stranded" \
--outWigNorm "RPM" \
--outFileNamePrefix {params.filenameprefix}) &> {log}
"""
# TODO: test with chr21.bam
rule run_alfa_bg_stranded:
''' Run ALFA from stranded bedgraph files '''
input:
str1 = "/scicore/home/zavolan/burri0000/rnaseqpipeline/star_rpm/STAR_Signal.UniqueMultiple.str1.out.bg",
str2 = "/scicore/home/zavolan/burri0000/rnaseqpipeline/star_rpm/STAR_Signal.UniqueMultiple.str2.out.bg"
str1 = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/STAR_Signal.UniqueMultiple.str1.out.bg",
str2 = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/STAR_Signal.UniqueMultiple.str2.out.bg"
output:
directory("output/")
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/ALFA_plots.Biotypes.pdf",
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_stranded/ALFA_plots.Categories.pdf"
params:
genome_index = "sorted_genes"
out_dir = "alfa_stranded",
in_file_str1 = "STAR_Signal.UniqueMultiple.str1.out.bg",
in_file_str2 = "STAR_Signal.UniqueMultiple.str2.out.bg",
genome_index = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_index/sorted_genes",
name_str1 = "test_chr21_str1",
name_str2 = "test_chr21_str2"
singularity:
"docker://zavolab/alfa:1.1.1"
log: "../logs/alfa_bg_stranded.log"
shell:
"""
cd {params.out_dir}; \
alfa -g {params.genome_index} \
-bedgraph {input} \
-s forward; \
alfa -g {params.genome_index} \
-bedgraph {input} \
-s reverse \
-o {output}
--bedgraph {params.in_file_str1} {params.name_str1} {params.in_file_str2} {params.name_str2} \
&> {log}
"""
rule star_rpm_unstranded:
......@@ -209,14 +220,15 @@ rule star_rpm_unstranded:
input:
bam = "/scicore/home/zavolan/burri0000/test_alfa/sample/chr21.bam"
output:
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/star_rpm/STAR_Signal.UniqueMultiple.str1.out.bg"
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_unstranded/STAR_Signal.Unique.str1.out.bg",
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_unstranded/STAR_Signal.UniqueMultiple.str1.out.bg"
params:
out_dir = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/star_rpm/",
filenameprefix = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/star_rpm/STAR_"
out_dir = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_unstranded/",
filenameprefix = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_unstranded/STAR_"
singularity:
"docker://zavolab/star:2.6.0a"
threads: 4
log: "logs/star_rpm.log"
log: "logs/star_rpm_unstranded.log"
shell:
"""
(mkdir -p {params.out_dir}; \
......@@ -234,12 +246,12 @@ rule star_rpm_unstranded:
rule run_alfa_bg_unstranded:
''' Run ALFA from unstranded bedgraph files '''
input:
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/star_rpm/STAR_Signal.UniqueMultiple.str1.out.bg"
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_unstranded/STAR_Signal.UniqueMultiple.str1.out.bg"
output:
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/star_rpm/ALFA_plots.Biotypes.pdf",
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/star_rpm/ALFA_plots.Categories.pdf"
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_unstranded/ALFA_plots.Biotypes.pdf",
"/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_unstranded/ALFA_plots.Categories.pdf"
params:
out_dir = "star_rpm",
out_dir = "alfa_unstranded",
in_file = "STAR_Signal.UniqueMultiple.str1.out.bg",
genome_index = "/scicore/home/zavolan/burri0000/rnaseqpipeline/snakemake/alfa_index/sorted_genes",
name = "test_chr21"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment