Question: How to pass the genome name or dbkey to a tool
0
gravatar for Brad Langhorst
4.5 years ago by
United States
Brad Langhorst100 wrote:

I'd like to pass the name or dbkey of a reference genome (e.g. hg19) to a tool .

How can I set up a variable to pass to my tool without asking the user to specify the refernece again (i.e. infer the reference from the bam file) ?

E.g.
I have a BAM file in the tool xml 

<param name='bam_file'          type='data'     optional='false'  format='bam'      label="Aligned reads (bam)" />

I want to call the tool like this:

tool_name.py --reference_genome=$dbkey
tool • 1.3k views
ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by Brad Langhorst100
3
gravatar for Daniel Blankenberg
4.5 years ago by
Daniel Blankenberg ♦♦ 1.7k
United States
Daniel Blankenberg ♦♦ 1.7k wrote:

You can do something like this:

tool_name.py --reference_genome="${ bam_file.dbkey }"

ADD COMMENTlink written 4.5 years ago by Daniel Blankenberg ♦♦ 1.7k

Excellent... where can I find more information about bam_file object's methods?

(I'd also like to get the genome size if I can.)

ADD REPLYlink written 4.5 years ago by Brad Langhorst100
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: 167 users visited in the last hour