fixed compression of basecalled data, added reference alignment step
This commit is contained in:
@@ -52,7 +52,7 @@ rule basecall_pod5:
|
||||
model="hac|fast"
|
||||
shell:
|
||||
"""
|
||||
dorado basecaller --models-directory {config[dorado_model_dir]} --emit-fastq {params.benchmarking} {params.min_qscore} {params.dorado_model} {input.pod5} > {output}
|
||||
dorado basecaller --models-directory {config[dorado_model_dir]} --emit-fastq {params.benchmarking} {params.min_qscore} {params.dorado_model} {input.pod5} | gzip -c > {output}
|
||||
"""
|
||||
|
||||
rule concatenate_basecalled_fastq:
|
||||
@@ -66,4 +66,32 @@ rule concatenate_basecalled_fastq:
|
||||
shell:
|
||||
"""
|
||||
zcat {input} > {output}
|
||||
"""
|
||||
|
||||
rule align_reads_to_reference:
|
||||
input:
|
||||
fastq='../data/basecalled_reads/{model}.fastq.gz',
|
||||
ref='../data/reference_genomes/full_reference.mmi'
|
||||
output:
|
||||
'../data/aligned_reads/{model}_to_genome.sam'
|
||||
threads: 32
|
||||
conda:
|
||||
'../envs/minimap.yaml'
|
||||
shell:
|
||||
"""
|
||||
minimap2 -ax map-ont -t {threads} {input.ref} {input.fastq} > {output}
|
||||
"""
|
||||
|
||||
rule convert_sam_to_bam:
|
||||
input:
|
||||
'../data/aligned_reads/{model}_to_genome.sam'
|
||||
output:
|
||||
'../data/aligned_reads/{model}_to_genome.sorted.bam'
|
||||
threads: 32
|
||||
conda:
|
||||
'../envs/samtools.yaml'
|
||||
shell:
|
||||
"""
|
||||
samtools view -b -@ {threads} {input} | samtools sort -@ {threads} > {output}
|
||||
samtools index -@ {threads} {output}
|
||||
"""
|
||||
Reference in New Issue
Block a user