Commit 5b6fc1f8 authored by Davis McCarthy's avatar Davis McCarthy
Browse files

Tweaking workflow

parent 4cc4ab1f
......@@ -24,7 +24,7 @@ SAMPLES_LONG = glob.glob('data/fastq/*.fastq.gz')
SAMPLES = [re.sub('.*lane[123]+_', '', w) for w in SAMPLES_LONG]
SAMPLES = [re.sub('_[ATCG]+_.*_(R[12]).fastq.gz', '_\\1', w) for w in SAMPLES]
SAMPLES_LONG = [os.path.basename(w).replace('.fastq.gz', '') for w in SAMPLES_LONG]
SAMPLES_MERGE = [w.replace('_R1', '').replace('_R2', '') for w in SAMPLES]
SAMPLES_MERGE = [w.replace('_R1', '').replace('_R2', '') for w in SAMPLES_LONG]
SAMPLES_MERGE = list(set(SAMPLES_MERGE))
SAMPLES_DICT = dict(zip(SAMPLES, SAMPLES_LONG))
......@@ -94,18 +94,18 @@ rule bismark_prepare_genome:
rule bismark:
input:
fq=lambda wildcards: expand('data/fastq/{sample_long}_trimmed.fq.gz', sample_long=SAMPLES_DICT[wildcards.sample]),
fq='data/fastq/{sample}_trimmed.fq.gz',
gn='genome/Bisulfite_Genome'
output:
temp('data/bismark/raw/{sample}_trimmed_bismark_bt2.bam'), ## CHECK BISMARK OUTPUT
temp('data/bismark/raw/{sample}_trimmed_bismark_bt2_SE_report.txt')
'data/bismark/raw/{sample}_trimmed_bismark_bt2_SE_report.txt'
params:
basename='data/bismark/raw/{sample}_trimmed_bismark_bt2'
singularity:
"docker://dmccarthy/embo-singlecellomics-methylation_2019-05_heidelberg:0.4"
shell:
'bismark --non_directional --genome genome -o data/bismark/raw '
'--basename {params.basename} {input.fq}'
'{input.fq}'
rule bismark_dedup:
......@@ -134,7 +134,7 @@ rule bismark_methylation:
rule multiqc:
input:
fastqc_html_reports,
expand('data/bismark/methyl/{sample}_trimmed_bismark_bt2.deduplicated.bismark.cov.gz', sample = SAMPLES),
expand('data/bismark/methyl/{sample}_trimmed_bismark_bt2.deduplicated.bismark.cov.gz', sample = SAMPLES_LONG),
expand('data/fastq/{sample}_trimmed.fq.gz', sample = SAMPLES_LONG),
expand('data/fastq/{sample}.fastq.gz_trimming_report.txt', sample = SAMPLES_LONG)
output:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment