mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
modify test path - module gatk4 + added new module gatk4/haplotypecaller (#382)
* new module: samtools/fastq * solve conflict: pytest_software.yml * solve linting conflicts * solved EditorConfig linting problem * Module samtools/fastq: * output compressed fastq.gz file(s) * add if conditionals for single/paired reads * samtools/fastq: modified test.yml * samtools/fastq: modified main.nf to avoid duplicated part of the script section * fix README.md * modify test path gatk4 * fix config * Add new module gatk4/haplotypecaller * solve check issues * fix test.yml file * fix test.yml gz.tbi * Update software/gatk4/haplotypecaller/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/gatk4/haplotypecaller/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/gatk4/haplotypecaller/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/gatk4/haplotypecaller/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/gatk4/haplotypecaller/meta.yml Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update tests/software/gatk4/haplotypecaller/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: suzannejin <suzanne.jin@crg.eu> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
parent
e526eae472
commit
989fb7d5b7
26 changed files with 319 additions and 109 deletions
60
software/gatk4/haplotypecaller/functions.nf
Normal file
60
software/gatk4/haplotypecaller/functions.nf
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* -----------------------------------------------------
|
||||
* Utility functions used in nf-core DSL2 module files
|
||||
* -----------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Extract name of software tool from process name using $task.process
|
||||
*/
|
||||
def getSoftwareName(task_process) {
|
||||
return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to initialise default values and to generate a Groovy Map of available options for nf-core modules
|
||||
*/
|
||||
def initOptions(Map args) {
|
||||
def Map options = [:]
|
||||
options.args = args.args ?: ''
|
||||
options.args2 = args.args2 ?: ''
|
||||
options.args3 = args.args3 ?: ''
|
||||
options.publish_by_id = args.publish_by_id ?: false
|
||||
options.publish_dir = args.publish_dir ?: ''
|
||||
options.publish_files = args.publish_files
|
||||
options.suffix = args.suffix ?: ''
|
||||
return options
|
||||
}
|
||||
|
||||
/*
|
||||
* Tidy up and join elements of a list to return a path string
|
||||
*/
|
||||
def getPathFromList(path_list) {
|
||||
def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries
|
||||
paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes
|
||||
return paths.join('/')
|
||||
}
|
||||
|
||||
/*
|
||||
* Function to save/publish module results
|
||||
*/
|
||||
def saveFiles(Map args) {
|
||||
if (!args.filename.endsWith('.version.txt')) {
|
||||
def ioptions = initOptions(args.options)
|
||||
def path_list = [ ioptions.publish_dir ?: args.publish_dir ]
|
||||
if (ioptions.publish_by_id) {
|
||||
path_list.add(args.publish_id)
|
||||
}
|
||||
if (ioptions.publish_files instanceof Map) {
|
||||
for (ext in ioptions.publish_files) {
|
||||
if (args.filename.endsWith(ext.key)) {
|
||||
def ext_list = path_list.collect()
|
||||
ext_list.add(ext.value)
|
||||
return "${getPathFromList(ext_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
} else if (ioptions.publish_files == null) {
|
||||
return "${getPathFromList(path_list)}/$args.filename"
|
||||
}
|
||||
}
|
||||
}
|
52
software/gatk4/haplotypecaller/main.nf
Normal file
52
software/gatk4/haplotypecaller/main.nf
Normal file
|
@ -0,0 +1,52 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
params.options = [:]
|
||||
options = initOptions(params.options)
|
||||
|
||||
process GATK4_HAPLOTYPECALLER {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||
|
||||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null)
|
||||
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||||
container "https://depot.galaxyproject.org/singularity/gatk4:4.2.0.0--0"
|
||||
} else {
|
||||
container "quay.io/biocontainers/gatk4:4.2.0.0--0"
|
||||
}
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam), path(bai)
|
||||
path fasta
|
||||
path fai
|
||||
path dict
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
||||
tuple val(meta), path("*.tbi") , emit: tbi
|
||||
path "*.version.txt" , emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
log.info '[GATK HaplotypeCaller] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||
} else {
|
||||
avail_mem = task.memory.giga
|
||||
}
|
||||
"""
|
||||
gatk \\
|
||||
--java-options "-Xmx${avail_mem}g" \\
|
||||
HaplotypeCaller \\
|
||||
-R $fasta \\
|
||||
-I $bam \\
|
||||
-O ${prefix}.vcf.gz \\
|
||||
$options.args
|
||||
|
||||
gatk --version | grep Picard | sed "s/Picard Version: //g" > ${software}.version.txt
|
||||
"""
|
||||
}
|
63
software/gatk4/haplotypecaller/meta.yml
Normal file
63
software/gatk4/haplotypecaller/meta.yml
Normal file
|
@ -0,0 +1,63 @@
|
|||
name: gatk4_haplotypecaller
|
||||
description: Call germline SNPs and indels via local re-assembly of haplotypes
|
||||
keywords:
|
||||
- gatk4
|
||||
- haplotypecaller
|
||||
- haplotype
|
||||
tools:
|
||||
- gatk4:
|
||||
description: |
|
||||
Developed in the Data Sciences Platform at the Broad Institute, the toolkit offers a wide variety of tools
|
||||
with a primary focus on variant discovery and genotyping. Its powerful processing engine
|
||||
and high-performance computing features make it capable of taking on projects of any size.
|
||||
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||
documentation: https://gatk.broadinstitute.org/hc/en-us/categories/360002369672s
|
||||
doi: 10.1158/1538-7445.AM2017-3590
|
||||
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- bam:
|
||||
type: file
|
||||
description: BAM file
|
||||
pattern: "*.bam"
|
||||
- bai:
|
||||
type: file
|
||||
description: Index of BAM file
|
||||
pattern: "*.bam.bai"
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
pattern: "*.fasta"
|
||||
- fai:
|
||||
type: file
|
||||
description: Index of reference fasta file
|
||||
pattern: "fasta.fai"
|
||||
- dict:
|
||||
type: file
|
||||
description: GATK sequence dictionary
|
||||
pattern: "*.dict"
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- version:
|
||||
type: file
|
||||
description: File containing software version
|
||||
pattern: "*.{version.txt}"
|
||||
- vcf:
|
||||
type: file
|
||||
description: Compressed VCF file
|
||||
pattern: "*.vcf.gz"
|
||||
- tbi:
|
||||
type: file
|
||||
description: Index of VCF file
|
||||
pattern: "*.vcf.gz.tbi"
|
||||
|
||||
authors:
|
||||
- "@suzannejin"
|
|
@ -202,6 +202,10 @@ gatk4_fastqtosam:
|
|||
- software/gatk4/fastqtosam/**
|
||||
- tests/software/gatk4/fastqtosam/**
|
||||
|
||||
gatk4_haplotypecaller:
|
||||
- software/gatk4/haplotypecaller/**
|
||||
- tests/software/gatk4/haplotypecaller/**
|
||||
|
||||
gatk4_mergebamalignment:
|
||||
- software/gatk4/mergebamalignment/**
|
||||
- tests/software/gatk4/mergebamalignment/**
|
||||
|
|
|
@ -6,25 +6,25 @@ include { GATK4_APPLYBQSR } from '../../../../software/gatk4/applybqsr/main.nf'
|
|||
|
||||
workflow test_gatk4_applybqsr {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/gatk/test.table", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true)
|
||||
]
|
||||
fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
|
||||
fai = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta.fai", checkIfExists: true)
|
||||
dict = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.dict", 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)
|
||||
|
||||
GATK4_APPLYBQSR ( input, fasta, fai, dict, [] )
|
||||
}
|
||||
|
||||
workflow test_gatk4_applybqsr_intervals {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/gatk/test.table", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_baserecalibrator_table'], checkIfExists: true)
|
||||
]
|
||||
fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
|
||||
fai = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta.fai", checkIfExists: true)
|
||||
dict = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.dict", checkIfExists: true)
|
||||
intervals = file("${launchDir}/tests/data/genomics/sarscov2/genome/bed/test.bed", 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)
|
||||
intervals = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
|
||||
|
||||
GATK4_APPLYBQSR ( input, fasta, fai, dict, intervals )
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
- name: gatk4 applybqsr test_gatk4_applybqsr
|
||||
command: nextflow run tests/software/gatk4/applybqsr -entry test_gatk4_applybqsr -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_applybqsr
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test.bam
|
||||
md5sum: 943a43de5f575a0435fe13072cbc15c8
|
||||
md5sum: 139a5ffc7601ce3cfa7a896cd381542a
|
||||
|
||||
- name: "\e[3~"
|
||||
- name: gatk4 applybqsr test_gatk4_applybqsr_intervals
|
||||
command: nextflow run tests/software/gatk4/applybqsr -entry test_gatk4_applybqsr_intervals -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_applybqsr_intervals
|
||||
- gatk4_applybqsr
|
||||
- gatk4_applybqsr_intervals
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test.bam
|
||||
md5sum: a92238a9a78da48bf437fd5b7d9790a3
|
||||
md5sum: 5b1f6fa2525124c281f71e5a76d28482
|
||||
|
|
|
@ -6,43 +6,43 @@ include { GATK4_BASERECALIBRATOR } from '../../../../software/gatk4/baserecalibr
|
|||
|
||||
workflow test_gatk4_baserecalibrator {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
|
||||
fai = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta.fai", checkIfExists: true)
|
||||
dict = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.dict", checkIfExists: true)
|
||||
sites = file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf.gz", checkIfExists: true)
|
||||
sites_tbi = file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi", 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)
|
||||
sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true)
|
||||
sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)
|
||||
|
||||
GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, [], sites, sites_tbi )
|
||||
}
|
||||
|
||||
workflow test_gatk4_baserecalibrator_intervals {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
|
||||
fai = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta.fai", checkIfExists: true)
|
||||
dict = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.dict", checkIfExists: true)
|
||||
intervals = file("${launchDir}/tests/data/genomics/sarscov2/genome/bed/test.bed", checkIfExists: true)
|
||||
sites = file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf.gz", checkIfExists: true)
|
||||
sites_tbi = file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi", 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)
|
||||
intervals = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true)
|
||||
sites = file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true)
|
||||
sites_tbi = file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)
|
||||
|
||||
GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, intervals, sites, sites_tbi )
|
||||
}
|
||||
|
||||
workflow test_gatk4_baserecalibrator_multiple_sites {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)
|
||||
]
|
||||
fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
|
||||
fai = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta.fai", checkIfExists: true)
|
||||
dict = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.dict", checkIfExists: true)
|
||||
sites = [ file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf.gz", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test2.vcf.gz", 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)
|
||||
sites = [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true)
|
||||
]
|
||||
sites_tbi = [ file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test2.vcf.gz.tbi", checkIfExists: true)
|
||||
sites_tbi = [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_vcf_gz_tbi'], checkIfExists: true)
|
||||
]
|
||||
|
||||
GATK4_BASERECALIBRATOR ( input, fasta, fai, dict, [], sites, sites_tbi )
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: gatk4 baserecalibrator test_gatk4_baserecalibrator
|
||||
command: nextflow run tests/software/gatk4/baserecalibrator -entry test_gatk4_baserecalibrator -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_baserecalibrator
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test.table
|
||||
md5sum: e2e43abdc0c943c1a54dae816d0b9ea7
|
||||
|
@ -10,9 +10,9 @@
|
|||
- name: gatk4 baserecalibrator test_gatk4_baserecalibrator_intervals
|
||||
command: nextflow run tests/software/gatk4/baserecalibrator -entry test_gatk4_baserecalibrator_intervals -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_baserecalibrator
|
||||
- gatk4_baserecalibrator_intervals
|
||||
- gatk4_baserecalibrator
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test.table
|
||||
md5sum: 9ecb5f00a2229291705addc09c0ec231
|
||||
|
@ -21,8 +21,8 @@
|
|||
command: nextflow run tests/software/gatk4/baserecalibrator -entry test_gatk4_baserecalibrator_multiple_sites -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4_baserecalibrator_multiple_sites
|
||||
- gatk4
|
||||
- gatk4_baserecalibrator
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test.table
|
||||
md5sum: e2e43abdc0c943c1a54dae816d0b9ea7
|
||||
|
|
|
@ -6,9 +6,9 @@ include { GATK4_BEDTOINTERVALLIST } from '../../../../software/gatk4/bedtointerv
|
|||
|
||||
workflow test_gatk4_bedtointervallist {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/genome/bed/test.bed", checkIfExists: true)]
|
||||
[ file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ]
|
||||
]
|
||||
dict = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.dict", checkIfExists: true)
|
||||
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
|
||||
|
||||
GATK4_BEDTOINTERVALLIST ( input, dict )
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- name: gatk4 bedtointervallist
|
||||
command: nextflow run ./tests/software/gatk4/bedtointervallist -entry test_gatk4_bedtointervallist -c tests/config/nextflow.config
|
||||
- name: gatk4 bedtointervallist test_gatk4_bedtointervallist
|
||||
command: nextflow run tests/software/gatk4/bedtointervallist -entry test_gatk4_bedtointervallist -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_bedtointervallist
|
||||
|
|
|
@ -5,7 +5,7 @@ nextflow.enable.dsl = 2
|
|||
include { GATK4_CREATESEQUENCEDICTIONARY } from '../../../../software/gatk4/createsequencedictionary/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_gatk4_createsequencedictionary {
|
||||
fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
|
||||
GATK4_CREATESEQUENCEDICTIONARY ( fasta )
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: gatk4 createsequencedictionary
|
||||
command: nextflow run ./tests/software/gatk4/createsequencedictionary -entry test_gatk4_createsequencedictionary -c tests/config/nextflow.config
|
||||
- name: gatk4 createsequencedictionary test_gatk4_createsequencedictionary
|
||||
command: nextflow run tests/software/gatk4/createsequencedictionary -entry test_gatk4_createsequencedictionary -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_createsequencedictionary
|
||||
files:
|
||||
- path: ./output/gatk4/test_genome.dict
|
||||
md5sum: 829dd07bd0c9d3be2fd060238c0b37c3
|
||||
- path: output/gatk4/genome.dict
|
||||
md5sum: 7362679f176e0f52add03c08f457f646
|
||||
|
|
|
@ -6,7 +6,7 @@ include { GATK4_FASTQTOSAM } from '../../../../software/gatk4/fastqtosam/main.nf
|
|||
|
||||
workflow test_gatk4_fastqtosam_single_end {
|
||||
input = [ [ id:'test', single_end:true ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)
|
||||
]
|
||||
|
||||
GATK4_FASTQTOSAM ( input )
|
||||
|
@ -14,8 +14,8 @@ workflow test_gatk4_fastqtosam_single_end {
|
|||
|
||||
workflow test_gatk4_fastqtosam_paired_end {
|
||||
input = [ [ id:'test', single_end:false ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_1.fastq.gz", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/fastq/test_2.fastq.gz", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
|
||||
]
|
||||
|
||||
GATK4_FASTQTOSAM ( input )
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
command: nextflow run tests/software/gatk4/fastqtosam -entry test_gatk4_fastqtosam_single_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4_fastqtosam_single_end
|
||||
- gatk4_fastqtosam
|
||||
- gatk4
|
||||
- gatk4_fastqtosam
|
||||
files:
|
||||
- path: output/gatk4/test.bam
|
||||
md5sum: 4967100b2e4912c0e4ce0976d946bafb
|
||||
|
@ -12,8 +12,8 @@
|
|||
command: nextflow run tests/software/gatk4/fastqtosam -entry test_gatk4_fastqtosam_paired_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4_fastqtosam_paired_end
|
||||
- gatk4_fastqtosam
|
||||
- gatk4
|
||||
- gatk4_fastqtosam
|
||||
files:
|
||||
- path: output/gatk4/test.bam
|
||||
md5sum: 4967100b2e4912c0e4ce0976d946bafb
|
||||
|
|
17
tests/software/gatk4/haplotypecaller/main.nf
Normal file
17
tests/software/gatk4/haplotypecaller/main.nf
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { GATK4_HAPLOTYPECALLER } from '../../../../software/gatk4/haplotypecaller/main.nf' addParams( options: [:] )
|
||||
|
||||
workflow test_gatk4_haplotypecaller {
|
||||
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)
|
||||
|
||||
GATK4_HAPLOTYPECALLER ( input, fasta, fai, dict )
|
||||
}
|
13
tests/software/gatk4/haplotypecaller/test.yml
Normal file
13
tests/software/gatk4/haplotypecaller/test.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
- name: gatk4 haplotypecaller test_gatk4_haplotypecaller
|
||||
command: nextflow run tests/software/gatk4/haplotypecaller -entry test_gatk4_haplotypecaller -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4_haplotypecaller
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test.vcf.gz
|
||||
should_exist: true
|
||||
contains:
|
||||
- 'MT192765.1'
|
||||
- '54.60'
|
||||
- '37.32'
|
||||
- path: output/gatk4/test.vcf.gz.tbi
|
|
@ -6,11 +6,11 @@ include { GATK4_MERGEBAMALIGNMENT } from '../../../../software/gatk4/mergebamali
|
|||
|
||||
workflow test_gatk4_mergebamalignment {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_single_end.bam", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true)
|
||||
]
|
||||
unmapped = file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_unaligned.bam", checkIfExists: true)
|
||||
fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true)
|
||||
dict = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.dict", checkIfExists: true)
|
||||
unmapped = file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true)
|
||||
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
|
||||
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
|
||||
|
||||
GATK4_MERGEBAMALIGNMENT ( input, unmapped, fasta, dict )
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: gatk4 mergebamalignment
|
||||
command: nextflow run ./tests/software/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment -c tests/config/nextflow.config
|
||||
- name: gatk4 mergebamalignment test_gatk4_mergebamalignment
|
||||
command: nextflow run tests/software/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_mergebamalignment
|
||||
files:
|
||||
- path: output/gatk4/test.merged.bam
|
||||
md5sum: 825816a6b288d644318c46cc9968e129
|
||||
md5sum: bd4a5e2ea916826aadebb5878333e26f
|
||||
|
|
|
@ -6,10 +6,10 @@ include { GATK4_MERGEVCFS } from '../../../../software/gatk4/mergevcfs/main.nf'
|
|||
|
||||
workflow test_gatk4_mergevcfs {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test2.vcf", checkIfExists: true) ]
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ]
|
||||
]
|
||||
dict = file('tests/data/genomics/sarscov2/genome/genome.dict', checkIfExists: true)
|
||||
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
|
||||
|
||||
GATK4_MERGEVCFS ( input, dict, false )
|
||||
}
|
||||
|
@ -17,10 +17,10 @@ workflow test_gatk4_mergevcfs {
|
|||
workflow test_gatk4_mergevcfs_refdict {
|
||||
def input = []
|
||||
input = [ [ id:'test' ], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test.vcf", checkIfExists: true),
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/vcf/test2.vcf", checkIfExists: true) ]
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true),
|
||||
file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ]
|
||||
]
|
||||
dict = file('tests/data/genomics/sarscov2/genome/genome.dict', checkIfExists: true)
|
||||
dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true)
|
||||
|
||||
GATK4_MERGEVCFS ( input, ref_dict, true )
|
||||
GATK4_MERGEVCFS ( input, dict, true )
|
||||
}
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
- name: gatk4 mergevcfs
|
||||
command: nextflow run ./tests/software/gatk4/mergevcfs -entry test_gatk4_mergevcfs -c tests/config/nextflow.config
|
||||
- name: gatk4 mergevcfs test_gatk4_mergevcfs
|
||||
command: nextflow run tests/software/gatk4/mergevcfs -entry test_gatk4_mergevcfs -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_mergevcfs
|
||||
- gatk4
|
||||
files:
|
||||
- path: output/gatk4/test.merged.vcf.gz
|
||||
md5sum: ff48f175e26db2d4b2957762f6d1c715
|
||||
|
||||
- name: gatk4 mergevcfs refdict
|
||||
command: nextflow run ./tests/software/gatk4/mergevcfs -entry test_gatk4_mergevcfs_refdict -c tests/config/nextflow.config
|
||||
- name: gatk4 mergevcfs test_gatk4_mergevcfs_refdict
|
||||
command: nextflow run tests/software/gatk4/mergevcfs -entry test_gatk4_mergevcfs_refdict -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_mergevcfs
|
||||
- gatk4
|
||||
- gatk4_mergevcfs_refdict
|
||||
files:
|
||||
- path: output/gatk4/test.merged.vcf.gz
|
||||
md5sum: ff48f175e26db2d4b2957762f6d1c715
|
||||
|
|
|
@ -6,7 +6,7 @@ include { GATK4_REVERTSAM } from '../../../../software/gatk4/revertsam/main.nf'
|
|||
|
||||
workflow test_gatk4_revertsam {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.bam", checkIfExists: true)
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
||||
]
|
||||
|
||||
GATK4_REVERTSAM ( input )
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: gatk4 revertsam
|
||||
command: nextflow run ./tests/software/gatk4/revertsam -entry test_gatk4_revertsam -c tests/config/nextflow.config
|
||||
- name: gatk4 revertsam test_gatk4_revertsam
|
||||
command: nextflow run tests/software/gatk4/revertsam -entry test_gatk4_revertsam -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_revertsam
|
||||
files:
|
||||
- path: output/gatk4/test.reverted.bam
|
||||
md5sum: 6de199f7a0577e2a3fe7b3a9cb4ae25d
|
||||
md5sum: f778310b18b83b49929eb648594f96dc
|
||||
|
|
|
@ -6,7 +6,7 @@ include { GATK4_SAMTOFASTQ } from '../../../../software/gatk4/samtofastq/main.nf
|
|||
|
||||
workflow test_gatk4_samtofastq_single_end {
|
||||
input = [ [ id:'test', single_end: true ], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_single_end.bam", checkIfExists: true) ]
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
GATK4_SAMTOFASTQ ( input )
|
||||
|
@ -14,7 +14,7 @@ workflow test_gatk4_samtofastq_single_end {
|
|||
|
||||
workflow test_gatk4_samtofastq_paired_end {
|
||||
input = [ [ id:'test', single_end: false ], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.bam", checkIfExists: true) ]
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
|
||||
]
|
||||
|
||||
GATK4_SAMTOFASTQ ( input )
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
- name: gatk4 samtofastq single-end
|
||||
command: nextflow run ./tests/software/gatk4/samtofastq -entry test_gatk4_samtofastq_single_end -c tests/config/nextflow.config
|
||||
- name: gatk4 samtofastq test_gatk4_samtofastq_single_end
|
||||
command: nextflow run tests/software/gatk4/samtofastq -entry test_gatk4_samtofastq_single_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_samtofastq
|
||||
- gatk4_samtofastq_single_end
|
||||
files:
|
||||
- path: ./output/gatk4/test.fastq.gz
|
||||
- path: output/gatk4/test.fastq.gz
|
||||
md5sum: 50ace41d4c24467f24f8b929540a7797
|
||||
|
||||
- name: gatk4 samtofastq paired-end
|
||||
command: nextflow run ./tests/software/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end -c tests/config/nextflow.config
|
||||
- name: gatk4 samtofastq test_gatk4_samtofastq_paired_end
|
||||
command: nextflow run tests/software/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_samtofastq
|
||||
- gatk4_samtofastq_paired_end
|
||||
files:
|
||||
- path: ./output/gatk4/test_2.fastq.gz
|
||||
md5sum: 613bf64c023609e1c62ad6ce9e4be8d7
|
||||
- path: ./output/gatk4/test_1.fastq.gz
|
||||
- path: output/gatk4/test_1.fastq.gz
|
||||
md5sum: cfea607c9d75fd9ea9704780ad3a499c
|
||||
- path: output/gatk4/test_2.fastq.gz
|
||||
md5sum: 613bf64c023609e1c62ad6ce9e4be8d7
|
||||
|
|
|
@ -6,11 +6,11 @@ include { GATK4_SPLITNCIGARREADS } from '../../../../software/gatk4/splitncigarr
|
|||
|
||||
workflow test_gatk4_splitncigarreads {
|
||||
input = [ [ id:'test' ], // meta map
|
||||
[ file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.bam", checkIfExists: true)]
|
||||
[ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
|
||||
]
|
||||
fasta = [ file("tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true),
|
||||
file("tests/data/genomics/sarscov2/genome/genome.fasta.fai", checkIfExists: true),
|
||||
file("tests/data/genomics/sarscov2/genome/genome.dict", checkIfExists: true)
|
||||
fasta = [ 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)
|
||||
]
|
||||
|
||||
GATK4_SPLITNCIGARREADS ( input, fasta )
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
- name: gatk4 splitncigarreads
|
||||
command: nextflow run ./tests/software/gatk4/splitncigarreads -entry test_gatk4_splitncigarreads -c tests/config/nextflow.config
|
||||
- name: gatk4 splitncigarreads test_gatk4_splitncigarreads
|
||||
command: nextflow run tests/software/gatk4/splitncigarreads -entry test_gatk4_splitncigarreads -c tests/config/nextflow.config
|
||||
tags:
|
||||
- gatk4
|
||||
- gatk4_splitncigarreads
|
||||
files:
|
||||
- path: output/gatk4/test.split_cigar.bam
|
||||
md5sum: 9dd44d3988b9ff238a6b4771cdf13eba
|
||||
md5sum: a8473bd4abc7b13751fc51b92531da4c
|
||||
|
|
Loading…
Reference in a new issue