-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_calculate_splice_stability.smk
31 lines (23 loc) · 1.32 KB
/
run_calculate_splice_stability.smk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from pathlib import Path
INPUT_DIR="/SAN/vyplab/alb_projects/data/4su_full_ward_tdp_kd_ipsc/HISAT3N/"
OUTPUT_DIR="/SAN/vyplab/alb_projects/data/4su_full_ward_tdp_kd_ipsc/spliced_read_stability/"
ANNOTATED_JUNCTIONS="/SAN/vyplab/first_weeks/TDP_CHX_CLONES_GLIA/chx/majiq/delta_psi_voila_tsv/CycloheximideControl-CycloheximideTDP43KD_annotated_junctionscryptic_clusters.bed"
bam_suffix = '.sorted.bam'
basenameBed = Path(ANNOTATED_JUNCTIONS).stem
SAMPLES = [f.replace(bam_suffix, "") for f in os.listdir(INPUT_DIR) if f.endswith(bam_suffix)]
rule all:
input:
expand(OUTPUT_DIR + "{sample}" + "_" + basenameBed + "_spliced_counts.csv", sample = SAMPLES)
rule calculate_splice_stability:
input:
bamfile = INPUT_DIR + "{sample}" + bam_suffix
output:
outputfile = OUTPUT_DIR + "{sample}" + "_" + basenameBed + "_spliced_counts.csv"
shell:
"""
echo {input.bamfile}
python3 scripts/calculate_splice_stability.py -b {input.bamfile} -r {ANNOTATED_JUNCTIONS} -o {output.outputfile}
"""
# expected TDP43kd_1_8h_controlHumphreyCorticalNeuron-TDP43KDHumphreyCorticalNeuron_annotated_junctionscryptic_clusters_spliced_counts.csv
# output TDP43kd_1_8h.snpmasked_controlHumphreyCorticalNeuron-TDP43KDHumphreyCorticalNeuron_annotated_junctionscryptic_clusters_spliced_counts.csv