Skip to content

Commit

Permalink
recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
riasc committed May 20, 2024
1 parent 71bc0fe commit 8da4f95
Show file tree
Hide file tree
Showing 17 changed files with 1,270 additions and 326 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- pathogen similarity (BLAST against pathogen-derived epitopes from IEDB)
- proteome similarity (BLAST against human proteome)
- Prioritization of neoantigens is now done separately for each variant type (speeds up the process)
- Prioritization of neoantigens is in chunks (rather than per allele and epitope length)
- NMD information (e.g., escape rule,...) is now also calculated for all variants
- Retention of introns is no longer ignored for the variant effects (INFO tag intret)

## [0.2.2] - 2024-03-01

Expand Down
1 change: 1 addition & 0 deletions workflow/envs/prioritization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ dependencies:
- pip:
- gffutils==0.12
- blosum==2.0.2
- intervaltree==3.1.0
10 changes: 5 additions & 5 deletions workflow/rules/align.smk
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ rule rnaseq_postproc_markdup:
samtools sort -@4 -m4G -O BAM -T tmp/ {input.bam} \
-o tmp/rnaseq_fixmate_sorted_{wildcards.sample}_{wildcards.group}.bam > {log} 2>&1
samtools markdup -r -@4 tmp/rnaseq_fixmate_sorted_{wildcards.sample}_{wildcards.group}.bam \
{output} > {log} 2>&1
{output} >> {log} 2>&1
rm tmp/rnaseq_fixmate_sorted_{wildcards.sample}_{wildcards.group}.bam
"""

Expand All @@ -173,7 +173,7 @@ rule postproc_bam_index:
"logs/{sample}/postproc/index/rnaseq_{group}.log"
shell:
"""
samtools index {input} > {log} 2>&1
samtools index {input} >> {log} 2>&1
"""

## retrieve readgroups from bam file
Expand All @@ -189,7 +189,7 @@ rule get_readgroups:
shell:
"""
python workflow/scripts/get_readgroups.py '{input}' \
{output} > {log} 2>&1
{output} >> {log} 2>&1
"""

# realign RNAseq and align DNAseq
Expand Down Expand Up @@ -234,7 +234,7 @@ if config['data']['dnaseq_filetype'] in ['.fq','.fastq']:
bwa mem -t{threads} -C resources/refs/bwa/genome {input.reads} \
| samtools addreplacerg -r ID:{wildcards.group} -r SM:{wildcards.sample} \
-r LB:{wildcards.sample} -r PL:ILLUMINA -r PU:{wildcards.group} - - \
| samtools sort -@ 6 -n -m1g - -o {output} > {log} 2>&1
| samtools sort -@ 6 -n -m1g - -o {output} >> {log} 2>&1
"""

rule dnaseq_postproc:
Expand All @@ -254,7 +254,7 @@ if config['data']['dnaseq_filetype'] in ['.fq','.fastq']:
"""
samtools fixmate -pcmu -O bam -@ 6 {input.aln} - \
| samtools sort -m1g -O bam -T tmp/ - -o - \
| samtools markdup -r -@ 6 - {output.bam} > {log} 2>&1
| samtools markdup -r -@ 6 - {output.bam} >> {log} 2>&1
"""

rule samtools_index_BWA_final:
Expand Down
8 changes: 4 additions & 4 deletions workflow/rules/altsplicing.smk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rule spladder:
{params.confidence} \
{params.iteration} \
{params.edgelimit} \
--qmode all > {log} 2>&1
--qmode all >> {log} 2>&1
"""

rule splicing_to_vcf:
Expand All @@ -39,7 +39,7 @@ rule splicing_to_vcf:
"""
python workflow/scripts/altsplc2vcf.py \
-i {input} -r resources/refs/genome.fasta \
-g {wildcards.group} -o {output} > {log} 2>&1
-g {wildcards.group} -o {output} >> {log} 2>&1
"""

rule sort_altsplicing:
Expand All @@ -55,7 +55,7 @@ rule sort_altsplicing:
"../envs/samtools.yml"
shell:
"""
bcftools sort {input} -o - | bcftools view -O z -o {output} > {log} 2>&1
bcftools sort {input} -o - | bcftools view -O z -o {output} >> {log} 2>&1
"""

rule combine_altsplicing:
Expand All @@ -71,5 +71,5 @@ rule combine_altsplicing:
"../envs/samtools.yml"
shell:
"""
bcftools concat --naive -O z {input} -o - | bcftools sort -O z -o {output} > {log} 2>&1
bcftools concat --naive -O z {input} -o - | bcftools sort -O z -o {output} >> {log} 2>&1
"""
2 changes: 1 addition & 1 deletion workflow/rules/annotation.smk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ rule index_variants:
"../envs/samtools.yml"
shell:
"""
tabix {input}
tabix {input} >> {log} 2>&1
"""

rule annotate_variants:
Expand Down
4 changes: 2 additions & 2 deletions workflow/rules/custom.smk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rule augment_custom_variants:
{input} \
custom \
custom \
{output} > {log} 2>&1
{output} >> {log} 2>&1
"""

rule sort_custom_variants:
Expand All @@ -31,5 +31,5 @@ rule sort_custom_variants:
"../envs/samtools.yml"
shell:
"""
bcftools sort {input} -o - | bcftools view -O z -o {output} > {log} 2>&1
bcftools sort {input} -o - | bcftools view -O z -o {output} >> {log} 2>&1
"""
12 changes: 6 additions & 6 deletions workflow/rules/exitron.smk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ rule prepare_scanexitron_config:
{input.genome} \
{input.annotation} \
{input.cds} \
{output} > {log}
{output} >> {log} 2>&1
"""

rule scanexitron:
Expand Down Expand Up @@ -65,7 +65,7 @@ rule scanexitron:
--pso {params.pso} \
-c ../../../{input.config} \
-i {input.bam} \
-r hg38
-r hg38 >> {log} 2>&1
mv {wildcards.group}_final_STAR.exitron {output}
mv {wildcards.group}_final_STAR* results/{wildcards.sample}/rnaseq/exitron/
"""
Expand All @@ -83,7 +83,7 @@ rule exitron_to_vcf:
"""
python workflow/scripts/exitron2vcf.py \
{input} {output} \
resources/refs/genome.fasta > {log}
resources/refs/genome.fasta >> {log} 2>&1
"""

rule exitron_augment:
Expand All @@ -103,7 +103,7 @@ rule exitron_augment:
{input} \
exitron \
{wildcards.group} \
{output} > {log} 2>&1
{output} >> {log} 2>&1
"""

rule sort_exitron:
Expand All @@ -119,7 +119,7 @@ rule sort_exitron:
"../envs/samtools.yml"
shell:
"""
bcftools sort {input} -o - | bcftools view -O z -o {output} > {log} 2>&1
bcftools sort {input} -o - | bcftools view -O z -o {output} >> {log} 2>&1
"""

rule combine_exitrons:
Expand All @@ -135,6 +135,6 @@ rule combine_exitrons:
"../envs/samtools.yml"
shell:
"""
bcftools concat --naive -O z {input} -o - | bcftools sort -O z -o {output} > {log} 2>&1
bcftools concat --naive -O z {input} -o - | bcftools sort -O z -o {output} >> {log} 2>&1
"""

24 changes: 12 additions & 12 deletions workflow/rules/germline.smk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ checkpoint split_bam_htc_first_round:
shell:
"""
python workflow/scripts/split_bam_by_chr.py \
{input.bam} {output}
{input.bam} {output} >> {log} 2>&1
"""

rule index_split_bam_htc_first_round:
Expand All @@ -66,7 +66,7 @@ rule index_split_bam_htc_first_round:
"../envs/samtools.yml"
shell:
"""
samtools index {input.bam} > {log} 2>&1
samtools index {input.bam} >> {log} 2>&1
"""

rule detect_variants_htc_first_round:
Expand Down Expand Up @@ -99,7 +99,7 @@ rule sort_variants_htc_first_round:
"../envs/samtools.yml"
shell:
"""
bcftools sort {input} -o - | bcftools view -O z -o {output} > {log} 2>&1
bcftools sort {input} -o - | bcftools view -O z -o {output} >> {log} 2>&1
"""

rule index_variants_htc_first_round:
Expand All @@ -115,7 +115,7 @@ rule index_variants_htc_first_round:
"../envs/samtools.yml"
shell:
"""
bcftools index -t {input} > {log} 2>&1
bcftools index -t {input} >> {log} 2>&1
"""

rule merge_variants_htc_first_round:
Expand All @@ -132,7 +132,7 @@ rule merge_variants_htc_first_round:
"../envs/samtools.yml"
shell:
"""
bcftools concat -O z -a {input.vcf} -o {output} > {log} 2>&1
bcftools concat -O z -a {input.vcf} -o {output} >> {log} 2>&1
"""

rule index_merged_variants_htc_first_round:
Expand All @@ -148,7 +148,7 @@ rule index_merged_variants_htc_first_round:
"../envs/samtools.yml"
shell:
"""
bcftools index -t {input} > {log} 2>&1
bcftools index -t {input} >> {log} 2>&1
"""


Expand Down Expand Up @@ -299,7 +299,7 @@ checkpoint split_bam_htc_final_round:
shell:
"""
python workflow/scripts/split_bam_by_chr.py \
{input.bam} {output}
{input.bam} {output} >> {log} 2>&1
"""

rule index_split_bam_htc_final_round:
Expand All @@ -315,7 +315,7 @@ rule index_split_bam_htc_final_round:
"../envs/samtools.yml"
shell:
"""
samtools index {input.bam} > {log} 2>&1
samtools index {input.bam} >> {log} 2>&1
"""

rule detect_variants_htc_final_round:
Expand Down Expand Up @@ -348,7 +348,7 @@ rule sort_variants_htc_final_round:
"../envs/samtools.yml"
shell:
"""
bcftools sort {input} -o - | bcftools view -O z -o {output} > {log} 2>&1
bcftools sort {input} -o - | bcftools view -O z -o {output} >> {log} 2>&1
"""

rule index_variants_htc_final_round:
Expand All @@ -364,7 +364,7 @@ rule index_variants_htc_final_round:
"../envs/samtools.yml"
shell:
"""
bcftools index -t {input} > {log} 2>&1
bcftools index -t {input} >> {log} 2>&1
"""

rule merge_variants_htc_final_round:
Expand All @@ -381,7 +381,7 @@ rule merge_variants_htc_final_round:
"../envs/samtools.yml"
shell:
"""
bcftools concat -O z -a {input.vcf} -o {output} > {log} 2>&1
bcftools concat -O z -a {input.vcf} -o {output} >> {log} 2>&1
"""

rule index_merged_variants_htc_final_round:
Expand All @@ -397,7 +397,7 @@ rule index_merged_variants_htc_final_round:
"../envs/samtools.yml"
shell:
"""
bcftools index -t {input} > {log} 2>&1
bcftools index -t {input} >> {log} 2>&1
"""


Expand Down
Loading

0 comments on commit 8da4f95

Please sign in to comment.