-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #440 from genomic-medicine-sweden/add-retroseq-to-…
…pipeline Add mobile element calling to raredisease
- Loading branch information
Showing
18 changed files
with
513 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$id": "https://raw.githubusercontent.com/nf-core/raredisease/master/assets/mobile_element_references_schema.json", | ||
"title": "Schema for mobile_element_references", | ||
"description": "Schema for the file provided with params.mobile_element_references", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string", | ||
"exists": true, | ||
"pattern": "^\\S+$", | ||
"errorMessage": "Mobile element type must be provided and cannot contain spaces" | ||
}, | ||
"path": { | ||
"type": "string", | ||
"format": "file-path", | ||
"exists": true, | ||
"pattern": "^\\S+\\.bed$", | ||
"errorMessage": "Bed file, cannot contain spaces and must have extension '.bed'" | ||
} | ||
}, | ||
"required": ["type", "path"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Config file for defining DSL2 per module options and publishing paths | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Available keys to override module options: | ||
ext.args = Additional arguments appended to command in module. | ||
ext.args2 = Second set of arguments appended to command in module (multi-tool modules). | ||
ext.args3 = Third set of arguments appended to command in module (multi-tool modules). | ||
ext.prefix = File name prefix for output files. | ||
ext.when = Conditional clause | ||
---------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
process { | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:.*' { | ||
publishDir = [ | ||
enabled: false | ||
] | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:ME_SPLIT_ALIGNMENT' { | ||
ext.args = { [ | ||
'--output-fmt bam', | ||
'--fetch-pairs' | ||
].join(' ') } | ||
ext.args2 = { "${meta.interval}" } | ||
ext.prefix = { "${meta.id}_${meta.interval}" } | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:RETROSEQ_DISCOVER' { | ||
ext.prefix = { "${meta.id}_${meta.interval}_retroseq_discover" } | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:RETROSEQ_CALL' { | ||
ext.args = { '--soft' } | ||
ext.prefix = { "${meta.id}_${meta.interval}_retroseq_call" } | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:BCFTOOLS_REHEADER_ME' { | ||
ext.args2 = { '--output-type v' } | ||
ext.prefix = { "${meta.id}_${meta.interval}_retroseq_reheader" } | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:BCFTOOLS_SORT_ME' { | ||
ext.args = { '--output-type z' } | ||
ext.prefix = { "${meta.id}_${meta.interval}_retroseq_sort" } | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:BCFTOOLS_CONCAT_ME' { | ||
ext.args = { '--output-type z --allow-overlaps' } | ||
ext.prefix = { "${meta.id}_mobile_elements" } | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:SVDB_MERGE_ME' { | ||
ext.args = { '--bnd_distance 150 --overlap 0.5' } | ||
ext.prefix = { "${meta.id}_mobile_elements" } | ||
publishDir = [ | ||
path: { "${params.outdir}/call_mobile_elements" }, | ||
mode: params.publish_dir_mode, | ||
saveAs: { filename -> filename.equals('versions.yml') ? null : filename } | ||
] | ||
} | ||
|
||
withName: '.*CALL_MOBILE_ELEMENTS:TABIX_ME' { | ||
publishDir = [ | ||
path: { "${params.outdir}/call_mobile_elements" }, | ||
mode: params.publish_dir_mode, | ||
saveAs: { filename -> filename.equals('versions.yml') ? null : filename } | ||
] | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
process RETROSEQ_CALL { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "bioconda::perl-retroseq=1.5=pl5321hdfd78af_1" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'docker.io/clinicalgenomics/retroseq:1.5_9d4f3b5-1' : 'docker.io/clinicalgenomics/retroseq:1.5_9d4f3b5-1' }" | ||
|
||
|
||
input: | ||
tuple val(meta), path(tab), path(bam), path(bai) | ||
tuple val(meta2), path(fasta) | ||
tuple val(meta3), path(fai) | ||
|
||
output: | ||
tuple val(meta), path("*.vcf"), emit: vcf | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def VERSION = "1.5" | ||
|
||
""" | ||
retroseq.pl \\ | ||
-call \\ | ||
$args \\ | ||
-bam $bam \\ | ||
-input $tab \\ | ||
-ref $fasta \\ | ||
-output ${prefix}.vcf | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
retroseq_call: $VERSION | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def VERSION = "1.5" | ||
""" | ||
touch ${prefix}.vcf | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
retroseq_call: $VERSION | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: "retroseq_call" | ||
description: RetroSeq is a tool for discovery and genotyping of transposable element variants (TEVs) from next-gen sequencing reads aligned to a reference genome in BAM format. | ||
keywords: | ||
- retroseq | ||
- transposable elements | ||
- genomics | ||
tools: | ||
- "retroseq": | ||
description: "RetroSeq: discovery and genotyping of TEVs from reads in BAM format." | ||
homepage: "https://github.com/tk2/RetroSeq" | ||
documentation: "https://github.com/tk2/RetroSeq" | ||
tool_dev_url: "https://github.com/tk2/RetroSeq" | ||
doi: "10.1093/bioinformatics/bts697" | ||
licence: "['GPL']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- tab: | ||
type: file | ||
description: Output file from running retroseq -call | ||
pattern: "*.tab" | ||
- bam: | ||
type: file | ||
description: Sorted BAM file | ||
pattern: "*.bam" | ||
- bai: | ||
type: file | ||
description: Index of the sorted BAM file | ||
pattern: "*.bam" | ||
- meta2: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- fasta: | ||
type: file | ||
description: Reference genome in fasta format | ||
pattern: "*.fasta" | ||
- meta3: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- fai: | ||
type: file | ||
description: Reference FASTA index | ||
pattern: "*.fai" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- vcf: | ||
type: file | ||
description: Output file containing TEVs and their location in the genome. | ||
pattern: "*.vcf" | ||
|
||
authors: | ||
- "@peterpru" |
Oops, something went wrong.