Newer
Older
"""General purpose RNA-Seq analysis pipeline developed by the Zavolan Lab"""
BIOPZ-Gypas Foivos
committed
import os
BIOPZ-Gypas Foivos
committed
# Get sample table
samples_table = pd.read_csv(
config['samples'],
header=0,
index_col=0,
comment='#',
engine='python',
sep="\t",
)
localrules: start, finish, rename_star_rpm_for_alfa, prepare_multiqc_config
# Create log directories
os.makedirs(
os.path.join(
os.getcwd(),
config['log_dir'],
),
BIOPZ-Katsantoni Maria
committed
exist_ok=True)
if cluster_config:
os.makedirs(
os.path.join(
os.getcwd(),
os.path.dirname(cluster_config['__default__']['out']),
),
BIOPZ-Katsantoni Maria
committed
exist_ok=True)
BIOPZ-Gypas Foivos
committed
# Include subworkflows
include: os.path.join("workflow", "rules", "paired_end.snakefile.smk")
include: os.path.join("workflow", "rules", "single_end.snakefile.smk")
BIOPZ-Katsantoni Maria
committed
"""
Rule for collecting outputs
"""
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
multiqc_report = os.path.join(
config['output_dir'],
"multiqc_summary"),
bigWig = expand(
os.path.join(
config["output_dir"],
"samples",
"{sample}",
"bigWig",
"{unique_type}",
"{sample}_{unique_type}_{strand}.bw"),
sample=samples_table.index.values,
strand=["plus", "minus"],
unique_type=["Unique", "UniqueMultiple"])
rule start:
'''
Get samples
'''
input:
reads = lambda wildcards:
samples_table.loc[wildcards.sample, wildcards.mate],
output:
reads = os.path.join(
config["output_dir"],
"samples",
"{sample}",
"start",
"{sample}.{mate}.fastq.gz")
log:
stderr = os.path.join(
config["log_dir"],
"samples",
"{sample}",
"start_{sample}.{mate}.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"samples",
"{sample}",
"start_{sample}.{mate}.stdout.log")
shell:
"(cp {input.reads} {output.reads}) \
1> {log.stdout} 2> {log.stderr} "
rule fastqc:
'''
A quality control tool for high throughput sequence data
'''
input:
reads = os.path.join(
config["output_dir"],
"samples",
"{sample}",
"start",
"{sample}.{mate}.fastq.gz")
output:
outdir = directory(
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
config["output_dir"],
"samples",
"{sample}",
"fastqc",
"{mate}"))
threads: 2
singularity:
"docker://zavolab/fastqc:0.11.9-slim"
log:
stderr = os.path.join(
config["log_dir"],
"samples",
"{sample}",
"fastqc_{mate}.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"samples",
"{sample}",
"fastqc_{mate}.stdout.log")
shell:
"(mkdir -p {output.outdir}; \
fastqc --outdir {output.outdir} {input.reads}) \
1> {log.stdout} 2> {log.stderr}"
BIOPZ-Iborra de Toledo Paula
committed
BIOPZ-Gypas Foivos
committed
rule create_index_star:
BIOPZ-Katsantoni Maria
committed
"""
Create index for STAR alignments
"""
input:
genome = lambda wildcards:
BIOPZ-Katsantoni Maria
committed
samples_table['genome']
[samples_table['organism'] == wildcards.organism]
[0],
BIOPZ-Katsantoni Maria
committed
samples_table['gtf']
[samples_table['organism'] == wildcards.organism]
[0]
output:
chromosome_info = os.path.join(
config['star_indexes'],
"{organism}",
"{index_size}",
"STAR_index",
BIOPZ-Katsantoni Maria
committed
"chrNameLength.txt"),
chromosomes_names = os.path.join(
config['star_indexes'],
"{organism}",
"{index_size}",
"STAR_index",
BIOPZ-Katsantoni Maria
committed
"chrName.txt")
params:
output_dir = os.path.join(
config['star_indexes'],
"{organism}",
"{index_size}",
BIOPZ-Katsantoni Maria
committed
"STAR_index"),
outFileNamePrefix = os.path.join(
config['star_indexes'],
"{organism}",
"{index_size}",
BIOPZ-Katsantoni Maria
committed
"STAR_index/STAR_"),
sjdbOverhang = "{index_size}"
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
stderr = os.path.join(
BIOPZ-Katsantoni Maria
committed
"{organism}_{index_size}_create_index_star.stderr.log"),
stdout = os.path.join(
config['log_dir'],
"{organism}_{index_size}_create_index_star.stdout.log")
shell:
"(mkdir -p {params.output_dir}; \
chmod -R 777 {params.output_dir}; \
STAR \
--runMode genomeGenerate \
--sjdbOverhang {params.sjdbOverhang} \
--genomeDir {params.output_dir} \
--genomeFastaFiles {input.genome} \
--runThreadN {threads} \
--outFileNamePrefix {params.outFileNamePrefix} \
BIOPZ-Katsantoni Maria
committed
--sjdbGTFfile {input.gtf}) \
1> {log.stdout} 2> {log.stderr}"
BIOPZ-Gypas Foivos
committed
BIOPZ-Iborra de Toledo Paula
committed
rule extract_transcriptome:
"""
Create transcriptome from genome and gene annotations
"""
BIOPZ-Iborra de Toledo Paula
committed
input:
genome = lambda wildcards:
samples_table['genome'][
samples_table['organism'] == wildcards.organism][0],
BIOPZ-Iborra de Toledo Paula
committed
gtf = lambda wildcards:
samples_table['gtf'][
samples_table['organism'] == wildcards.organism][0]
BIOPZ-Iborra de Toledo Paula
committed
output:
transcriptome = os.path.join(
config['output_dir'],
"transcriptome",
"{organism}",
"transcriptome.fa")
BIOPZ-Iborra de Toledo Paula
committed
log:
stderr = os.path.join(
config['log_dir'],
"{organism}_extract_transcriptome.log"),
stdout = os.path.join(
config['log_dir'],
"{organism}_extract_transcriptome.log")
BIOPZ-Iborra de Toledo Paula
committed
singularity:
BIOPZ-Iborra de Toledo Paula
committed
shell:
"(gffread \
-w {output.transcriptome} \
-g {input.genome} {input.gtf}) \
1> {log.stdout} 2> {log.stderr}"
BIOPZ-Gypas Foivos
committed
rule create_index_salmon:
"""
Create index for Salmon quantification
"""
input:
transcriptome = os.path.join(
config['output_dir'],
"transcriptome",
"{organism}",
"transcriptome.fa")
output:
index = directory(
os.path.join(
config['salmon_indexes'],
"{organism}",
"{kmer}",
BIOPZ-Katsantoni Maria
committed
"salmon.idx"))
BIOPZ-Katsantoni Maria
committed
kmerLen = "{kmer}"
"docker://zavolab/salmon:1.1.0-slim"
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
stderr = os.path.join(
BIOPZ-Katsantoni Maria
committed
"{organism}_{kmer}_create_index_salmon.stderr.log"),
stdout = os.path.join(
config['log_dir'],
"{organism}_{kmer}_create_index_salmon.stdout.log")
BIOPZ-Katsantoni Maria
committed
--index {output.index} \
--kmerLen {params.kmerLen} \
BIOPZ-Katsantoni Maria
committed
--threads {threads}) \
1> {log.stdout} 2> {log.stderr}"
BIOPZ-Gypas Foivos
committed
rule create_index_kallisto:
BIOPZ-Katsantoni Maria
committed
"""
Create index for Kallisto quantification
"""
BIOPZ-Iborra de Toledo Paula
committed
transcriptome = os.path.join(
config['output_dir'],
"transcriptome",
"{organism}",
"transcriptome.fa")
output:
index = os.path.join(
config['kallisto_indexes'],
"{organism}",
BIOPZ-Katsantoni Maria
committed
"kallisto.idx")
params:
output_dir = os.path.join(
config['kallisto_indexes'],
BIOPZ-Katsantoni Maria
committed
"{organism}")
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
stderr = os.path.join(
BIOPZ-Katsantoni Maria
committed
"{organism}_create_index_kallisto.stderr.log"),
stdout = os.path.join(
config['log_dir'],
"{organism}_create_index_kallisto.stdout.log")
shell:
"(mkdir -p {params.output_dir}; \
chmod -R 777 {params.output_dir}; \
BIOPZ-Katsantoni Maria
committed
kallisto index -i {output.index} {input.transcriptome}) \
1> {log.stdout} 2> {log.stderr}"
BIOPZ-Gypas Foivos
committed
BIOPZ-Katsantoni Maria
committed
"""
Convert transcripts to BED12 format
"""
BIOPZ-Katsantoni Maria
committed
output:
bed12 = os.path.join(
config['output_dir'],
BIOPZ-Katsantoni Maria
committed
"full_transcripts_protein_coding.bed")
"docker://zavolab/gtf_transcript_type_to_bed12:0.1.0-slim"
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
stderr = os.path.join(
BIOPZ-Katsantoni Maria
committed
"extract_transcripts_as_bed12.stderr.log")
BIOPZ-Katsantoni Maria
committed
"(gtf_transcript_type_to_bed12.pl \
BIOPZ-Katsantoni Maria
committed
--type=protein_coding > {output.bed12}); \
2> {log.stderr}"
rule index_genomic_alignment_samtools:
'''
Index genome bamfile using samtools
'''
input:
bam = os.path.join(
config["output_dir"],
"{sample}",
"map_genome",
"{sample}.{seqmode}.Aligned.sortedByCoord.out.bam"),
output:
bai = os.path.join(
config["output_dir"],
"{sample}",
"map_genome",
"{sample}.{seqmode}.Aligned.sortedByCoord.out.bam.bai")
singularity:
"docker://zavolab/samtools:1.10-slim"
threads: 1
log:
stderr = os.path.join(
config["log_dir"],
"{sample}",
"index_genomic_alignment_samtools.{seqmode}.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"{sample}",
"index_genomic_alignment_samtools.{seqmode}.stdout.log")
shell:
"(samtools index {input.bam} {output.bai};) \
1> {log.stdout} 2> {log.stderr}"
rule star_rpm:
'''
Create stranded bedgraph coverage with STARs RPM normalisation
'''
input:
bam = lambda wildcards:
expand(
os.path.join(
config["output_dir"],
"samples",
"{sample}",
"map_genome",
"{sample}.{seqmode}.Aligned.sortedByCoord.out.bam"),
sample=wildcards.sample,
seqmode=samples_table.loc[wildcards.sample, 'seqmode']),
bai = lambda wildcards:
expand(
os.path.join(
config["output_dir"],
"samples",
"{sample}",
"map_genome",
"{sample}.{seqmode}.Aligned.sortedByCoord.out.bam.bai"),
sample=wildcards.sample,
seqmode=samples_table.loc[wildcards.sample, 'seqmode']),
output:
config["output_dir"],
"{sample}",
"STAR_coverage",
"{sample}_Signal.Unique.str1.out.bg"),
config["output_dir"],
"{sample}",
"STAR_coverage",
"{sample}_Signal.UniqueMultiple.str1.out.bg"),
str3 = os.path.join(
config["output_dir"],
"{sample}",
"STAR_coverage",
"{sample}_Signal.Unique.str2.out.bg"),
config["output_dir"],
"{sample}",
"STAR_coverage",
"{sample}_Signal.UniqueMultiple.str2.out.bg")
params:
out_dir = lambda wildcards, output:
os.path.dirname(output.str1),
prefix = lambda wildcards, output:
os.path.join(
os.path.dirname(output.str1),
str(wildcards.sample) + "_"),
stranded = "Stranded"
singularity:
"docker://zavolab/star:2.7.3a-slim"
stderr = os.path.join(
config["log_dir"],
"{sample}",
stdout = os.path.join(
config["log_dir"],
"{sample}",
threads: 4
shell:
chmod -R 777 {params.out_dir}; \
STAR \
--runMode inputAlignmentsFromBAM \
--runThreadN {threads} \
--inputBAMfile {input.bam} \
--outWigStrand {params.stranded} \
--outFileNamePrefix {params.prefix}) \
rule rename_star_rpm_for_alfa:
input:
str1 = os.path.join(
config["output_dir"],
output:
plus = os.path.join(
config["output_dir"],
"{unique}",
"{sample}_Signal.{unique}.out.plus.bg"),
"{unique}",
"{sample}_Signal.{unique}.out.minus.bg")
orientation = lambda wildcards:
samples_table.loc[wildcards.sample, "kallisto_directionality"]
run:
if params['orientation'] == "--fr":
shutil.copy2(input['str1'], output['plus'])
shutil.copy2(input['str2'], output['minus'])
elif params['orientation'] == "--rf":
shutil.copy2(input['str1'], output['minus'])
shutil.copy2(input['str2'], output['plus'])
BIOPZ-Katsantoni Maria
committed
"""
BIOPZ-Katsantoni Maria
committed
"""
bam = lambda wildcards:
expand(
os.path.join(
config['output_dir'],
"samples",
"{sample}",
"map_genome",
"{sample}.{seqmode}.Aligned.sortedByCoord.out.bam"),
sample=wildcards.sample,
seqmode=samples_table.loc[wildcards.sample, 'seqmode']),
bai = lambda wildcards:
expand(
os.path.join(
config['output_dir'],
"samples",
"{sample}",
"map_genome",
"{sample}.{seqmode}.Aligned.sortedByCoord.out.bam.bai"),
sample=wildcards.sample,
seqmode=samples_table.loc[wildcards.sample, 'seqmode']),
transcripts_bed12 = os.path.join(
config['output_dir'],
BIOPZ-Katsantoni Maria
committed
"full_transcripts_protein_coding.bed")
output:
TIN_score = os.path.join(
config['output_dir'],
BIOPZ-Katsantoni Maria
committed
"TIN_score.tsv")
BIOPZ-Katsantoni Maria
committed
sample = "{sample}"
BIOPZ-Katsantoni Maria
committed
stderr = os.path.join(
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
"docker://zavolab/tin_score_calculation:0.2.0-slim"
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
"(tin_score_calculation.py \
-i {input.bam} \
-r {input.transcripts_bed12} \
-c 0 \
--names {params.sample} \
BIOPZ-Katsantoni Maria
committed
-n 100 > {output.TIN_score};) 2> {log.stderr}"
rule merge_TIN_scores:
"""
Merge TIN scores tables
"""
input:
TIN_score = expand(
os.path.join(
config['output_dir'],
"{sample}",
"TIN",
"TIN_score.tsv"),
output:
TIN_scores_merged = os.path.join(
config['output_dir'],
"TIN_scores_merged.tsv")
log:
stderr = os.path.join(
config['log_dir'],
"merge_TIN_scores.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"merge_TIN_scores.stdout.log")
params:
TIN_score_merged_paths = ",".join(expand(
os.path.join(
config['output_dir'],
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
"{sample}",
"TIN",
"TIN_score.tsv"),
zip,
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)]))
threads: 1
singularity:
"docker://zavolab/tin_score_calculation:0.2.0-slim"
shell:
"(tin_score_merge.py \
--input-files {params.TIN_score_merged_paths} \
--output-file {output.TIN_scores_merged}) \
1> {log.stdout} 2> {log.stderr}"
rule plot_TIN_scores:
"""
Generate TIN scores boxplots
"""
input:
TIN_scores_merged = os.path.join(
config['output_dir'],
"TIN_scores_merged.tsv"),
output:
TIN_boxplot_PNG = os.path.join(
config['output_dir'],
"TIN_scores_boxplot.png"),
TIN_boxplot_PDF = os.path.join(
config['output_dir'],
"TIN_scores_boxplot.pdf")
params:
TIN_boxplot_prefix = os.path.join(
config['output_dir'],
"TIN_scores_boxplot")
log:
stderr = os.path.join(
config['log_dir'],
"plot_TIN_scores.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"plot_TIN_scores.stdout.log")
threads: 1
singularity:
"docker://zavolab/tin_score_calculation:0.2.0-slim"
shell:
"(tin_score_plot.py \
--input-file {input.TIN_scores_merged} \
--output-file-prefix {params.TIN_boxplot_prefix}) \
1> {log.stdout} 2> {log.stderr}"
rule salmon_quantmerge_genes:
BIOPZ-Katsantoni Maria
committed
'''
Merge gene quantifications into a single file
'''
BIOPZ-Katsantoni Maria
committed
salmon_in = expand(
os.path.join(
config["output_dir"],
BIOPZ-Katsantoni Maria
committed
"{sample}",
"{sample}.salmon.{seqmode}",
"quant.sf"),
sample=samples_table.index.values,
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)])
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
salmon_out = os.path.join(
BIOPZ-Katsantoni Maria
committed
"summary_salmon",
"quantmerge",
"genes_{salmon_merge_on}.tsv")
params:
BIOPZ-Katsantoni Maria
committed
os.path.join(
config["output_dir"],
BIOPZ-Katsantoni Maria
committed
"{sample}",
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)]),
BIOPZ-Katsantoni Maria
committed
sample_name_list = expand(
"{sample}",
sample=list(samples_table.index.values)),
salmon_merge_on = "{salmon_merge_on}"
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
stderr = os.path.join(
config["log_dir"],
"salmon_quantmerge_genes_{salmon_merge_on}.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"salmon_quantmerge_genes_{salmon_merge_on}.stdout.log")
threads: 1
singularity:
"docker://zavolab/salmon:1.1.0-slim"
BIOPZ-Katsantoni Maria
committed
shell:
"(salmon quantmerge \
--genes \
--names {params.sample_name_list} \
--column {params.salmon_merge_on} \
BIOPZ-Katsantoni Maria
committed
--output {output.salmon_out};) \
1> {log.stdout} 2> {log.stderr}"
rule salmon_quantmerge_transcripts:
BIOPZ-Katsantoni Maria
committed
'''
Merge gene quantifications into a single file
'''
BIOPZ-Katsantoni Maria
committed
salmon_in = expand(
os.path.join(
config["output_dir"],
BIOPZ-Katsantoni Maria
committed
"{sample}",
BIOPZ-Katsantoni Maria
committed
"quant.sf"),
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)])
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
salmon_out = os.path.join(
BIOPZ-Katsantoni Maria
committed
"summary_salmon",
"quantmerge",
"transcripts_{salmon_merge_on}.tsv")
params:
BIOPZ-Katsantoni Maria
committed
os.path.join(
config["output_dir"],
BIOPZ-Katsantoni Maria
committed
"{sample}",
sample=[i for i in list(samples_table.index.values)],
seqmode=[samples_table.loc[i, 'seqmode']
for i in list(samples_table.index.values)]),
BIOPZ-Katsantoni Maria
committed
sample_name_list = expand(
"{sample}",
sample=list(samples_table.index.values)),
salmon_merge_on = "{salmon_merge_on}"
BIOPZ-Katsantoni Maria
committed
BIOPZ-Katsantoni Maria
committed
stderr = os.path.join(
config["log_dir"],
"salmon_quantmerge_transcripts_{salmon_merge_on}.stderr.log"),
stdout = os.path.join(
config["log_dir"],
"salmon_quantmerge_transcripts_{salmon_merge_on}.stdout.log")
threads: 1
singularity:
"docker://zavolab/salmon:1.1.0-slim"
BIOPZ-Katsantoni Maria
committed
shell:
"(salmon quantmerge \
--names {params.sample_name_list} \
--column {params.salmon_merge_on} \
BIOPZ-Katsantoni Maria
committed
--output {output.salmon_out}) \
# ALFA: Annotation Landscape For Aligned reads
directionality = {"--fr": "fr-firststrand", "--rf": "fr-secondstrand"}
rule generate_alfa_index:
''' Generate ALFA index files from sorted GTF file '''
input:
gtf = lambda wildcards:
samples_table["gtf"]
[samples_table["organism"] == wildcards.organism][0],
chr_len = os.path.join(
config["star_indexes"],
"{organism}",
"{index_size}",
"STAR_index",
"chrNameLength.txt"),
output:
index_stranded = os.path.join(
config["alfa_indexes"],
"{organism}",
"{index_size}",
"ALFA",
index_unstranded = os.path.join(
config["alfa_indexes"],
"{organism}",
"{index_size}",
"ALFA",
"sorted_genes.unstranded.ALFA_index")
params:
genome_index = "sorted_genes",
out_dir = lambda wildcards, output:
os.path.dirname(output.index_stranded)
log:
os.path.join(
config["log_dir"],
"{organism}_{index_size}_generate_alfa_index.log")
"(alfa -a {input.gtf} \
-g {params.genome_index} \
--chr_len {input.chr_len} \
-p {threads} \
-o {params.out_dir}) &> {log}"
'''
Run ALFA from stranded bedgraph files
'''
input:
plus = os.path.join(
config["output_dir"],
"{unique}",
"{sample}_Signal.{unique}.out.plus.bg"),
"{unique}",
"{sample}_Signal.{unique}.out.minus.bg"),
gtf = lambda wildcards:
os.path.join(
config["alfa_indexes"],
samples_table.loc[wildcards.sample, "organism"],
str(samples_table.loc[wildcards.sample, "index_size"]),
"ALFA",
"sorted_genes.stranded.ALFA_index")
output:
biotypes = os.path.join(
config["output_dir"],
"ALFA_plots.Biotypes.pdf"),
categories = os.path.join(
config["output_dir"],
"ALFA_plots.Categories.pdf"),
table = os.path.join(
config["output_dir"],
out_dir = lambda wildcards, output:
os.path.dirname(output.biotypes),
alfa_orientation = lambda wildcards:
directionality[samples_table.loc[
wildcards.sample, "kallisto_directionality"]],
in_file_plus = lambda wildcards, input:
os.path.basename(input.plus),
in_file_minus = lambda wildcards, input:
os.path.basename(input.minus),
genome_index = lambda wildcards, input:
os.path.abspath(
os.path.join(
os.path.dirname(input.gtf),
"sorted_genes")),
config["log_dir"],
"{sample}_alfa_qc.{unique}.log"))
"(cd {params.out_dir}; \
alfa \
-g {params.genome_index} \
--bedgraph {params.in_file_plus} {params.in_file_minus} {params.name} \
-s {params.alfa_orientation}) &> {log}"
'''
Run ALFA from stranded bedgraph files on all samples
'''
tables = lambda wildcards:
expand(
os.path.join(
config["output_dir"],
"samples",
"{sample}",
"ALFA",
"{unique}",
"{sample}" + ".ALFA_feature_counts.tsv"),
sample=samples_table.index.values,
unique=wildcards.unique)
output:
biotypes = os.path.join(
config["output_dir"],
"ALFA",
"ALFA_plots.Biotypes.pdf"),
categories = os.path.join(
config["output_dir"],
"ALFA",
out_dir = lambda wildcards, output:
os.path.dirname(output.biotypes)
log:
os.path.join(
config["log_dir"],
"alfa_qc_all_samples.{unique}.log")
"(alfa -c {input.tables} -o {params.out_dir}) &> {log}"
expand(
os.path.join(
config["output_dir"],
"ALFA",
"{unique}",