Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create SnpSift_extract.cwl #75

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions SnpSift/SnpSift_extract.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
class: CommandLineTool
cwlVersion: v1.0

hints:
- class: DockerRequirement
dockerPull: quay.io/biocontainers/snpsift:4.3.1t--2

doc: "SnpSift Extract Fields <http://snpeff.sourceforge.net/SnpSift.html#Extract> selects columns from a VCF dataset into a Tab-delimited format."

stdout: $(inputs.input_vcf.nameroot).tsv
baseCommand: [SnpSift, -Xmx6G, extractFields]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of specifying the RAM on the command line, compute it from runtime.ram, e.g.

baseCommand: [SnpSift]
arguments:
  - "-Xmx$(runtime.ram)m"
  - extractFields

and then add a ResourceRequirement to the requirements section, e.g.

requirements:
  InlineJavascriptRequirement: {}
  ResourceRequirement:
    ramMin: 6000

arguments:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary, you can use the empty_text field as specified below.

- valueFrom: \"$(inputs.empty_text)\"
prefix: -e
position: 4
inputs:
- id: input_vcf
type: File
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider specifying the format. VCF is EDAM format_3016, so put a format: edam:format_3016 here and a

$namespaces:
  edam: http://edamontology.org/
$schemas:
  - http://edamontology.org/EDAM_1.18.owl

at the end of the specification.

inputBinding:
position: 1

- id: extractFields
type: string[]?
default: "CHROM POS ID REF ALT FILTER"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be

default: ["CHROM", "POS", "ID", "REF", "ALT", "FILTER"]

doc: "Separated by spaces"
inputBinding:
position: 2

- id: separator
type: string?
doc: "Separate multiple fields in one column with this character, e.g. a comma, rather than a column for each of the multiple values"
inputBinding:
prefix: -s
position: 3

- id: empty_text
type: string?
doc: "Represent empty fields with this value, rather than leaving them blank"
# inputBinding:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as is and can be uncommented

# prefix: -e
# position: 4

outputs:
- id: out
type: stdout
requirements:
- class: InlineJavascriptRequirement