-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1d3ba8
commit 8877bf2
Showing
9 changed files
with
298 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: bcftools_index | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- bioconda::bcftools=1.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
process BCFTOOLS_INDEX { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': | ||
'biocontainers/bcftools:1.18--h8b25389_0' }" | ||
|
||
input: | ||
tuple val(meta), path(vcf) | ||
|
||
output: | ||
tuple val(meta), path("*.csi"), optional:true, emit: csi | ||
tuple val(meta), path("*.tbi"), optional:true, emit: tbi | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
""" | ||
bcftools \\ | ||
index \\ | ||
$args \\ | ||
--threads $task.cpus \\ | ||
$vcf | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def extension = args.contains("--tsi") || args.contains("-t") ? "tbi" : | ||
"csi" | ||
""" | ||
touch ${vcf}.${extension} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: bcftools_index | ||
description: Index VCF tools | ||
keywords: | ||
- vcf | ||
- index | ||
- bcftools | ||
- csi | ||
- tbi | ||
tools: | ||
- bcftools: | ||
description: BCFtools is a set of utilities that manipulate variant calls in the Variant Call Format (VCF) and its binary counterpart BCF. All commands work transparently with both VCFs and BCFs, both uncompressed and BGZF-compressed. Most commands accept VCF, bgzipped VCF and BCF with filetype detected automatically even when streaming from a pipe. Indexed VCF and BCF will work in all situations. Un-indexed VCF and BCF and streams will work in most, but not all situations. | ||
homepage: https://samtools.github.io/bcftools/ | ||
documentation: https://samtools.github.io/bcftools/howtos/index.html | ||
tool_dev_url: https://github.com/samtools/bcftools | ||
doi: "10.1093/gigascience/giab008" | ||
licence: ["MIT", "GPL-3.0-or-later"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- VCF: | ||
type: file | ||
description: VCF file (optionally GZIPPED) | ||
pattern: "*.{vcf,vcf.gz}" | ||
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: "versions.yml" | ||
- csi: | ||
type: file | ||
description: Default VCF file index file | ||
pattern: "*.csi" | ||
- tbi: | ||
type: file | ||
description: Alternative VCF file index file for larger files (activated with -t parameter) | ||
pattern: "*.tbi" | ||
authors: | ||
- "@jfy133" | ||
maintainers: | ||
- "@jfy133" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: bcftools_merge | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- bioconda::bcftools=1.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
process BCFTOOLS_MERGE { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/bcftools:1.18--h8b25389_0': | ||
'biocontainers/bcftools:1.18--h8b25389_0' }" | ||
|
||
input: | ||
tuple val(meta), path(vcfs), path(tbis) | ||
tuple val(meta2), path(fasta) | ||
tuple val(meta3), path(fai) | ||
path(bed) | ||
|
||
output: | ||
tuple val(meta), path("*.{bcf,vcf}{,.gz}"), emit: merged_variants | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
def regions = bed ? "--regions-file $bed" : "" | ||
def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : | ||
args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : | ||
args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : | ||
args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : | ||
"vcf" | ||
|
||
""" | ||
bcftools merge \\ | ||
$args \\ | ||
$regions \\ | ||
--threads $task.cpus \\ | ||
--output ${prefix}.${extension} \\ | ||
$vcfs | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : | ||
args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : | ||
args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : | ||
args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : | ||
"vcf" | ||
""" | ||
touch ${prefix}.${extension} | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//') | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: bcftools_merge | ||
description: Merge VCF files | ||
keywords: | ||
- variant calling | ||
- merge | ||
- VCF | ||
tools: | ||
- merge: | ||
description: | | ||
Merge VCF files. | ||
homepage: http://samtools.github.io/bcftools/bcftools.html | ||
documentation: http://www.htslib.org/doc/bcftools.html | ||
doi: 10.1093/bioinformatics/btp352 | ||
licence: ["MIT"] | ||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- vcfs: | ||
type: file | ||
description: | | ||
List containing 2 or more vcf files | ||
e.g. [ 'file1.vcf', 'file2.vcf' ] | ||
- tbis: | ||
type: file | ||
description: | | ||
List containing the tbi index files corresponding to the vcfs input files | ||
e.g. [ 'file1.vcf.tbi', 'file2.vcf.tbi' ] | ||
- meta2: | ||
type: map | ||
description: | | ||
Groovy Map containing reference information | ||
e.g. [ id:'genome' ] | ||
- fasta: | ||
type: file | ||
description: "(Optional) The fasta reference file (only necessary for the `--gvcf FILE` parameter)" | ||
pattern: "*.{fasta,fa}" | ||
- meta3: | ||
type: map | ||
description: | | ||
Groovy Map containing reference information | ||
e.g. [ id:'genome' ] | ||
- fai: | ||
type: file | ||
description: "(Optional) The fasta reference file index (only necessary for the `--gvcf FILE` parameter)" | ||
pattern: "*.fai" | ||
- bed: | ||
type: file | ||
description: "(Optional) The bed regions to merge on" | ||
pattern: "*.bed" | ||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- vcf_gz: | ||
type: file | ||
description: VCF merged output file (bgzipped) => when `--output-type z` is used | ||
pattern: "*.vcf.gz" | ||
- vcf: | ||
type: file | ||
description: VCF merged output file => when `--output-type v` is used | ||
pattern: "*.vcf" | ||
- bcf_gz: | ||
type: file | ||
description: BCF merged output file (bgzipped) => when `--output-type b` is used | ||
pattern: "*.bcf.gz" | ||
- bcf: | ||
type: file | ||
description: BCF merged output file => when `--output-type u` is used | ||
pattern: "*.bcf" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@joseespinosa" | ||
- "@drpatelh" | ||
- "@nvnieuwk" | ||
- "@ramprasadn" | ||
maintainers: | ||
- "@joseespinosa" | ||
- "@drpatelh" | ||
- "@nvnieuwk" | ||
- "@ramprasadn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters