mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-18 02:46:13 -05:00
Add indices and meta
This commit is contained in:
parent
15fba1dd7c
commit
5ae757121f
3 changed files with 73 additions and 36 deletions
|
@ -8,15 +8,16 @@ process GATK4_FILTERVARIANTTRANCHES {
|
||||||
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
|
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(vcf), path(intervals)
|
tuple val(meta), path(vcf), path(tbi),path(intervals)
|
||||||
path ressources
|
path resources
|
||||||
|
path resources_index
|
||||||
path fasta
|
path fasta
|
||||||
path fai
|
path fai
|
||||||
path dict
|
path dict
|
||||||
|
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.bam"), emit: bam
|
tuple val(meta), path("*.vcf.gz"), emit: vcf
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
when:
|
when:
|
||||||
|
@ -26,7 +27,7 @@ process GATK4_FILTERVARIANTTRANCHES {
|
||||||
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 ressources = ressources.collect{"--ressources $it"}.join(' ')
|
def resources = resources.collect{"--resource $it"}.join(' ')
|
||||||
def avail_mem = 3
|
def avail_mem = 3
|
||||||
if (!task.memory) {
|
if (!task.memory) {
|
||||||
log.info '[GATK FilterVariantTranches] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
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 \\
|
gatk --java-options "-Xmx${avail_mem}g" FilterVariantTranches \\
|
||||||
--variant $vcf \\
|
--variant $vcf \\
|
||||||
$ressources \\
|
$resources \\
|
||||||
--output ${prefix}.filtered.vcf.gz \\
|
--output ${prefix}.filtered.vcf.gz \\
|
||||||
--tmp-dir . \\
|
--tmp-dir . \\
|
||||||
$args
|
$args
|
||||||
|
|
|
@ -1,51 +1,64 @@
|
||||||
name: "gatk4_filtervarianttranches"
|
name: "gatk4_filtervarianttranches"
|
||||||
## TODO nf-core: Add a description of the module and list keywords
|
description: Apply tranche filtering
|
||||||
description: write your description here
|
|
||||||
keywords:
|
keywords:
|
||||||
- sort
|
- gatk4
|
||||||
|
- filtervarianttranches
|
||||||
|
|
||||||
tools:
|
tools:
|
||||||
- "gatk4":
|
- "gatk4":
|
||||||
## TODO nf-core: Add a description and other details for the software below
|
description: Genome Analysis Toolkit (GATK4)
|
||||||
description: "Genome Analysis Toolkit (GATK4)"
|
homepage: https://gatk.broadinstitute.org/hc/en-us
|
||||||
homepage: "None"
|
documentation: https://gatk.broadinstitute.org/hc/en-us
|
||||||
documentation: "None"
|
tool_dev_url: https://github.com/broadinstitute/gatk
|
||||||
tool_dev_url: "https://github.com/broadinstitute/gatk"
|
doi: "10.1158/1538-7445.AM2017-3590"
|
||||||
doi: ""
|
licence: ["BSD-3-clause"]
|
||||||
licence: "['BSD-3-clause']"
|
|
||||||
|
|
||||||
## 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 ]
|
||||||
#
|
- vcf:
|
||||||
## TODO nf-core: Delete / customise this example input
|
|
||||||
- bam:
|
|
||||||
type: file
|
type: file
|
||||||
description: BAM/CRAM/SAM file
|
description: a VCF file containing variants, must have info key:CNN_2D
|
||||||
pattern: "*.{bam,cram,sam}"
|
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:
|
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
|
- vcf:
|
||||||
- bam:
|
|
||||||
type: file
|
type: file
|
||||||
description: Sorted BAM/CRAM/SAM file
|
description: VCF file
|
||||||
pattern: "*.{bam,cram,sam}"
|
pattern: "*.vcf.gz"
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@FriederikeHanssen"
|
- "@FriederikeHanssen"
|
||||||
|
|
|
@ -6,10 +6,33 @@ include { GATK4_FILTERVARIANTTRANCHES } from '../../../../modules/gatk4/filterva
|
||||||
|
|
||||||
workflow test_gatk4_filtervarianttranches {
|
workflow test_gatk4_filtervarianttranches {
|
||||||
|
|
||||||
input = [
|
input = [ [ id:'test' ], // meta map
|
||||||
[ id:'test', single_end:false ], // meta map
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true),
|
||||||
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true),
|
||||||
|
[]
|
||||||
]
|
]
|
||||||
|
|
||||||
GATK4_FILTERVARIANTTRANCHES ( input )
|
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…
Add table
Reference in a new issue