Skip to content

Commit

Permalink
changes to speedup process
Browse files Browse the repository at this point in the history
  • Loading branch information
riasc committed Jun 27, 2024
1 parent cc8fe75 commit 0d34988
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Prioritization of neoantigens is now done separately for each variant type (speeds up the process)
- NMD information (e.g., escape rule,...) is now also calculated for all variants

## [0.2.8] - 2024-06-26

### Fix

- Added threads option to samtools sort calls to speed up the process
- Fixed wrong call to optitype within the wrapper script

## [0.2.7] - 2024-06-23

### Fix
Expand Down
6 changes: 4 additions & 2 deletions workflow/rules/align.smk
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,13 @@ if config['data']['dnaseq_filetype'] in ['.fq','.fastq']:
"../envs/samtools.yml"
params:
extra=""
threads: config['threads']
threads: 6
resources:
mem_mb=20000
shell:
"""
samtools fixmate -pcmu -O bam -@ 6 {input.aln} - \
| samtools sort -m1g -O bam -T tmp/ - -o - \
| samtools sort -@ 4 -m1g -O bam -T tmp/ - -o - \
| samtools markdup -r -@ 6 - {output.bam} > {log} 2>&1
"""

Expand Down
7 changes: 5 additions & 2 deletions workflow/rules/hlatyping.smk
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ rule get_reads_hlatyping_PE:
"Retrieve paired-end reads ({wildcards.nartype}) for HLA genotyping - sample:{wildcards.sample} group:{wildcards.group}"
log:
"logs/{sample}/hla/get_reads_hlatyping_PE_{group}_{nartype}.log"
threads: 4
resources:
mem_mb=20000
conda:
"../envs/samtools.yml"
shell:
"""
samtools sort -n {input.fwd} -T tmp/ | samtools fastq > {output.fwd}
samtools sort -n {input.rev} -T tmp/ | samtools fastq > {output.rev}
samtools sort -@4 -m4g -n {input.fwd} -T tmp/ | samtools fastq -@4 > {output.fwd}
samtools sort -@4 -m4g -n {input.rev} -T tmp/ | samtools fastq -@4 > {output.rev}
"""

######### single-end reads #########
Expand Down
2 changes: 1 addition & 1 deletion workflow/scripts/genotyping/optitype_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def main():
tsv = subprocess.Popen("touch " + outpath + prefix + "_result.tsv", shell=True)
else:
# call optitype
optitype = subprocess.Popen("optitype --input " + inbams +
optitype = subprocess.Popen("OptiTypePipeline.py --input " + inbams +
" --prefix " + prefix + " --" + nartype + "-v", shell=True)


Expand Down

0 comments on commit 0d34988

Please sign in to comment.