VcfTools

VcfTools · 1 contributor · 1 version

NAME vcftools v0.1.16 − Utilities for the variant call format (VCF) and binary variant call format (BCF)

SYNOPSIS vcftools [ –vcf FILE | –gzvcf FILE | –bcf FILE] [ –out OUTPUT PREFIX ] [ FILTERING OPTIONS ] [ OUTPUT OPTIONS ]

DESCRIPTION vcftools is a suite of functions for use on genetic variation data in the form of VCF and BCF files. The tools provided will be used mainly to summarize data, run calculations on data, filter out data, and convert data into other useful file formats.

Quickstart

from janis_bioinformatics.tools.vcftools.vcftools.versions import VcfToolsvcftools_0_1_16

wf = WorkflowBuilder("myworkflow")

wf.step(
    "vcftools_step",
    VcfToolsvcftools_0_1_16(
        vcf=None,
    )
)
wf.output("out", source=vcftools_step.out)

OR

  1. Install Janis
  2. Ensure Janis is configured to work with Docker or Singularity.
  3. Ensure all reference files are available:

Note

More information about these inputs are available below.

  1. Generate user input files for VcfTools:
# user inputs
janis inputs VcfTools > inputs.yaml

inputs.yaml

vcf: vcf.vcf
  1. Run VcfTools with:
janis run [...run options] \
    --inputs inputs.yaml \
    VcfTools

Information

ID:VcfTools
URL:https://vcftools.github.io/man_latest.html
Versions:0.1.16
Container:biocontainers/vcftools:v0.1.16-1-deb_cv1
Authors:Jiaan Yu
Citations:None
Created:2020-05-22
Updated:2020-05-22

Outputs

name type documentation
out VCF  

Additional configuration (inputs)

name type prefix position documentation
vcf VCF –vcf   This option defines the VCF file to be processed. VCFtools expects files in VCF format v4.0, v4.1 or v4.2. The latter two are supported with some small limitations. If the user provides a dash character ‘-’ as a file name, the program expects a VCF file to be piped in through standard in.
outputFilename Optional<Filename> –out   <output_prefix>. This option defines the output filename prefix for all files generated by vcftools. For example, if <prefix> is set to output_filename, then all output files will be of the form output_filename.*** . If this option is omitted, all output files will have the prefix “out.” in the current working directory.
removeFileteredAll Optional<Boolean> –remove-filtered-all 1 Removes all sites with a FILTER flag other than PASS.
recode Optional<Boolean> –recode 1  
recodeINFOAll Optional<Boolean> –recode-INFO-all 1 These options can be used with the above recode options to define an INFO key name to keep in the output file. This option can be used multiple times to keep more of the INFO fields. The second option is used to keep all INFO values in the original file.

Workflow Description Language

version development

task VcfTools {
  input {
    Int? runtime_cpu
    Int? runtime_memory
    Int? runtime_seconds
    Int? runtime_disks
    File vcf
    String? outputFilename
    Boolean? removeFileteredAll
    Boolean? recode
    Boolean? recodeINFOAll
  }
  command <<<
    set -e
     vcftools \
      --vcf '~{vcf}' \
      --out '~{select_first([outputFilename, "~{basename(vcf, ".vcf")}"])}' \
      ~{if (defined(removeFileteredAll) && select_first([removeFileteredAll])) then "--remove-filtered-all" else ""} \
      ~{if (defined(recode) && select_first([recode])) then "--recode" else ""} \
      ~{if (defined(recodeINFOAll) && select_first([recodeINFOAll])) then "--recode-INFO-all" else ""}
  >>>
  runtime {
    cpu: select_first([runtime_cpu, 1])
    disks: "local-disk ~{select_first([runtime_disks, 20])} SSD"
    docker: "biocontainers/vcftools:v0.1.16-1-deb_cv1"
    duration: select_first([runtime_seconds, 86400])
    memory: "~{select_first([runtime_memory, 4])}G"
    preemptible: 2
  }
  output {
    File out = (select_first([outputFilename, "~{basename(vcf, ".vcf")}"]) + ".recode.vcf")
  }
}

Common Workflow Language

#!/usr/bin/env cwl-runner
class: CommandLineTool
cwlVersion: v1.2
label: VcfTools
doc: |-
  NAME
  vcftools v0.1.16 − Utilities for the variant call format (VCF) and binary variant call format (BCF)

  SYNOPSIS
  vcftools [ --vcf FILE | --gzvcf FILE | --bcf FILE] [ --out OUTPUT PREFIX ] [ FILTERING OPTIONS ] [ OUTPUT OPTIONS ]

  DESCRIPTION
  vcftools is a suite of functions for use on genetic variation data in the form of VCF and BCF files. The tools provided will be used mainly to summarize data, run calculations on data, filter out data, and convert data into other useful file formats.

requirements:
- class: ShellCommandRequirement
- class: InlineJavascriptRequirement
- class: DockerRequirement
  dockerPull: biocontainers/vcftools:v0.1.16-1-deb_cv1

inputs:
- id: vcf
  label: vcf
  doc: |-
    This option defines the VCF file to be processed. VCFtools expects files in VCF format v4.0, v4.1 or v4.2. The latter two are supported  with  some  small limitations. If the user provides a dash character '-' as a file name, the program expects a VCF file to be piped in through standard in.
  type: File
  inputBinding:
    prefix: --vcf
- id: outputFilename
  label: outputFilename
  doc: |-
    <output_prefix>. This option defines the output filename prefix for all files generated by vcftools. For example, if <prefix> is set to output_filename, then all output files will be of the form output_filename.*** . If this option is omitted, all output files will have the prefix "out." in the current working directory.
  type:
  - string
  - 'null'
  default: generated
  inputBinding:
    prefix: --out
    valueFrom: $(inputs.vcf.basename.replace(/.vcf$/, ""))
- id: removeFileteredAll
  label: removeFileteredAll
  doc: Removes all sites with a FILTER flag other than PASS.
  type:
  - boolean
  - 'null'
  inputBinding:
    prefix: --remove-filtered-all
    position: 1
    shellQuote: false
- id: recode
  label: recode
  doc: ''
  type:
  - boolean
  - 'null'
  inputBinding:
    prefix: --recode
    position: 1
    shellQuote: false
- id: recodeINFOAll
  label: recodeINFOAll
  doc: |-
    These options can be used with the above recode options to define an INFO key name to keep in the output  file.  This  option can be used multiple times to keep more of the INFO fields. The second option is used to keep all INFO values in the original file.
  type:
  - boolean
  - 'null'
  inputBinding:
    prefix: --recode-INFO-all
    position: 1
    shellQuote: false

outputs:
- id: out
  label: out
  type: File
  outputBinding:
    glob: $((inputs.outputFilename + ".recode.vcf"))
    outputEval: $((inputs.outputFilename.basename + ".recode.vcf"))
    loadContents: false
stdout: _stdout
stderr: _stderr

baseCommand:
- ''
- vcftools
arguments: []

hints:
- class: ToolTimeLimit
  timelimit: |-
    $([inputs.runtime_seconds, 86400].filter(function (inner) { return inner != null })[0])
id: VcfTools