peterjc / galaxy_blast

Galaxy wrappers for NCBI BLAST+ and related BLAST tools.
76 stars 70 forks source link

Expand blastdbcmd wrapper to accept DB from history #125

Closed peterjc closed 4 years ago

peterjc commented 4 years ago

Used in ncbi_blastdbcmd_info.xml and ncbi_blastdbcmd_wrapper.xml (only), the macro input_conditional_choose_db_type defines the inputs for the blastdbcmd tool.

    <xml name="input_conditional_choose_db_type">
        <conditional name="db_opts">
            <param argument="-db_type" type="select" label="Type of BLAST database">
              <option value="nucl" selected="true">Nucleotide</option>
              <option value="prot">Protein</option>
            </param>
            <when value="nucl">
                <param name="database" argument="-db" type="select" multiple="true" label="Nucleotide BLAST database">
                    <options from_data_table="blastdb" />
                </param>
            </when>
            <when value="prot">
                <param name="database" argument="-db" type="select" multiple="true" label="Protein BLAST database">
                    <options from_data_table="blastdb_p" />
                </param>
            </when>
        </conditional>
    </xml>

Currently this does not support a BLAST DB from the user's history, only from the system's .loc files.

Might need nested options for the four way selection of prot/nucl and history/loc input...

Frahiriart commented 4 years ago

I'm currently working on that for the mésocentre Clermont Auvergne and i will post my solution in this GitHub.

peterjc commented 4 years ago

Great - thank you 👍

Frahiriart commented 4 years ago

I finished to work on it and i found a solution. But i have create a new token in the file macros.xml line 728.

    <token name="@ON_DB_SUBJECT_ORIGIN@"><![CDATA[
#if str($db_opts.db_origin.db_origin_selector)=="db"
'${db_opts.db_origin.database}'
#else
'${db_opts.db_origin.histdb.name}'
#end if
]]></token>

Are you all right with that added ? And can i make my pull request ?

peterjc commented 4 years ago

I'm not sure how that would work from just the snippet, but if you have something which seems to work, please do make a pull request.

peterjc commented 4 years ago

Done in #130 based on #127, now released to Test Tool Shed as version 2.7.1+galaxy0

Would upload to Main Tool Shed now, but that's giving me an internal server error.

peterjc commented 4 years ago

Closing, that's been released now: https://toolshed.g2.bx.psu.edu/repository?repository_id=1d92ebdf7e8d466c

Thank you!