Mercurial > repos > onnodg > add_taxonomic_labels
changeset 1:5155c1c41198 draft default tip
planemo upload for repository https://github.com/Onnodg/Naturalis_NLOOR/tree/main/NLOOR_scripts/add_header_tool commit d771f9fbfd42bcdeda1623d954550882a0863847-dirty
| author | onnodg |
|---|---|
| date | Mon, 20 Oct 2025 12:25:29 +0000 |
| parents | abd214795fa5 |
| children | |
| files | __pycache__/__init__.cpython-313.pyc __pycache__/add_taxonomic_labels.cpython-313.pyc add_taxonomic_labels.xml tests/__pycache__/test_add_taxonomic_labels.cpython-313-pytest-8.4.2.pyc |
| diffstat | 4 files changed, 39 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/add_taxonomic_labels.xml Tue Oct 14 09:07:01 2025 +0000 +++ b/add_taxonomic_labels.xml Mon Oct 20 12:25:29 2025 +0000 @@ -1,4 +1,4 @@ -<tool id="add_taxonomic_labels" name="Add_taxonomic_labels" version="1.0.0"> +<tool id="add_taxonomic_labels" name="Add_taxonomic_labels" version="1.0.1"> <description>Add taxonomic labels to tabular files</description> <requirements> <requirement type="package" version="3.13">python</requirement> @@ -8,12 +8,15 @@ python '$__tool_directory__/add_taxonomic_labels.py' --input_file '$input_file' --output_file '$output_file' - --taxon_levels $taxon_levels + #if $taxon_levels != '' + --taxon_levels $taxon_levels + #end if ]]> </command> <inputs> <param name="input_file" type="data" format="tabular" /> - <param name="taxon_levels" type="text" label="Taxonomic levels" help="Taxonomic level positions, only change when using a different database"/> + <param name="taxon_levels" type="text" label="Taxonomic levels" value="1 2 4 7 11 12 13" + help="Expected taxonomic level positions, only change when the taxonomic level positions are different"/> </inputs> <outputs> <data name="output_file" format="tabular" label="${tool.name} on " /> @@ -24,38 +27,65 @@ <param name="taxon_levels" value="1 2 4 7 11 12 13"/> <output name="output_file" file="output.fa.tabular"/> </test> + <test expect_num_outputs="1"> + <param name="input_file" value="input.fa.tabular"/> + <param name="taxon_levels" value=""/> + <output name="output_file" file="output.fa.tabular"/> + </test> </tests> <help><![CDATA[ **What it does** + This tool is created specifically for the use of the NLOOR project, to modify our curated database blast output. The tool adds taxonomic labels to tabular files by extracting specific taxonomic levels from the header. **Input** -- A collection of .fa.tabular files containing taxonomic information -- Taxonomic level indices (default: 1 2 4 7 11 12 13 corresponding to kingdom through species) +- Tabular files containing taxonomic information (blast output). + +- Taxonomic level indices (default: 1 2 4 7 11 12 13 corresponding to kingdom through species). **Output** -- A collection of processed .out files with extracted taxonomic information -- Each output file contains the same data as input but with the added taxonomy column +- Tabular files with correct taxa placement, Each output file contains the same data as input but with the added taxonomy column. **Taxonomic Levels** The tool extracts taxonomic information at specified indices: + - 1: Kingdom + - 2: Phylum + - 4: Class + - 7: Order + - 11: Family + - 12: Genus + - 13: Species You can customize this based on your data structure. +------------- + +.. class:: infomark + **Credits** -Authors = Onno de Gorter, 2025. + Based on a script by Nick Kortleven, translated, modified and wrapped by Onno de Gorter, -Developed for the New light on old remedies project, a PhD research by Anja Fischer +Developed for the New light on old remedies project, a PhD research by Anja Fischer. + +Link to the project website: + +* https://ahm.uva.nl/funded-research-projects/new-lights-on-old-remedies/new-lights-on-old-remedies.html + ]]></help> + <creator> + <organization name="Naturalis Biodiversity Center" url="https://www.naturalis.nl/en/science" /> + <person givenName="Onno" familyName="de Gorter" url="https://github.com/Onnodg"/> + <person givenName="Nick" familyName="Kortleven" url="https://github.com/tombkingsts" /> + </creator> </tool> \ No newline at end of file
