phac-nml / staramr

Scans genome contigs against the ResFinder, PlasmidFinder, and PointFinder databases.
Apache License 2.0
111 stars 25 forks source link

Update Galaxy STARamr and add a text option for pointfinder species #161

Open pimarin opened 1 year ago

pimarin commented 1 year ago

Hello,

With the new version of the galaxy tool 0.9.1, is it also possible to add an option in the galaxy wrapper related to the pointfinder species list ? I'm using STARamr in a workflow with the species input determined by another tool. It would be great if the pointfinder species could be manage by the output of another tool to select in the available specie.

apetkau commented 1 year ago

Hello @pimarin

Do you mean like this option?

image

Or do you mean you'd like to see the options in that drop-down renamed to their species name (e.g., escherichia_coli named Escherichia coli) so that they will correspond to the species output of another tool?

pimarin commented 1 year ago

Hello @apetkau , I apologize the time to answer you, I was very busy... I wan to link the species name given by another tool (from user metadata or from kraken taxonomic asssignation) to choose the good species parameter in pointfinder option of staramr. In this tutorial, we can see that galaxy can extract from an output text information for example to give as input to another tool, So if it's possible to modify the galawy wrapper for staramr by adding a free text option for pointfinder choice it could be great !

pimarin commented 1 year ago

From you wrapper xlm file for example, it could be possible to modify the '${pointfinder_db.use_pointfinder}'

#if str($pointfinder_db.use_pointfinder) != 'disabled'
      --output-pointfinder '$pointfinder'
      #if str($pointfinder_db.use_pointfinder) == 'custom'
          --pointfinder-organism '${pointfinder_db.pointfinder_custom}'
      #else
          --pointfinder-organism '${pointfinder_db.use_pointfinder}'
      #end if
  #end if

When you are in the input choice for the species name, change the last options, non_valid for the species list of non validated pointfinder species, and a text option custom

  <conditional name="pointfinder_db">
           <param name="use_pointfinder" type="select" label="Enable scanning for point mutations using the PointFinder database">
               <option value="disabled" selected="true">Disable PointFinder</option>                
               <option value="campylobacter">Campylobacter</option>
               <option value="enterococcus_faecalis">enterococcus_faecalis</option>
               <option value="enterococcus_faecium">enterococcus_faecium</option>
               <option value="escherichia_coli">escherichia_coli</option>      
               <option value="helicobacter_pylori">helicobacter_pylori</option>          
               <option value="salmonella">Salmonella</option>
               <option value="non_valid">Unvalidated</option>
               <option value="custom">Free text for species choice</option>
           </param>
           <when value="custom">
               <param name="pointfinder_species" type="text" optional="true" label="manually add the specie name from the staramr available list" help="...">
                 <validator type="regex">^[a-zA-Z]+$</validator>
                </param>
           </when>
apetkau commented 1 year ago

Okay, thanks so much for the response and clarification. It shouldn't be too difficult to add this to the Galaxy wrapper (you've already pretty much posted the XML changes here :smile:). However, I'm wondering if this will work with your tool, since the exact species name may not exactly match what something like Kraken would output (e.g., helicobacter_pylori vs. Helicobacter pylori). Though with some regex substitutions this could be fixed.