mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Add GATK(3)/realignertargetcreator
This commit is contained in:
parent
d39ba08e02
commit
7633d7816b
4 changed files with 60 additions and 47 deletions
|
@ -8,12 +8,12 @@ process GATK_REALIGNERTARGETCREATOR {
|
||||||
'quay.io/biocontainers/gatk:3.5--hdfd78af_11' }"
|
'quay.io/biocontainers/gatk:3.5--hdfd78af_11' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam), path(bai)
|
||||||
tuple val(meta), path(reference)
|
tuple path(fasta), path(fasta_fai), path(fasta_dict)
|
||||||
tuple val(meta), path(known_vcf)
|
path(known_vcf)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.bam"), emit: bam
|
tuple val(meta), path("*.intervals"), emit: intervals
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
when:
|
when:
|
||||||
|
@ -22,16 +22,16 @@ process GATK_REALIGNERTARGETCREATOR {
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
def known = known_vcf ? "-known ${known_vcf}" ? ""
|
def known = known_vcf ? "-known ${known_vcf}" : ""
|
||||||
if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!"
|
if ("$bam" == "${prefix}.bam") error "Input and output names are the same, set prefix in module configuration to disambiguate!"
|
||||||
|
|
||||||
"""
|
"""
|
||||||
gatk3 \\
|
gatk3 \\
|
||||||
-T RealigerTargetCreator \\
|
-T RealignerTargetCreator \\
|
||||||
-nt ${task.cpus}
|
-nt ${task.cpus} \\
|
||||||
-I ${bam} \\
|
-I ${bam} \\
|
||||||
-R ${reference} \\
|
-R ${fasta} \\
|
||||||
-o ${prefix}.bam \\
|
-o ${prefix}.intervals \\
|
||||||
${known} \\
|
${known} \\
|
||||||
$args
|
$args
|
||||||
|
|
||||||
|
|
|
@ -1,51 +1,64 @@
|
||||||
name: "gatk_realignertargetcreator"
|
name: "gatk_realignertargetcreator"
|
||||||
## TODO nf-core: Add a description of the module and list keywords
|
description: Generates a list of locations that should be considered for local realignment prior genotyping.
|
||||||
description: write your description here
|
|
||||||
keywords:
|
keywords:
|
||||||
- sort
|
- bam
|
||||||
|
- vcf
|
||||||
|
- variant calling
|
||||||
|
- indel
|
||||||
|
- realignment
|
||||||
|
- targets
|
||||||
tools:
|
tools:
|
||||||
- "gatk":
|
- "gatk":
|
||||||
## TODO nf-core: Add a description and other details for the software below
|
|
||||||
description: "The full Genome Analysis Toolkit (GATK) framework, license restricted."
|
description: "The full Genome Analysis Toolkit (GATK) framework, license restricted."
|
||||||
homepage: "None"
|
homepage: "https://gatk.broadinstitute.org/hc/en-us"
|
||||||
documentation: "None"
|
documentation: "https://github.com/broadinstitute/gatk-docs"
|
||||||
tool_dev_url: "None"
|
licence: "['https://software.broadinstitute.org/gatk/download/licensing', 'BSD', 'https://www.broadinstitute.org/gatk/about/#licensing']"
|
||||||
doi: ""
|
|
||||||
licence: "['https://software.broadinstitute.org/gatk/download/licensing', 'https://www.broadinstitute.org/gatk/about/#licensing', 'BSD']"
|
|
||||||
|
|
||||||
## TODO nf-core: Add a description of all of the variables used as input
|
|
||||||
input:
|
input:
|
||||||
# Only when we have meta
|
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
#
|
|
||||||
## TODO nf-core: Delete / customise this example input
|
|
||||||
- bam:
|
- bam:
|
||||||
type: file
|
type: file
|
||||||
description: BAM/CRAM/SAM file
|
description: Sorted and indexed BAM/CRAM/SAM file
|
||||||
pattern: "*.{bam,cram,sam}"
|
pattern: "*.bam"
|
||||||
|
- bai:
|
||||||
|
type: file
|
||||||
|
description: BAM index file
|
||||||
|
pattern: "*.bai"
|
||||||
|
- fasta:
|
||||||
|
type: file
|
||||||
|
description: Reference file used to generate BAM file
|
||||||
|
pattern: ".{fasta,fa,fna}"
|
||||||
|
- fasta_fai:
|
||||||
|
type: file
|
||||||
|
description: Index of reference file used to generate BAM file
|
||||||
|
pattern: ".fai"
|
||||||
|
- dict:
|
||||||
|
type: file
|
||||||
|
description: GATK dict file for reference
|
||||||
|
pattern: ".dict"
|
||||||
|
- known_vcf:
|
||||||
|
type: file
|
||||||
|
description: Optional input VCF file(s) with known indels
|
||||||
|
pattern: ".vcf"
|
||||||
|
|
||||||
## TODO nf-core: Add a description of all of the variables used as output
|
|
||||||
output:
|
output:
|
||||||
#Only when we have meta
|
|
||||||
- meta:
|
- meta:
|
||||||
type: map
|
type: map
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
#
|
|
||||||
- versions:
|
- versions:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software versions
|
description: File containing software versions
|
||||||
pattern: "versions.yml"
|
pattern: "versions.yml"
|
||||||
## TODO nf-core: Delete / customise this example output
|
- intervals:
|
||||||
- bam:
|
|
||||||
type: file
|
type: file
|
||||||
description: Sorted BAM/CRAM/SAM file
|
description: File containg intervals that represent sites of extant and potential indels.
|
||||||
pattern: "*.{bam,cram,sam}"
|
pattern: "*.intervals"
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@jfy133"
|
- "@jfy133"
|
||||||
|
|
|
@ -8,8 +8,14 @@ workflow test_gatk_realignertargetcreator {
|
||||||
|
|
||||||
input = [
|
input = [
|
||||||
[ id:'test', single_end:false ], // meta map
|
[ id:'test', single_end:false ], // meta map
|
||||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
reference = [
|
||||||
|
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),
|
||||||
|
file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true),
|
||||||
|
file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true),
|
||||||
]
|
]
|
||||||
|
|
||||||
GATK_REALIGNERTARGETCREATOR ( input )
|
GATK_REALIGNERTARGETCREATOR ( input, reference, [] )
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,8 @@
|
||||||
## TODO nf-core: Please run the following command to build this file:
|
- name: gatk realignertargetcreator test_gatk_realignertargetcreator
|
||||||
# nf-core modules create-test-yml gatk/realignertargetcreator
|
|
||||||
- name: "gatk realignertargetcreator"
|
|
||||||
command: nextflow run ./tests/modules/gatk/realignertargetcreator -entry test_gatk_realignertargetcreator -c ./tests/config/nextflow.config -c ./tests/modules/gatk/realignertargetcreator/nextflow.config
|
command: nextflow run ./tests/modules/gatk/realignertargetcreator -entry test_gatk_realignertargetcreator -c ./tests/config/nextflow.config -c ./tests/modules/gatk/realignertargetcreator/nextflow.config
|
||||||
tags:
|
tags:
|
||||||
- "gatk"
|
- gatk
|
||||||
#
|
- gatk/realignertargetcreator
|
||||||
- "gatk/realignertargetcreator"
|
|
||||||
#
|
|
||||||
files:
|
files:
|
||||||
- path: "output/gatk/test.bam"
|
- path: output/gatk/test.intervals
|
||||||
md5sum: e667c7caad0bc4b7ac383fd023c654fc
|
md5sum: 7aa7a1b235a510e6591e262382086bf8
|
||||||
- path: output/gatk/versions.yml
|
|
||||||
md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b
|
|
||||||
|
|
Loading…
Reference in a new issue