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

Create SnpSift_extract.cwl #75

wants to merge 1 commit into from

Conversation

cjuigne
Copy link
Contributor

@cjuigne cjuigne commented May 12, 2020

This part :

  • id: empty_text
    type: string?
    doc: "Represent empty fields with this value, rather than leaving them blank"
    # inputBinding:
    # prefix: -e
    # position: 4

is commented because it doesn't work.
cf my issue on cwl.discourse : https://cwl.discourse.group/t/when-a-string-is-a-character-it-cant-be-enclosed-in-quotes/120

This part :   - id: empty_text
    type: string?
    doc: "Represent empty fields with this value, rather than leaving them blank"
   # inputBinding:
   #   prefix: -e
   #   position: 4
is commented because it doesn't work.
cf my issue on cwl.discourse : https://cwl.discourse.group/t/when-a-string-is-a-character-it-cant-be-enclosed-in-quotes/120
@pvanheus
Copy link
Contributor

pvanheus commented Oct 6, 2020

Hi @hellymac I had a look at the issue you raised on discourse and things in fact (as @mr-c suggests) works as per the description. I.e. if I go: cwltool SnpSift_extract.cwl --input_vcf test01.vcf --empty_text ' ' then the space is used correctly as a separator and not "eaten up" by the shell.

@cwl-bot
Copy link

cwl-bot commented Oct 6, 2020

This pull request has been mentioned on Common Workflow Language Discourse. There might be relevant details there:

https://cwl.discourse.group/t/when-a-string-is-a-character-it-cant-be-enclosed-in-quotes/120/4


- 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"]

- 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


stdout: $(inputs.input_vcf.nameroot).tsv
baseCommand: [SnpSift, -Xmx6G, extractFields]
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.

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants