mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Add GATK UnifiedGenotyper
This commit is contained in:
parent
a14855dbe8
commit
a565d9072a
4 changed files with 37 additions and 31 deletions
|
@ -12,15 +12,14 @@ process GATK_UNIFIEDGENOTYPER {
|
|||
path(fasta)
|
||||
path(fai)
|
||||
path(dict)
|
||||
path(known_vcf)
|
||||
path(intervals)
|
||||
path(contamination)
|
||||
path(dbsnps)
|
||||
path(dbsnp)
|
||||
path(comp)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
||||
path "versions.yml" , emit: versions
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
@ -29,7 +28,7 @@ process GATK_UNIFIEDGENOTYPER {
|
|||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
def contamination_file = contamination ? "-contaminationFile ${contamination}" : ""
|
||||
def dbsnps_file = dbsnps ? "--dbsnp ${dbsnps}" : ""
|
||||
def dbsnp_file = dbsnp ? "--dbsnp ${dbsnp}" : ""
|
||||
def comp_file = comp ? "--comp ${comp}" : ""
|
||||
def intervals_file = intervals ? "--intervals ${intervals}" : ""
|
||||
|
||||
|
@ -48,9 +47,9 @@ process GATK_UNIFIEDGENOTYPER {
|
|||
-I ${input} \\
|
||||
-R ${fasta} \\
|
||||
${contamination_file} \\
|
||||
${dbsnps_file} \\
|
||||
${dbsnp_file} \\
|
||||
${comp_file} \\
|
||||
${intervals_file}
|
||||
${intervals_file} \\
|
||||
-o ${prefix}.vcf \\
|
||||
$args
|
||||
|
||||
|
@ -58,7 +57,7 @@ process GATK_UNIFIEDGENOTYPER {
|
|||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
gatk: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' ))
|
||||
gatk: \$(echo \$(gatk3 --version))
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -3,9 +3,6 @@ keywords:
|
|||
- bam
|
||||
- vcf
|
||||
- variant calling
|
||||
- indel
|
||||
- realignment
|
||||
- targets
|
||||
tools:
|
||||
- "gatk":
|
||||
description: "The full Genome Analysis Toolkit (GATK) framework, license restricted."
|
||||
|
@ -39,10 +36,22 @@ input:
|
|||
type: file
|
||||
description: GATK dict file for reference
|
||||
pattern: ".dict"
|
||||
- known_vcf:
|
||||
- intervals:
|
||||
type: file
|
||||
description: Optional input VCF file(s) with known indels
|
||||
pattern: ".vcf"
|
||||
description: Bed file with the genomic regions included in the library (optional)
|
||||
pattern: "*.intervals"
|
||||
- contamination:
|
||||
type: file
|
||||
description: Tab-separated file containing fraction of contamination in sequencing data (per sample) to aggressively remove
|
||||
pattern: "*"
|
||||
- dbsnps:
|
||||
type: file
|
||||
description: VCF file containing known sites (optional)
|
||||
pattern: "*"
|
||||
- comp:
|
||||
type: file
|
||||
description: Comparison VCF file (optional)
|
||||
pattern: "*"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
|
|
|
@ -5,11 +5,14 @@ nextflow.enable.dsl = 2
|
|||
include { GATK_UNIFIEDGENOTYPER } from '../../../../modules/gatk/unifiedgenotyper/main.nf'
|
||||
|
||||
workflow test_gatk_unifiedgenotyper {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
||||
]
|
||||
|
||||
GATK_UNIFIEDGENOTYPER ( input )
|
||||
input = [ [ id:'test' ], // meta map
|
||||
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),
|
||||
]
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)
|
||||
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
|
||||
|
||||
GATK_UNIFIEDGENOTYPER ( input, fasta, fai, dict, [], [], [], [])
|
||||
}
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
## TODO nf-core: Please run the following command to build this file:
|
||||
# nf-core modules create-test-yml gatk/unifiedgenotyper
|
||||
- name: "gatk unifiedgenotyper"
|
||||
command: nextflow run ./tests/modules/gatk/unifiedgenotyper -entry test_gatk_unifiedgenotyper -c ./tests/config/nextflow.config -c ./tests/modules/gatk/unifiedgenotyper/nextflow.config
|
||||
- name: gatk unifiedgenotyper test_gatk_unifiedgenotyper
|
||||
command: nextflow run ./tests/modules/gatk/unifiedgenotyper -entry test_gatk_unifiedgenotyper -c ./tests/config/nextflow.config -c ./tests/modules/gatk/unifiedgenotyper/nextflow.config
|
||||
tags:
|
||||
- "gatk"
|
||||
#
|
||||
- "gatk/unifiedgenotyper"
|
||||
#
|
||||
- gatk
|
||||
- gatk/unifiedgenotyper
|
||||
files:
|
||||
- path: "output/gatk/test.bam"
|
||||
md5sum: e667c7caad0bc4b7ac383fd023c654fc
|
||||
- path: output/gatk/versions.yml
|
||||
md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b
|
||||
- path: output/gatk/test.vcf.gz
|
||||
contains:
|
||||
- "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT test"
|
||||
|
|
Loading…
Reference in a new issue