mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58: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,13 +8,13 @@ process GATK_REALIGNERTARGETCREATOR {
|
|||
'quay.io/biocontainers/gatk:3.5--hdfd78af_11' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
tuple val(meta), path(reference)
|
||||
tuple val(meta), path(known_vcf)
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
tuple path(fasta), path(fasta_fai), path(fasta_dict)
|
||||
path(known_vcf)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path("*.intervals"), emit: intervals
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
@ -22,16 +22,16 @@ process GATK_REALIGNERTARGETCREATOR {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
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!"
|
||||
|
||||
"""
|
||||
gatk3 \\
|
||||
-T RealigerTargetCreator \\
|
||||
-nt ${task.cpus}
|
||||
-T RealignerTargetCreator \\
|
||||
-nt ${task.cpus} \\
|
||||
-I ${bam} \\
|
||||
-R ${reference} \\
|
||||
-o ${prefix}.bam \\
|
||||
-R ${fasta} \\
|
||||
-o ${prefix}.intervals \\
|
||||
${known} \\
|
||||
$args
|
||||
|
||||
|
|
|
@ -1,51 +1,64 @@
|
|||
name: "gatk_realignertargetcreator"
|
||||
## TODO nf-core: Add a description of the module and list keywords
|
||||
description: write your description here
|
||||
description: Generates a list of locations that should be considered for local realignment prior genotyping.
|
||||
keywords:
|
||||
- sort
|
||||
- bam
|
||||
- vcf
|
||||
- variant calling
|
||||
- indel
|
||||
- realignment
|
||||
- targets
|
||||
tools:
|
||||
- "gatk":
|
||||
## TODO nf-core: Add a description and other details for the software below
|
||||
description: "The full Genome Analysis Toolkit (GATK) framework, license restricted."
|
||||
homepage: "None"
|
||||
documentation: "None"
|
||||
tool_dev_url: "None"
|
||||
doi: ""
|
||||
licence: "['https://software.broadinstitute.org/gatk/download/licensing', 'https://www.broadinstitute.org/gatk/about/#licensing', 'BSD']"
|
||||
homepage: "https://gatk.broadinstitute.org/hc/en-us"
|
||||
documentation: "https://github.com/broadinstitute/gatk-docs"
|
||||
licence: "['https://software.broadinstitute.org/gatk/download/licensing', 'BSD', 'https://www.broadinstitute.org/gatk/about/#licensing']"
|
||||
|
||||
## TODO nf-core: Add a description of all of the variables used as input
|
||||
input:
|
||||
# Only when we have meta
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
#
|
||||
## TODO nf-core: Delete / customise this example input
|
||||
- bam:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
description: Sorted and indexed BAM/CRAM/SAM file
|
||||
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:
|
||||
#Only when we have meta
|
||||
- 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"
|
||||
## TODO nf-core: Delete / customise this example output
|
||||
- bam:
|
||||
- intervals:
|
||||
type: file
|
||||
description: Sorted BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
description: File containg intervals that represent sites of extant and potential indels.
|
||||
pattern: "*.intervals"
|
||||
|
||||
authors:
|
||||
- "@jfy133"
|
||||
|
|
|
@ -5,11 +5,17 @@ nextflow.enable.dsl = 2
|
|||
include { GATK_REALIGNERTARGETCREATOR } from '../../../../modules/gatk/realignertargetcreator/main.nf'
|
||||
|
||||
workflow test_gatk_realignertargetcreator {
|
||||
|
||||
|
||||
input = [
|
||||
[ 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:
|
||||
# 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
|
||||
- name: gatk realignertargetcreator test_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
|
||||
tags:
|
||||
- "gatk"
|
||||
#
|
||||
- "gatk/realignertargetcreator"
|
||||
#
|
||||
- gatk
|
||||
- gatk/realignertargetcreator
|
||||
files:
|
||||
- path: "output/gatk/test.bam"
|
||||
md5sum: e667c7caad0bc4b7ac383fd023c654fc
|
||||
- path: output/gatk/versions.yml
|
||||
md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b
|
||||
- path: output/gatk/test.intervals
|
||||
md5sum: 7aa7a1b235a510e6591e262382086bf8
|
||||
|
|
Loading…
Reference in a new issue