Question: Named Command Line Argument Conventions
0
gravatar for Bob
2.1 years ago by
Bob0
United States
Bob0 wrote:

Are there any Galaxy community standards for identifying command line arguments by name?

We are adapting a suite of tools to work in Galaxy and we're writing the "glue" code that will pass parameters from the Galaxy GUI to our tools. All of the examples I've seen so far show positional parameters passed on the command line. We would like to use named parameters something like this:

tool a=5 b=8
tool -a 5 -b 8

We can write our code to meet any standard, and I was wondering if there are any conventions that we might want to follow. Any thoughts?

Thanks in advance.

tool development galaxy wrapper • 666 views
ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by Bob0
2
gravatar for Devon Ryan
2.1 years ago by
Devon Ryan1.9k
Germany
Devon Ryan1.9k wrote:

Have a look at the deepTools wrappers, which use a lot of optional switches both with and without arguments.

ADD COMMENTlink written 2.1 years ago by Devon Ryan1.9k
0
gravatar for Bob
2.1 years ago by
Bob0
United States
Bob0 wrote:

Thanks for the tip. I looked at some of the documentation and they appear to be using the common Linux/UNIX/GNU syntax:

bamCoverage --bam a.bam -o a.SeqDepthNorm.bw --binSize 10 --normalizeTo1x 2150570000 --ignoreForNormalization chrX --extendReads

deepTools2.0/bin/bamPEFragmentSize -hist fragmentSize.png -T "Fragment size of PE RNA-seq data" --maxFragmentLength 1000 -b testFiles/RNAseq_sample1.bam

That's fortunate since we're writing in Python and the argparse module handles that format naturally.

Thanks for the response.

ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by Bob0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 165 users visited in the last hour