mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Add indices and meta
This commit is contained in:
parent
15fba1dd7c
commit
5ae757121f
3 changed files with 73 additions and 36 deletions
|
@ -8,16 +8,17 @@ process GATK4_FILTERVARIANTTRANCHES {
|
|||
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(vcf), path(intervals)
|
||||
path ressources
|
||||
tuple val(meta), path(vcf), path(tbi),path(intervals)
|
||||
path resources
|
||||
path resources_index
|
||||
path fasta
|
||||
path fai
|
||||
path dict
|
||||
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.bam"), emit: bam
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
@ -26,7 +27,7 @@ process GATK4_FILTERVARIANTTRANCHES {
|
|||
def args = task.ext.args ?: ''
|
||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||
|
||||
def ressources = ressources.collect{"--ressources $it"}.join(' ')
|
||||
def resources = resources.collect{"--resource $it"}.join(' ')
|
||||
def avail_mem = 3
|
||||
if (!task.memory) {
|
||||
log.info '[GATK FilterVariantTranches] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
||||
|
@ -36,7 +37,7 @@ process GATK4_FILTERVARIANTTRANCHES {
|
|||
"""
|
||||
gatk --java-options "-Xmx${avail_mem}g" FilterVariantTranches \\
|
||||
--variant $vcf \\
|
||||
$ressources \\
|
||||
$resources \\
|
||||
--output ${prefix}.filtered.vcf.gz \\
|
||||
--tmp-dir . \\
|
||||
$args
|
||||
|
|
|
@ -1,51 +1,64 @@
|
|||
name: "gatk4_filtervarianttranches"
|
||||
## TODO nf-core: Add a description of the module and list keywords
|
||||
description: write your description here
|
||||
description: Apply tranche filtering
|
||||
keywords:
|
||||
- sort
|
||||
- gatk4
|
||||
- filtervarianttranches
|
||||
|
||||
tools:
|
||||
- "gatk4":
|
||||
## TODO nf-core: Add a description and other details for the software below
|
||||
description: "Genome Analysis Toolkit (GATK4)"
|
||||
homepage: "None"
|
||||
documentation: "None"
|
||||
tool_dev_url: "https://github.com/broadinstitute/gatk"
|
||||
doi: ""
|
||||
licence: "['BSD-3-clause']"
|
||||
description: Genome Analysis Toolkit (GATK4)
|
||||
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||
documentation: https://gatk.broadinstitute.org/hc/en-us
|
||||
tool_dev_url: https://github.com/broadinstitute/gatk
|
||||
doi: "10.1158/1538-7445.AM2017-3590"
|
||||
licence: ["BSD-3-clause"]
|
||||
|
||||
## 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:
|
||||
- vcf:
|
||||
type: file
|
||||
description: BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
description: a VCF file containing variants, must have info key:CNN_2D
|
||||
pattern: "*.vcf.gz"
|
||||
- tbi:
|
||||
type: file
|
||||
description: tbi file matching with -vcf
|
||||
pattern: "*.vcf.gz.tbi"
|
||||
- resources:
|
||||
type: list
|
||||
description: resource A VCF containing known SNP and or INDEL sites. Can be supplied as many times as necessary
|
||||
pattern: "*.vcf.gz"
|
||||
- resources_index:
|
||||
type: list
|
||||
description: Index of resource VCF containing known SNP and or INDEL sites. Can be supplied as many times as necessary
|
||||
pattern: "*.vcf.gz"
|
||||
- fasta:
|
||||
type: file
|
||||
description: The reference fasta file
|
||||
pattern: "*.fasta"
|
||||
- fai:
|
||||
type: file
|
||||
description: Index of reference fasta file
|
||||
pattern: "fasta.fai"
|
||||
- dict:
|
||||
|
||||
## 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:
|
||||
- vcf:
|
||||
type: file
|
||||
description: Sorted BAM/CRAM/SAM file
|
||||
pattern: "*.{bam,cram,sam}"
|
||||
description: VCF file
|
||||
pattern: "*.vcf.gz"
|
||||
|
||||
authors:
|
||||
- "@FriederikeHanssen"
|
||||
|
|
|
@ -5,11 +5,34 @@ nextflow.enable.dsl = 2
|
|||
include { GATK4_FILTERVARIANTTRANCHES } from '../../../../modules/gatk4/filtervarianttranches/main.nf'
|
||||
|
||||
workflow test_gatk4_filtervarianttranches {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
||||
]
|
||||
|
||||
GATK4_FILTERVARIANTTRANCHES ( input )
|
||||
input = [ [ id:'test' ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true),
|
||||
[]
|
||||
]
|
||||
|
||||
resources = [
|
||||
file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz'], checkIfExists: true),
|
||||
//file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz'], checkIfExists: true),
|
||||
//file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz'], checkIfExists: true),
|
||||
//file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true)
|
||||
]
|
||||
resources_index =[ file(params.test_data['homo_sapiens']['genome']['hapmap_3_3_hg38_21_vcf_gz_tbi'], checkIfExists: true),
|
||||
//file(params.test_data['homo_sapiens']['genome']['res_1000g_omni2_5_hg38_21_vcf_gz_tbi'], checkIfExists: true),
|
||||
//file(params.test_data['homo_sapiens']['genome']['res_1000g_phase1_snps_hg38_21_vcf_gz_tbi'], checkIfExists: true),
|
||||
//file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true)
|
||||
]
|
||||
// , [
|
||||
// 'hapmap,known=false,training=true,truth=true,prior=15.0 hapmap_3.3.hg38.vcf.gz',
|
||||
// 'omni,known=false,training=true,truth=false,prior=12.0 1000G_omni2.5.hg38.vcf.gz',
|
||||
// '1000G,known=false,training=true,truth=false,prior=10.0 1000G_phase1.snps.hg38.vcf.gz',
|
||||
// 'dbsnp,known=true,training=false,truth=false,prior=2.0 dbsnp_138.hg38.vcf.gz'
|
||||
// ]]
|
||||
|
||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
|
||||
dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true)
|
||||
|
||||
GATK4_FILTERVARIANTTRANCHES ( input, resources, resources_index, fasta, fai, dict)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue