Skip to content

Commit

Permalink
Fix straglr issues, sync philres straglr changes, output straglr tsv …
Browse files Browse the repository at this point in the history
…as intermediate (#589)

* Update minimap 2.26 -> 2.27

* Updata minimap md5

* update minimap sha256

* make nanopore preset for minimap configurable

* Output straglr tsv as intermediate for debugging/validation purposes

* WIP: fix straglr issues

* md5sum straglr

* use molgenis straglr fork

* update build.sh for new straglr repo

* Fix straglr apptainer image

* Next version of stragler fixes

* Update md5sum

* Fix md5sum for straglr

* Update documentation for our own fork of straglr

* Update workflow.md

* Remove accidental commited file
  • Loading branch information
bartcharbon authored Apr 12, 2024
1 parent 28549c3 commit 7b9cb56
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/nxf_call_str.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ includeConfig 'nxf.config'

env {
CMD_EXPANSIONHUNTER = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/expansionhunter-5.0.0.sif ExpansionHunter"
CMD_STRAGLR="apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/straglr-philres-1.4.2.sif straglr-genotype"
CMD_STRAGLR="apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/straglr-1.4.4_vip_v1.sif straglr-genotype"
}

params {
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `cram` workflow consists of the following steps:
2. Create validated, indexed `.bam` file from `bam/cram/sam` input
3. Discover short tandem repeats and publish as intermediate result.
1. Using [ExpansionHunter](https://github.com/Illumina/ExpansionHunter) for Illumina short read data.
2. Using this [fork of Straglr](https://github.com/philres/straglr) for PacBio and Nanopore long read data, this fork is chosen over the original [Straglr](https://github.com/bcgsc/straglr) because of the VCF output that enables VIP to combine it with the SV and SNV data in the VCF workflow.
2. Using this [fork of Straglr](https://github.com/molgenis/straglr) for PacBio and Nanopore long read data, this is a fork of this fork(https://github.com/philres/straglr) and is chosen over the original [Straglr](https://github.com/bcgsc/straglr) because of the VCF output that enables VIP to combine it with the SV and SNV data in the VCF workflow.
4. Parallelize cram in chunks consisting of one or more contigs and for each chunk
1. Perform short variant calling with [DeepVariant](https://github.com/google/deepvariant) producing a `gvcf` file per chunk per sample, the gvcfs of the samples in a project are than merged to one vcf per project (using [GLnexus](https://github.com/dnanexus-rnd/GLnexus).
2. Perform structural variant calling with [Manta](https://github.com/Illumina/manta) or [cuteSV](https://github.com/tjiangHIT/cuteSV) producing a `vcf` file per chunk per project.
Expand Down Expand Up @@ -58,4 +58,4 @@ The `vcf` workflow consists of the following steps:
5. If `cram` data is available slice the `cram` files to only keep relevant reads
6. Create report

For details, see [here](https://github.com/molgenis/vip/blob/main/vip_vcf.nf).
For details, see [here](https://github.com/molgenis/vip/blob/main/vip_vcf.nf).
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ download_files() {
urls+=("7486bd5de526d9888df8eea2d8bdea48" "images/minimap2-2.27.sif")
urls+=("06ac8a76a307fa42fffd80ab906fd24b" "images/picard-3.1.1.sif")
urls+=("9a4b685b26744113d3ea0a3904c02706" "images/samtools-1.17-patch1.sif")
urls+=("2c18fcda2660792a7c8ba390463ae7ac" "images/straglr-philres-1.4.2.sif")
urls+=("d16851058e57ca08417f212b129841ca" "images/straglr-1.4.4_vip_v1.sif")
urls+=("bcc157242cd9b09c66f015c52ef2d61d" "images/stranger-0.8.1.sif")
urls+=("4fbbd8642ead7754cb8cc19740e18175" "images/vcf-decision-tree-4.0.0.sif")
urls+=("9c4d7b48138f29651cdd45eb8d0cc4b6" "images/vcf-inheritance-matcher-3.1.0.sif")
Expand Down
3 changes: 2 additions & 1 deletion modules/cram/straglr.nf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ process straglr_call {
input:
tuple val(meta), path(cram), path(cramCrai)
output:
tuple val(meta), path(vcfOut), path(vcfOutIndex), path(vcfOutStats)
tuple val(meta), path(tsvOut), path(vcfOut), path(vcfOutIndex), path(vcfOutStats)
shell:
paramReference = params[meta.project.assembly].reference.fasta
paramReferenceFai = params[meta.project.assembly].reference.fastaFai
Expand All @@ -17,6 +17,7 @@ process straglr_call {
sampleSex = meta.sample.sex

vcfOut = "${meta.project.id}_${meta.sample.family_id}_${meta.sample.individual_id}_str.vcf.gz"
tsvOut = "${meta.project.id}_${meta.sample.family_id}_${meta.sample.individual_id}_str.tsv"
vcfOutIndex = "${vcfOut}.csi"
vcfOutStats = "${vcfOut}.stats"

Expand Down
1 change: 1 addition & 0 deletions modules/cram/templates/straglr_call.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ call_short_tandem_repeats () {
args+=("--loci" "!{paramLoci}")
args+=("--sample" "!{sampleId}")
args+=("--vcf" "straglr.vcf")
args+=("--tsv" "!{tsvOut}")
if [ -z "!{sampleSex}" ]; then
args+=("--sex" "!{sampleSex}")
fi
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/call_str.nf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ workflow str {
ch_str_by_platform.straglr
| map { meta -> [meta, meta.sample.cram.data, meta.sample.cram.index] }
| straglr_call
| map { meta, vcf, vcfIndex, vcfStats -> [meta, [data: vcf, index: vcfIndex, stats: vcfStats]] }
| map { meta, tsv, vcf, vcfIndex, vcfStats -> [meta, [data: vcf, index: vcfIndex, stats: vcfStats]] }
| set { ch_str_straglr }

// group by project
Expand Down
2 changes: 1 addition & 1 deletion utils/apptainer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ main() {
images+=("picard-3.1.1")
images+=("samtools-1.17-patch1")
images+=("stranger-0.8.1")
images+=("straglr-philres-1.4.2")
images+=("straglr-1.4.4_vip_v1")
images+=("vcf-decision-tree-4.0.0")
images+=("vcf-inheritance-matcher-3.1.0")
images+=("vcf-report-6.0.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ From: sif/build/ubuntu-22.04.sif
curl -Ls -o /opt/trf/trf "https://github.com/Benson-Genomics-Lab/TRF/releases/download/v4.09.1/trf409.linux64"
chmod +x /opt/trf/trf

# ce7d96cad4630d6a73114657e082f2402b1b1213 = v1.4.2
pip install git+https://github.com/philres/straglr.git@ce7d96cad4630d6a73114657e082f2402b1b1213#egg=straglr
#b894775d2917c4c36b29c256e7db977a12f56e57 == v1.4.4_vip_v1
pip install git+https://github.com/molgenis/straglr.git@b894775d2917c4c36b29c256e7db977a12f56e57#egg=straglr

# cleanup
pip cache purge
Expand Down

0 comments on commit 7b9cb56

Please sign in to comment.