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

Add name2taxid function from taxonkit #6146

Merged
merged 38 commits into from
Aug 14, 2024

Conversation

SantaMcCloud
Copy link
Contributor

FOR CONTRIBUTOR:

  • I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • License permits unrestricted use (educational + commercial)
  • This PR adds a new tool or tool collection
  • This PR updates an existing tool or tool collection
  • This PR does something else (explain below)

@SantaMcCloud
Copy link
Contributor Author

SantaMcCloud commented Jul 13, 2024

The .shed.yml and macros.xml are from this PR: #6085 since it is the same package. The other PR was not merged yet. Also the two flags can not be tested because of the mock DB but both are working fine with a real DB.

@paulzierep

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please name this file .test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

help="Input the column value in which the name are written. The first column is 1 and so on. (Default: 1)" />
<param argument="--sci-name" type="boolean" falsevalue="" truevalue="--sci-name" checked="false" label="Only searching scientific names"/>
<param argument="--show-rank" type="boolean" falsevalue="" truevalue="--show-rank" checked="false" label="Show rank" />
<conditional name="data">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the indentation is really off here ... can you please use the https://github.com/galaxyproject/galaxy-language-server and use the autoformat option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it should be fix now but im not sure but it look better now at least at this postion where you tag it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its broken again. Please use the https://github.com/galaxyproject/galaxy-language-server plugin, this will help you a lot and also fixes all the formatting for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this add-on, but is does nothing on my side... I save the file and at this moment they should auto format it, which it didn't do. Also, it seems that the file which I uploaded always was not the file showed here with the broken format. I had the format on my side always correct, but it was shown always broken here on GitHub, which is strange. I now edited manually over GitHub in the hope that the format is now correct!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ctrl+Shift+P and then format the document and "Galaxy tool: sort the attributes of all...".

You are using TABS and should use 4-spaces. Uploading the document does not change the content.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay it should be done now with 5e4af94 .

Sorry for this stupid thing!

<inputs>
<param name="input" type="data" format="tabular" label="Input file"
help="Input any tsv file where the NCBI names are written. You can also use a .txt but only one name per row!" />
<param argument="--name-field" type="integer" value="1" min="0" label="Column with the names" optional="false"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SantaMcCloud SantaMcCloud mentioned this pull request Jul 15, 2024
4 tasks
</conditional>
<param name="sci_name" value="true"/>
<param name="show_rank" value="true"/>
<output name="output">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can u please compare the output generated by the tool.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with 855fae6

Copy link
Contributor

@paulzierep paulzierep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes, then good from my side

<param argument="--name-field" type="data_column" data_ref="input" label="Select column with the names"
help="Select the colum where the name are written" />
<param argument="--sci-name" type="boolean" falsevalue="" truevalue="--sci-name" checked="false" label="Only searching scientific names"/>
<param argument="--show-rank" type="boolean" falsevalue="" truevalue="--show-rank" checked="false" label="Show rank" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you specify what this shows ? Does it include the rank like this _g ? Maybe show a small example in the help.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tools/taxonkit/taxonkit_name2taxid.xml Outdated Show resolved Hide resolved
tools/taxonkit/taxonkit_name2taxid.xml Outdated Show resolved Hide resolved
tools/taxonkit/taxonkit_name2taxid.xml Outdated Show resolved Hide resolved
tools/taxonkit/taxonkit_name2taxid.xml Outdated Show resolved Hide resolved
<data name="output" format="tabular" label="Names2taxID" />
</outputs>
<tests>
<test>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u add a test for the rank option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no way i can add this since i need special lines from the original database and i dont know how they work together to get the rank option. I did add an example in the help section to show how the output should look it you use a complete database

Copy link
Contributor

@paulzierep paulzierep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor text changes, looks good otherwise

tools/taxonkit/taxonkit_name2taxid.xml Outdated Show resolved Hide resolved
tools/taxonkit/taxonkit_name2taxid.xml Outdated Show resolved Hide resolved
ln -s '$taxdump' 'taxdump.tar.gz' &&
tar -xf 'taxdump.tar.gz' -C '.' &&
#else:
ln -s '$ncbi.fields.path/names.dmp' 'names.dmp' &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need delnodes.dmp and names.dmp in the test-db if we only use the test.tar.gz

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, i will remove it,

@SantaMcCloud
Copy link
Contributor Author

@paulzierep all open reviews should be done

@paulzierep
Copy link
Contributor

Good from my side @bgruening ?

@SantaMcCloud
Copy link
Contributor Author

oh wait yes we need the .dmp file for the other wrapper

@SantaMcCloud
Copy link
Contributor Author

Now we are good!

<param argument="--show-rank" type="boolean" falsevalue="" truevalue="--show-rank" checked="false" label="Show rank" help="Use this option to yield the rank of the name in the output. For an example look at the help section!"/>
<conditional name="data">
<param name="is_select" type="select" label="Use either a cached NCBI database or provide a downloaded version.">
<option value="dm">Cached database</option>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is really just nitpicking. But since those params are exposed to users in workflows etc ... can we rename the dm to cached.

and his to history?

Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a very small nit

@SantaMcCloud
Copy link
Contributor Author

Done @bgruening

@bgruening
Copy link
Member

Something is missing, all tests are failing atm.

@bgruening
Copy link
Member

Unfortunately, not :(

@SantaMcCloud
Copy link
Contributor Author

Yes I don't know why I will take a look at it later now I have to change the dm from @paulzierep a little bit ^^`

@SantaMcCloud
Copy link
Contributor Author

Okay i now know it fails. The other tool which is in the same directory cause the failed test. I will have a look at this till tomorrow !

@SantaMcCloud
Copy link
Contributor Author

@bgruening okay now is good to merge. I don't know what the tools did that they got some error.....

@bgruening
Copy link
Member

Great, thanks!

@bgruening bgruening merged commit 703018a into galaxyproject:main Aug 14, 2024
12 checks passed
@mvdbeek
Copy link
Member

mvdbeek commented Aug 14, 2024

Attention: deployment failure!

https://github.com/galaxyproject/tools-iuc/actions/runs/10392516487

1 similar comment
@mvdbeek
Copy link
Member

mvdbeek commented Aug 14, 2024

Attention: deployment failure!

https://github.com/galaxyproject/tools-iuc/actions/runs/10392516487

@SantaMcCloud
Copy link
Contributor Author

Did I do something wrong? I can, don't know how to fix it :(

@bgruening
Copy link
Member

I'm looking at it. Consider it as done.

@SantaMcCloud
Copy link
Contributor Author

Okay thank you!

nilchia pushed a commit to pavanvidem/tools-iuc that referenced this pull request Aug 24, 2024
* Add name2taxid function from taxonkit

* rename file

* rename file

* rename file and change a param

* a little fix

* change the test such that files will be compared

* make the name options a bit clear

* did an example for the show rank option

* Update tools/taxonkit/taxonkit_name2taxid.xml

Co-authored-by: paulzierep <paul.zierep@googlemail.com>

* Update tools/taxonkit/taxonkit_name2taxid.xml

Co-authored-by: paulzierep <paul.zierep@googlemail.com>

* Update tools/taxonkit/taxonkit_name2taxid.xml

Co-authored-by: paulzierep <paul.zierep@googlemail.com>

* Update tools/taxonkit/taxonkit_name2taxid.xml

Co-authored-by: paulzierep <paul.zierep@googlemail.com>

* test for fix

* test commit

* fix test

* fix test

* commit to fix format problems

* Update taxonkit_name2taxid.xml

The format was not boken on my side so i try to fix in here in GitHub now. I hope this is better now

* format fix maybe

* delet file for reseting it on github

* add the deleted file to see if the format is fixes now

* Update taxonkit_name2taxid.xml

... maybe now the format is fixed

* foramted

* Update tools/taxonkit/taxonkit_name2taxid.xml

* change such that the newest version will be dowanloaded and unpacked for the user

* change but fomrat problem

* fix file format

* Apply suggestions from code review

* Delete tools/taxonkit/test-data/test-db/names.dmp

* Delete tools/taxonkit/test-data/test-db/delnodes.dmp

* Update tools/taxonkit/taxonkit_name2taxid.xml

Co-authored-by: paulzierep <paul.zierep@googlemail.com>

* Update tools/taxonkit/taxonkit_name2taxid.xml

Co-authored-by: paulzierep <paul.zierep@googlemail.com>

* revert deleting

* change value names

* fix test

* now fixed

---------

Co-authored-by: paulzierep <paul.zierep@googlemail.com>
Co-authored-by: Björn Grüning <bjoern@gruenings.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants