Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool input's path in command possible ? #8043

Closed
mhabsaoui opened this issue May 27, 2019 · 2 comments
Closed

Tool input's path in command possible ? #8043

mhabsaoui opened this issue May 27, 2019 · 2 comments

Comments

@mhabsaoui
Copy link

@mhabsaoui mhabsaoui commented May 27, 2019

Hi,

I need to inject in the command tag, the tool's input data's path.
My Tool is expecting a path (Directory to corpus containing a list of .txt documents) as parameter.

Using the following doesn't make it, as it provides a path including the name of the current processed file. It only needs the file path :

<tool id='termsuite' name='Termsuite' version='3.0.10'>
  <description>Termsuite</description>
  <command>java -cp $__tool_directory__/termsuite-core-3.0.10.jar fr.univnantes.termsuite.tools.TerminologyExtractorCLI 
                -t $__tool_directory__/treetagger 
                -c $corpus 
                -l $lng 
                --json $outfile
  </command>
  <inputs>
    <param name="corpus" type="data" format="text" label="Input corpus"/>
    <param name="lng" type="select" label="Corpus language">
        <option value="en">EN</option>
        <option value="fr">FR</option>
    </param>
  </inputs>
  <outputs>
    <data name='outfile' type="data" format='json' label="Output terminology"/>
  </outputs>
</tool>

I also tried uploading the data set (txt files) as a collection in order to test and check if any effect on the path but no text data collection detected...

image

The error triggered by my Tool => Caused by: java.lang.IllegalArgumentException: Not a directory: [/home/user/projects/galaxy/database/files/000/dataset_82.dat]

So is there any reserved variable or way to make this possible ?

Thanks.

@bernt-matthias
Copy link
Contributor

@bernt-matthias bernt-matthias commented May 27, 2019

Would be helpful to see the tool sources. But I guess you need to loop over to content of $corpus as described here https://docs.galaxyproject.org/en/master/dev/schema.html#id146

Loading

@nsoranzo
Copy link
Member

@nsoranzo nsoranzo commented May 27, 2019

Please ask support questions at https://help.galaxyproject.org/ , thanks!

Loading

@nsoranzo nsoranzo closed this May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants