SkillAgentSearch skills...

FUNGuild

FUNGuild: parsing OTUs into functional guilds

Install / Use

/learn @UMNFuN/FUNGuild
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1>FUNGuild: Fungi + fUNctional + Guild</h1> <h2>We continue to work behind the scenes to provide updates and support for the FUNGuild Database. We expect to release the next version of the database in Spring 2024. Currently, the database includes over 13,000 fungal taxa! <h3>Quick start</h3>

The FUNGuild.py script was written under Python 3 environment. If you don't have a Python 3 environment, install Miniconda or the more comprehensive Anaconda.

The current version of FUNGuild (Guilds_v1.1.py) parses guilds in two steps. First we implemented a taxa parser to extract taxonomic information from the user provided OTU table. Then we use a guild parser to query the FUNGuild database. In this way, we can avoid most of the format issues we encountered when dealing with the original OTU table. You can also compile your own taxa file (names only in rows) as the input for the guild parser.

Use -h or --help for a detail FUNGuild manual.

Preparing your workspace:

git clone https://github.com/UMNFuN/FUNGuild
cd FUNGuild/

Run the script using default parameters:

python Guilds_v1.0.py -otu /Users/username/Documents/project/otu_table.txt -db fungi

<b>Use the FUNGuild Online version to query the database:</b><br> http://funguild.org<br>

<b>Databases:</b><br> http://stbates.org/funguild_db.php<br> http://stbates.org/nemaguild_db.php<br>

<b>API:</b><br> api url = https://mycoportal.org/funguild/services/api/<br> api url + db_return.php?qDB=NAME OF DESIRED DATABASE&qField=NAME OF DESIRED FIELD&qText=QUERY TEXT"<br> e.g., https://mycoportal.org/funguild/services/api/db_return.php?qDB=funguild_db&qField=taxon&qText=Tulostoma<br>

<b>Citation:</b><br> Nguyen NH, Song Z, Bates ST, Branco S, Tedersoo L, Menke J, Schilling JS, Kennedy PG. 2016. FUNGuild: An open annotation tool for parsing fungal community datasets by ecological guild. Fungal Ecology 20:241–248. Download paper


<b>Contributors:</b> Michelle Afkhami, Carlos Aguilar-Trigueros, Scott T. Bates, Sarah Branco, Posy Busby, Natalie Christian, Will Cornwell, Zachary Foster, Fukasawa Fu, Romina Gazis, Rannveig Jacobsen, Peter Kennedy, Daniel Lindner, Jon Menke, Amy Milo, Sara Moss, Nhu Nguyen, Henrik Nilsson, Jonathan Reich, Jonathan Schilling, Zewei Song, Jennifer Talbot, Leho Tedersoo, Nathaniel Tobey, Will VanHook, and Amy Zanne


<h3>IMPORTANT: Interpretation of data</h3> We highly recommend that users of FUNGuild read through the <a href="https://github.com/UMNFuN/FUNGuild/blob/master/FUNGuild_Manual.pdf">manual</a> and the <a href="https://cbs.umn.edu/sites/cbs.umn.edu/files/public/downloads/Nguyenetal2015b.pdf">paper</a> for suggestions on interpretation of your guild data.
<h3>General notes</h3>

The Guilds bioinformatic tool is a two-component system that includes online community annotated databases and a python script that assigns functional information to operational taxonomic units (OTUs), including amplicon sequence variants (ASVs) obtained from sequencing of environmental samples. The script is based on an original in-house python script referenced in Branco et al. 2013 and has matured over the years. It searches taxonomic strings in the user’s contingency table (OTU table) against the online Guilds databases (fungi or nematodes) containing taxonomic classification and functional metadata. The output is the original OTU table with functional metadata appended, and users also have options to output an OTU table with database matches only and/or a table containing only OTUs with no matches.

The current version only support running the tool locally. A current version of Python must be installed on the user’s local machine before the Guilds parser script can be used. The Guilds databases are accessed by the python script remotely (internet required) and, therefore, they do not need to be loaded to the user’s local machine.

We also provide an example OTU table to demonstrate general formatting.


<h3>Running the script locally from command line</h3>
  • Make sure your local computer has Python installed. Our current version of script (Guilds_v1.0.py) supports Python version higher than 2.7. We recommend that you install the Miniconda or Anaconda Python distribution for all required dependencies. Python 3.6 is prefered for its better support of Unicode characters.

  • We use the Python package <i>requests</i> for connecting with the FUNGuild database. This package should come with most of the common Python distributions. If your Python distribution doesn't have this package (i.e. you get this error: ImportError: No module named requests), you can install it using: pip install requests

  • Download or copy the Guilds parser script. The script should be saved in a file with the .py extension (e.g., Guilds_v1.1.py) rather than .txt (make sure that the "hide extension" setting is not activated, as the file might then actually save as e.g., Guilds_v1.1.py.txt).

  • Download the example OTU table if you want to test out this script or have not used it before.

  • Open a terminal via command line (e.g., /Applications/Utilities/ and click on 'Terminal' for Mac; for Windows use Start or Start Menu and search for 'command' or 'cmd' and then click on the 'Command Prompt' icon). Be sure to follow any conventions (e.g., directory path formatting) that are relevant to your particular operating system.

mkdir /Users/username/Documents/FUNGuild
git clone https://github.com/UMNFuN/FUNGuild/
  • Next, cd (change directory in the command line) into folder (directory) where you saved your .py file containing the Guilds script (Mac users - you can drag the desired folder from the finder into the terminal to get the directory path rather than having to type it). For example on mac, type something like this into the terminal:
cd /Users/username/Documents/FUNGuild
  • Determine the path to your properly formatted (see above) OTU table (e.g., /Users/username/Documents/project/otu_table_example.txt).

  • Make sure that your computer is connected to the Internet, as the script will need to access the online database.

  • Make a Python call on the script (remember you should have already used the change directory command to cd into the folder that contains the script) giving the proper OTU table path (the -otu argument), desired taxonomic database (the -db argument; either fungi or nematode; the default fungi will be used if you don’t input the -db argument), and desired output (add the argument -m to also output an OTU table with just the OTUs for which functional assignments could be made and/or -u to output a table with only OTUs that could not be assigned; a table that includes both the assigned and unassigned OTUs is the default output). For example on a mac, you would type something like this into the terminal:

python Guilds_v1.0.py -otu /Users/username/Documents/project/otu_table_example.txt -db fungi -m -u
  • Hit the enter/return key on your computer, and allow a few seconds for the script to do its magic!

<h3><a name="contributing">CONTRIBUTING GUILD INFORMATION TO THE FUNGUILD DATABASE</a></h3>

Data pertaining to particular fungal or nematode taxa can be submitted to the Guilds databases (FUNGuild_db or NEMAGuild_db) by contacting the database curators (Nhu Nguyen nhu.nguyen@hawaii.edu or Scott Bates scott.thomas.bates@gmail.com). All submitted entries will be reviewed by the database curators prior to being migrated to the main Guilds databases. Taxon entries proposed for addition to the databases will be accessable once they have been reviewed by the database curators and migrated to the main database. Once migrated, proposed entries will automatically be available to all using the Guilds bioinformatic tool to make annotated assignments to their OTU tables containing fungal or nematode taxa.

<b>Information should be entered into each Guilds database field, in sequence, as follows:</b>

  • Taxon: The scientific name (e.g., Ganoderma).

  • Taxon Level: A numeral corresponding the correct taxonomic level for the taxon (0 = keyword, 3 = Phylum, 4 = Subphylum, 5 = Class, 6 = Subclass, 7 = Order, 8 = Suborder, 9 = Family, 10 = Subfamily, 11 = Tribe, 12 = Subtribe, 13 = Genus, 15 = Subgenus, 16 = Section, 17 = Subsection, 18 = Series , 19 = Subseries, 20 = Species, 21 = Subspecies, 22 = Variety, 23 = Subvariety, 24 = Form, 25 = Subform, 26 = Form Species).

  • Trophic Mode: One of three trophic categories [Pathotroph = receiving nutrients at the expense of the host cells and causing disease (e.g., biotroph, parasite, pathogen, etc.); Saprotroph = receiving nutrients by breaking down dead host cells (e.g., wood rotters, litter rotters, etc.); Symbiotroph = receiving nutrients by exchanging resources with host cells (e.g., ectomycorrhiza, lichens, etc.)]. The concepts presented here are similar to those of Tedersoo et al. 2014.

  • Guild: Provide a relevant guild descriptor [Pathotroph: Animal Pathogen (including human pathogens - typically annoated as such), Bryophyte Parasite, Clavicipitaceous Endophyte, Fungal Parasite, Lichen Parasite, Plant Pathogen; Saprotroph: Dung Saprotroph (i.e., coprophilous), Leaf Saprotroph (e.g., leaf litter decomposer), Plant Saprotroph, Soil Saprotroph (e.g., rhizosphere

Related Skills

View on GitHub
GitHub Stars129
CategoryDevelopment
Updated25d ago
Forks81

Languages

Python

Security Score

80/100

Audited on Mar 5, 2026

No findings