Question: Is it possible to auto-detect the database/genome of the input file?
1
gravatar for 18Kbeyond
13 months ago by
18Kbeyond20
New York
18Kbeyond20 wrote:

Hi. I am writing xml scripts that will ask the users to pick a reference genome (e.g. hg19, mm10, etc. ).

Is there a way that it can auto-detect that, as the database of the input file is known? Or the default can auto-change to the same database of the input file

auto-detect genome database • 415 views
ADD COMMENTlink modified 13 months ago by Jennifer Hillman Jackson25k • written 13 months ago by 18Kbeyond20
0
gravatar for Jennifer Hillman Jackson
13 months ago by
United States
Jennifer Hillman Jackson25k wrote:

Hello,

Yes, several tools do this that you could model after. One example is "Extract Genomic DNA using coordinates from assembled/unassembled genomes (Galaxy Version 2.2.3)". It is included in the core distribution.

Hope that helps! Jen, Galaxy team

ADD COMMENTlink written 13 months ago by Jennifer Hillman Jackson25k

Thank you. So I have these 4 lines in my xml script. The user will pick from a drop-down box to select "genome build name" (here it will be either hg19 or mm10).

I am wondering if it's possible to add something so that it can auto-detect and change to the genome of the input file, as the input file has this "database" attribute which means its genome is already known.

<param name="dbkey" type="select" label="Genome build name">

<option value="hg19">hg19</option>

<option value="mm10">mm10</option>

</param>

ADD REPLYlink modified 13 months ago • written 13 months ago by 18Kbeyond20

The tool above automatically (and only) uses the assigned database of the input dataset. There is no genome select box on the form at all. If an input is given that does not have a database assigned the tool errors stating that there is "no genome ?" where "?" designates an unassigned database (required input metadata). The error message for a tool can be modified any way to you want for trapped input or other issues (to offer specific help).

Other tools used to use a filter based on database assignment to limit the "available" genomes presented in the select box based on the inputs. This changed in recent updates but you might still be able to find a tool that does this (or rather, an earlier version of a tool, not the current version). I state "might" because the way select options were changed also involved a change in the framework of Galaxy, not just the tool wrappers directly or only (except to make use of the new select method). And older tool versions can have all flavors of prior issues that were fixed - or no problems at all, were simply updated. The github repo for the tool you want to model after would have a history of changes.

Most of the mapping tools had this type of filter if you want to start looking there for an example.

I am also going to ask the devs for feedback to make sure I am not missing some obvious way to do what you want!

ADD REPLYlink modified 13 months ago • written 13 months ago by Jennifer Hillman Jackson25k

Thank you very much. My hope is not about letting some tool help select genome completely so that I don't need to have those 4 lines.

I still want the the user to see the drop-down box and select a genome. My hope is that the default genome will be changed to the genome of the input file. Say if the user forgets to pick the right genome it will still be OK.

ADD REPLYlink written 13 months ago by 18Kbeyond20

More feedback is coming from our developer Aysam. One of us will update the post when that work is ready to be shared.

ADD REPLYlink written 13 months ago by Jennifer Hillman Jackson25k
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: 175 users visited in the last hour