Giter Site home page Giter Site logo

funguild's People

Contributors

brendanf avatar maxemil avatar nnguyenlab avatar umnfun avatar xerantheum avatar zachary-foster avatar zeweisong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

funguild's Issues

Can not download the Output Files

Helllo Everyone,

I have a problem about FunGuild. When I finished the analysis, I can not download the the Output Files. It has no response to my download operation.

image

Hope someone can help me.

THANKS

"name 'lookup' is not defined"

Hi there,
I'm having trouble running the FunGuild script. When I run on the terminal:

python funguild.py -db fungi -otu /home/qiime/USEARCHWHOLEDATASET/table_tax.biom -m

I get the following output:

"FunGuild v1.0 Beta
Downloading fungi database ...

Reading in the OTU table: '/home/qiime/USEARCHWHOLEDATASET/table_tax.biom'

Traceback (most recent call last):
File "funguild.py", line 203, in
index_tax = header.index(lookup)
NameError: name 'lookup' is not defined"

I am at a loss as to what the actual error is, could it be I need to redownload the python script?
Any help would be appreciated.

Many thanks

Pascal

FUNGuild not working. Is the database there?

Hello.
I am trying to use this program.
I downloaded and put in a folder in my home directory. Also downloaded the otu example table.
Then I tried this command, and got the error call that follows:

$ python Guilds_v1.1.py -otu ~/Downloads/otu_table_example.txt
Guilds_v1.1.py:92: DeprecationWarning: 'U' mode is deprecated
with open(otu_file, 'rU') as f1:
FunGuild v1.0 Beta
Connecting with FUNGuild database ...
Traceback (most recent call last):
File "Guilds_v1.1.py", line 128, in
current_record = json.loads(record)
File "/Users/stewartlab/miniconda3/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/Users/stewartlab/miniconda3/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/stewartlab/miniconda3/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Am I doing something wrong? Any help will be appreciated.
Thank you,

Jorge

OTU delimiter parsing from alternate taxonomy input.

Thank you for this great tool! I just wanted to point your attention to the csv.Sniffer functionality in the Guilds_v1.0.py code. It can sometimes miss-interpret what the actual OTU delimiter is, when using alternative taxonomies. That is, I used my pipeline here to generate QIIME compatible taxonomy files. However, the script Guilds_v1.0.py incorrectly detects the delimiter in these files to be ; and not \t. I am assuming this is the case because I am keeping the full taxonomy information and this results far more ; than \t characters in the file. I got around the issue by setting:

otu_delimiter = dialect.delimiter
to
otu_delimiter = '\t'

I think it would be great to allow an option to force override the delimiter setting.

-Thanks!
-M

JSONDecodeError

Hi!

I am trying to run FUNGuild locally from the command line. I have followed your instructions. I have installed the Anaconda Python version 3.6.6; I have updated to the most recent version of pip (2.22.0); I have installed the requests package; I have saved Guilds_v1.1.py into the same folder as my otu file; and I have chaged the directory to this file. When I try and run the script, I get this error message:

S:\FUNGuild>python Guilds_v1.1.py -otu Test.txt -db fungi
FunGuild v1.0 Beta
Connecting with FUNGuild database ...
Traceback (most recent call last):
File "Guilds_v1.1.py", line 128, in
current_record = json.loads(record)
File "C:\Program Files\Python36\lib\json_init_.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Program Files\Python36\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\Python36\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 10 (char 9)

I don't think it is a problem with the otu file - as I have tried making just a very small one - exactly as specified in your instructions (plus the error does not mention problem with that?).

Your help would be much appreciated.
Thanks,
Emma.

FUNGuild R version

I've been having problems with FUNGuild not recognizing a character in a table and stopping the process. I've read it might be because Im using Windows as people using Linux say it works fine. I am using Jupyter (with Anaconda Navigator). I was wondering if I could test the beta FUNGuild R version because I'm more familiar with R. Also I want to see if the same error comes up and try to progress in my research proyect. I'll still attach the error that happens to see if anyone has any idea of why this could be happening
image

JSONDecodeError

Hi there

trying to run Guilds_v1.1.py and got the following error:

Guilds_v1.1.py:92: DeprecationWarning: 'U' mode is deprecated
with open(otu_file, 'rU') as f1:
FunGuild v1.0 Beta
Connecting with FUNGuild database ...
Traceback (most recent call last):
File "Guilds_v1.1.py", line 128, in
current_record = json.loads(record)
File "/home/solo/miniconda3/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/home/solo/miniconda3/lib/python3.7/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 436 (char 435)

this same error has occurred trying to run this script on 3 different machines (Linux/PC/Mac)

script was last run about 6 months ago with no issues

any solutions?

Many thanks

Output rearranges samples

Hi,

Everything works perfectly, except the output file is reordered differently from the input file in terms of sample order.

For example:
OTU
1
2
3

Becomes
OTU
2
1
3

Does the output file order alphabetically automatically? And is there a way to stop it doing so?
I'm trying to import these outputs into a phyloseq object and the order is important

error while running code for OTUs from genus Aureobasidium

## After I tried running FunGuild using my own file, it was followed by an error as below:

C:\Users\ge37nag\FUNGuild>python FUNGuild.py taxa -otu example/OTU_mod.txt -format tsv -column taxonomy -classifier unite
Taxa parser initiated.
Loading OTU table: example/OTU_mod.txt
Table format: tsv
Taxonomic column: taxonomy
Taxonomic style: unite
Parsed taxa file: example/OTU_mod.taxa.txt

C:\Users\ge37nag\FUNGuild>python FUNGuild.py guild -taxa example/OTU_mod.taxa.txt
Guild parser initiated
Loading taxa file: example/OTU_mod.taxa.txt
Connecting with FUNGuild database ...
Found 11074 records in the db.
Search initiated.
Search finished.
Line number* 590
'charmap' codec can't encode character '\u0142' in position 488: character maps to
FUNGuild results wrote to example/OTU_mod.taxa.guilds.txt.

## This resulted in a guild file which ended abruptly after the row number 590 in my input file.

## I then added this explicit exception handling at line no. 214 line in Funguild.py
f.write('%s\n' % '\t'.join([str(i) for i in line]))

C:\Users\ge37nag\FUNGuild>python FUNGuild.py taxa -otu example/OTU_mod.txt -format tsv -column taxonomy -classifier unite
Taxa parser initiated.
Loading OTU table: example/OTU_mod.txt
Table format: tsv
Taxonomic column: taxonomy
Taxonomic style: unite
Parsed taxa file: example/OTU_mod.taxa.txt

C:\Users\ge37nag\FUNGuild>python FUNGuild.py guild -taxa example/OTU_mod.taxa.txt
Guild parser initiated
Loading taxa file: example/OTU_mod.taxa.txt
Connecting with FUNGuild database ...
Found 11074 records in the db.
Search initiated.
Search finished.
['OTU_00589', 'Fungi', 'Ascomycota', 'Dothideomycetes', 'Dothideales', 'Dothioraceae', 'Aureobasidium', 'Aureobasidium_unclassified', 'Aureobasidium', '13', 'Pathotroph-Saprotroph-Symbiotroph', 'Animal Pathogen-Endophyte-Epiphyte-Plant Pathogen-Undefined Saprotroph', 'NULL', 'Facultative Yeast', 'Possible', 'NULL', 'Costa IPMW, et al. 2012. Mycotaxon 119:e26 ((http://mycotaxon.com/resources/checklists/costa_v119_checklist.pdf)); Tedersoo L, et al. 2014. Science 346:e1256688 ((https://doi.org/10.1126/science.1256688)); Wachowska U, Głowacka K. 2014. BioControl 59:635-645 ((https://doi.org/10.1007/s10526-014-9596-5)); Irinyia L, et al. 2016. Fungal Biology 120:125-136 ((https://doi.org/10.1016/j.funbio.2015.04.007)); The American Phytopathological Society Common Names of Plant Diseases ((http://www.apsnet.org/publications/commonnames/Pages/default.aspx))']
'charmap' codec can't encode character '\u0142' in position 488: character maps to
['OTU_00692', 'Fungi', 'Ascomycota', 'Dothideomycetes', 'Dothideales', 'Dothioraceae', 'Aureobasidium', 'Aureobasidium_sp', 'Aureobasidium', '13', 'Pathotroph-Saprotroph-Symbiotroph', 'Animal Pathogen-Endophyte-Epiphyte-Plant Pathogen-Undefined Saprotroph', 'NULL', 'Facultative Yeast', 'Possible', 'NULL', 'Costa IPMW, et al. 2012. Mycotaxon 119:e26 ((http://mycotaxon.com/resources/checklists/costa_v119_checklist.pdf)); Tedersoo L, et al. 2014. Science 346:e1256688 ((https://doi.org/10.1126/science.1256688)); Wachowska U, Głowacka K. 2014. BioControl 59:635-645 ((https://doi.org/10.1007/s10526-014-9596-5)); Irinyia L, et al. 2016. Fungal Biology 120:125-136 ((https://doi.org/10.1016/j.funbio.2015.04.007)); The American Phytopathological Society Common Names of Plant Diseases ((http://www.apsnet.org/publications/commonnames/Pages/default.aspx))']
'charmap' codec can't encode character '\u0142' in position 478: character maps to
['OTU_06332', 'Fungi', 'Ascomycota', 'Dothideomycetes', 'Dothideales', 'Dothioraceae', 'Aureobasidium', 'Aureobasidium_sp_RBSS_303', 'Aureobasidium', '13', 'Pathotroph-Saprotroph-Symbiotroph', 'Animal Pathogen-Endophyte-Epiphyte-Plant Pathogen-Undefined Saprotroph', 'NULL', 'Facultative Yeast', 'Possible', 'NULL', 'Costa IPMW, et al. 2012. Mycotaxon 119:e26 ((http://mycotaxon.com/resources/checklists/costa_v119_checklist.pdf)); Tedersoo L, et al. 2014. Science 346:e1256688 ((https://doi.org/10.1126/science.1256688)); Wachowska U, Głowacka K. 2014. BioControl 59:635-645 ((https://doi.org/10.1007/s10526-014-9596-5)); Irinyia L, et al. 2016. Fungal Biology 120:125-136 ((https://doi.org/10.1016/j.funbio.2015.04.007)); The American Phytopathological Society Common Names of Plant Diseases ((http://www.apsnet.org/publications/commonnames/Pages/default.aspx))']
'charmap' codec can't encode character '\u0142' in position 487: character maps to
FUNGuild results wrote to example/OTU_mod.taxa.guilds.txt.

#This resulted in a guild file for all of my OTUs except for OTUs belonging to the genus Aureobasidium.

Best,
Dharmesh

Issues taking values from database

The script wasn't able to concatenate str and int values from the database. Maybe the database has changed formats. The issue was resolved by forcing the script to turn each value into a string before concatenating with the for loop (around line 154; see change section

below)

for item in parse_data: line = "" for value in item: line+=str(value)+"\t" #f.write("%s\n" %("\t".join(item))) line+="\n" f.write(line) f.close()

R script for FunGuild

Dear Scott T. Bates,
I used to use the FunGuild online tool with my data but I see that it is not available anymore.
I have read in this post (#31 (comment)) that you were working on an R script to use FunGuild.
I have never worked with phyton and I am finding problems to run the script. Would it be possible to have the R script available?
Thank you for your help, and for developing this useful database!

Laura

Data missing?

A couple of months ago when I got my first round of sequences back and was searching genera in the database, I would get matches. Now when I search those same genera, it says there's no data. For example, when I searched "amanita" a few months ago, it said it was highly probable ECM. If I search amanita now, nothing shows up.

Seems like I should be getting way more OTU guild assignments

I'm trying to use Funguild to make guild assignments to an OTU table generated from NEON soil metabarcoding sequences. I've got a csv containing 22,709 OTUs, with their taxonomy specified all the way to at least the genus level. Many of these OTUs represent species whose functional guild is obvious (i.e. Amanita should be ectomycorrhizal). However, when I run the csv through the Funguild python script, I only get assignments made on 118 OTUs. When I examine the new file with the 118 guild assignments made, I notice that there are zero assignments for any of them being ectomycorrhizal, which to me is a red flag that something is not working correctly as there are a number of OTUs in the table that are obviously ectomycorrhizal genera/species. The python script is working, as it's accessing the csv and is making functional guild assignments... but it is nowhere near close to making assignments on enough of the OTUs in the csv.

Can anyone help me resolve this issue? I know I have not included a ton of information here, so please kindly let me know what other info you might need to better understand the issue.

Thanks so much in advance for your time and consideration!

-Chris

Keyerror: taxonomy

Hi everyone,

I am working with an ASV table from dada2 output in R. I did some data wrangling to make a 'taxonomy' column as similar as I could to the example asv table provided. I also changed 'ASV' to 'OTU' in case that was important. The taxonomy column in the ASV table looks like this:

|Vishniacozyma_victoriae|k__Fungi;p__Basidiomycota;c__Tremellomycetes;o__Tremellales;f__Bulleribasidiaceae;g__Vishniacozyma;s__victoriae

Here is the error message: FUNGuild % python FUNGuild.py taxa -otu /Users/maraslaptop/Downloads/Fungal-Steam-ASV-Table.txt -format tsv -column taxonomy -classifier unite
Taxa parser initiated.
Loading OTU table: /Users/maraslaptop/Downloads/Fungal-Steam-ASV-Table.txt
Table format: tsv
Taxonomic column: taxonomy
Taxonomic style: unite
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2897, in get_loc
return self._engine.get_loc(key)
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'taxonomy'

I'm attaching a shortened version of my asv file.
Fungal-ASV-Funguild.txt

Is there any progress of Poikilotrophic guilds?

One of the biggest barriers for doing Northern studies is the high amount of unassigned taxa that are poikilotrophs; does anyone know if there is any work being done on adding this guild/troph to the database?

First stepts in FunGuild

Dear all,
I am starting user of python and FunGuild.
I have followed the script Guilds_v1.1. modifying the corresponding parameters as:
#Detect delimiter in the input file
#output files
In order to note my folders and the example otu table provider by developers:

I started to compute in Windows through cmd command line and as soon as it starts the following error appeared:
"name "argparse" is not defined".

If you could clarify what is happening would be great for beginners as me.

Thank

SSL certificate error

Hi,
I run the script from Anaconda3 prompt and when I get to the guild assignment part I get a SSL certificate verification error. I have zero experience with python and didn’t find any working solution online. Do you have any advice? Thanks
Lenka

Unicode Error

I am hitting an issue with FunGuild writing the output file.
I get 'UnicodeEncodeError: 'charpmap' codec can't encode character '\u0142' in position 465 ...
There no unicode in my input files. I assume this an exception occurring whilst writing data associated with the Funguild database.
I am using Python 3.9.

Guilds_v1.1.py error

Hi, I ran the python script on my OTU table and it worked, but I got a really messy output. So I thought i would take out the column that contained the sequence length information, as it is not present in example table that you provided. If I run the script again with this modification I get this error:
File "Guilds_v1.1.py", line 121, in
index_tax = header.index(lookup)
ValueError: 'taxonomy' is not in list

I am attaching the input file, I only took out a column and I did not modify the taxonomy one.
thanks a lot for any help.
CR_otutableID.txt

compatibility with UFITS

Hello,

I've made a few adjustments to a local copy of FunGuilds.py that allows it to work with our clustering/taxonomy package for fungal ITS sequences UFITS, as I'm using a slightly different taxonomy tree to work with the UTAX classifier. Which looks like this:

UTAX;k:Fungi,p:Basidiomycota,c:Agaricomycetes,o:Polyporales,f:Meruliaceae,g:Hyphoderma,s:Hyphoderma puberum

If you are interested in modifying your script the minor changes are below:

#look for Taxonomy or taxonomy
if 'taxonomy' in header:
    lookup = 'taxonomy'
elif 'Taxonomy' in header:
    lookup = 'Taxonomy'

# get the positions of the taxonomy column and Notes column
index_tax = header.index(lookup)
index_notes = header.index('Notes')

#Abort if the column 'taxonomy' is not found
if index_tax == -1:
    print "Column 'taxonomy' or 'Taxonomy' not found. Please check you OTU table %s." %(otu_file)
    sys.exit(0)

And then one more, just need to add ':' to the replace_list below:

with open(otu_file, 'rU') as otu:
    otu_tab = []    
    for record in otu:
        otu_current = record.split(otu_delimiter)
        otu_taxonomy = otu_current[index_tax].rstrip('\n')
        replace_list = ['_',' ',';',',', ':']
        for symbol in replace_list:
            otu_taxonomy = otu_taxonomy.replace(symbol, '@')
        otu_taxonomy = otu_taxonomy + '@'
        otu_current[index_tax] = otu_taxonomy
        otu_tab.append(otu_current)
    otu_tab = otu_tab[1:] # remove the header line

Thanks!
Jon

online Guilds not work

I got no results when I used the example OTU,showing 0 assignments were made on OTUs within the input file!

Online database not working

Hi,

I've used the online database in the past, but am having issues trying to use it today. Every search doesn't produce results. I'm wondering if I should install a local copy and run that instead, but am wondering if it's the database itself? Any ideas?

Thank you!

German Umlaut issues on writing guilds.txt

Cause : Running Guilds_v1.1.py
Environment: Windows 10 python 3.9 native and conda
Issues:

while working on taxon

k__Fungi; p__Ascomycota; c__Lecanoromycetes; o__Trapeliales; f__Trapeliaceae; g__unidentified; s__Trapeliaceae_sp | Trapeliaceae | 9 | Symbiotroph | Lichenized | Thallus | NULL | Probable | NULL | Hertel H. 1970. Vorträge aus dem Gesamtgebiet der Botanik 4:171-185

Both conda and native python 3.9 file, both fails to write .guilds.txt file due to encoding cp949 errors

web FUNGuild does not work anymore?

Hello,
I'm trying to use the web site of FUNGuild, which is nice to test on little datasets. However the web application doesn't weem to work anymore, as it is not possible to upload our datasets. Is this a temporary issue or the web application will not anymore be available?
Thank for your answer.
Greetings,
jaime

OTU delimiter

Hi Zewei,

There is a minor typo in Line 96:
out_delimiter = '\t'

It should be:
otu_delimiter = '\t'

Thanks,
Soon

Using FUNGuild in R

Hi All!

I am wondering if any of you all have used the FUNGuild database in R instead of Python. I have found mention of people getting it to work using phyloseq in R, but have not been able to find any instructions anywhere.

Thanks in advance!

encoding

I am trying to use FUNGuild for the first time and I am getting the following error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 67: ordinal not in range(128)
My OTU table is attached. It was originally made in qiime2 then edited in excel/text editor to correctly format for FUNGuild.
I have tried running the FUNGuil script both with and without the -m option.
table-with-taxonomy-mod.txt

Running from R script

Hi there!

I am trying to run the FUNGuild script from an R script but I am having little success. I have tried using system(python /GuildScript/Location/Guilds_v1.1.py -otu /specify/otu/location/otu_table_example.txt -db fungi -m -u), but it did not work. Do you have any suggestions as to how one could possibly run the FUNGuild script through R?

Thanks! :)

JSON Decode Error

I apologise if this is a naive question but I haven't been able to find any similar answers online.

I ran FUNGuild on some data around October 2020 and it worked no problem, but our data has since changed and I need to rerun everything. I tried to rerun my old data using everything the exact same as I did in October but I am coming up with the following error:

C:\Users . . . FUNGuild-master>python Guilds_v1.1.py -otu esv_table_funguild.txt -db fungi

Guilds_v1.1.py:92: DeprecationWarning: 'U' mode is deprecated
with open(otu_file, 'rU') as f1:
FunGuild v1.0 Beta
Connecting with FUNGuild database ...
Traceback (most recent call last):
File "Guilds_v1.1.py", line 128, in
current_record = json.loads(record)
File "C:\Users\BrewDaddy\anaconda3\lib\json_init_.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\BrewDaddy\anaconda3\lib\json\decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 436 (char 435)

I found one forum that suggested replacing '%s' with '%s\n' to: "output.write('%s\n' % ('\t'.join(header))) #Header", "output.write('%s\n' % rec)" and "output_unmatched.write('%s\n' % rec)" (lines 290, 296 and 326) but that came up with the same error. I also read that it could be fixed by using Anaconda3 but that is what I currently use. Just curious to know what I am doing wrong for it to not work this time around.

Kind Regards,
Brewski63

Errors when trying to use Funguild

Dear All,
I'm trying to use Funguild with my data , using Anaconda python and the funguildv1.1 script.
My OTUs table does not contain the percentage and the accession number infront of the taxon as in the example otu table.
The command as follows:
(qiime2-2019.10) marwa@x86_64-conda_cos6-linux-gnu[ITS_tutorial] python Guilds_v1.1.py -otu /home/marwa/ITS_tutorial/otu_funguild_new.txt -m -u

I obtained the following result with the Value Error taxonomy is not in list.
FunGuild v1.0 Beta
Connecting with FUNGuild database ...

Reading in the OTU table: '/home/marwa/ITS_tutorial/otu_funguild_new.txt'

Traceback (most recent call last):
File "Guilds_v1.1.py", line 184, in
index_tax = header.index(lookup)
ValueError: 'taxonomy' is not in list

When i tried funguildv1.0 scrript with the python 2.7, i obtained this error:
FunGuild v1.0 Beta
Downloading fungi database ...
Traceback (most recent call last):
File "Guilds_v1.0.py", line 147, in
current = ast.literal_eval(line)
File "/usr/lib/python2.7/ast.py", line 49, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/usr/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "", line 1
{ "_id" : { "$oid" : "59271664791497fd28ec2597"} , "taxon" : "Dactylospora microspora" , "taxonomicLevel" : 20 , "trophicMode<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML
^
SyntaxError: invalid syntax

Would you please helpme in that.
Regards,
Marwa

Issues with Guilds_v1.1.py calling Taxon

Hi there

Since downloading the new Guilds script i've found that I get a very different output when running my ITS1 dataset through the database.

It appears to be calling higher Taxon Levels for sequences that are classified to species
for example:
k__Fungi;p__Basidiomycota;c__Agaricomycetes;o__Agaricales;f__Cortinariaceae;g__Cortinarius;s__Cortinarius_iringa;Cortinarius_iringa;
receives the Taxon 'Agaricales', (Taxon Level 7), whereas the previous script version annotated it as 'Cortinaruis' (Taxon Level 13)

This changes the output substantially - these taxa (and many more like it) now receive 'Possible' confidence levels of 'Pathotroph-Saprotroph-Symbiotroph', instead of 'Highly Probable' 'Symbiotroph'

has the database changed or is the script pulling something out incorrectly?

I would appreciate any help with this

Many thanks
Hans

Error in taxonomy assignment

Hi, I'm trying to use the Guilds_v.1.1.py in script mode.
The script was worked fine in most of OTUs, but taxonomic assignment errors were found in some of the taxons.
While those taxons were found at genus level in database (and their guilds were assigned correctly in previous web version), their guilds and other traits were assigned only at family level.

I attached the examples.
test1.txt
test1.guilds.txt

Thank you!

Problem with running script

Hi. I am very new to FunGuild. I am running the script with the example data and getting this error message
(base) PANKAJs-iMac:funguild pankajtrivedi$ python Guilds_v1.1.py -otu /BOOK4.CSV -db fungi -m -u
File "Guilds_v1.1.py", line 3
'''
^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xd0 in position 3335: invalid continuation byte

Guild assignments are na

aridity_otu_table_wTax_dada2_funguild.txt
Hi,
I am using the attached ASV/OTU file (aridity_otu_table_wTax_dada2_funguild.txt) and the result file has na for guild information (aridity_otu_table_wTax_dada2_funguild.guilds.txt).
aridity_otu_table_wTax_dada2_funguild.guilds.txt

The code that I am using is below:
python FUNGuild.py taxa -otu C:\Users\priya\Box\AZ_UA_Dec2020\2021_Ongoing_Projects\Oak_Study\fun_ITS\FUNGuild\aridity_otu_table_wTax_dada2_funguild.txt -format tsv -column taxonomy -classifier unite
python FUNGuild.py guild -taxa C:\Users\priya\Box\AZ_UA_Dec2020\2021_Ongoing_Projects\Oak_Study\fun_ITS\FUNGuild\aridity_otu_table_wTax_dada2_funguild.txt

I am not getting any errors while running the code. So, I am not sure why I am not getting Guild information with my OTU table. I would appreciate any help.

Thank you,
Priyanka

FUNGuild online

When i upload my OTU table online and try to download the output OTU file i recieve the following error message:

Warning: fopen(/home/azfungiserv/stbates.org/guilds/otu_tables/otu_table_ITS2_tsv.guilds.txt): failed to open stream: No such file or directory in /home/azfungiserv/stbates.org/guilds/download.php on line 11

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/azfungiserv/stbates.org/guilds/download.php on line 33

Any ideas as to what I'm doing wrong?

output missing a line ending?

Hello

I find that in my output there is missing a line shift between the header and the first line - i.e. the last header, "Citation/Source" continues with the first OTU ID without any return/line-ending (or space, tab) in between.

Can you reproduce this "error"

Duplicate entries

There are a number of duplicate taxon records in the current version of the FUNGuild database (Achaetomium, Chaetomium globosum, Chloridium chlamydosporum, Homostegia hertelii, Pseudombrophila, Setosphaeria rostrata, Thelebolus, Unguiculariopsis lettaui, Xanthoriicola physciae). To be clear, each of these taxon names appears twice in the database; the data are different for the two records. This can lead to the result table having more lines than the query table, which is unexpected. Previously multiple alternatives for a single taxon were always combined in a single record.

encoding

Hi

I have been using FunGuild with succes. With my latest dataset, however, I had this error message

Found 7676 matching taxonomy records in the database.
Dereplicating and sorting the result...
Traceback (most recent call last):
File "Guild11.py", line 295, in
rec = '\t'.join([str(i) for i in item])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 95-96: ordinal not in range(128)

I never really found out, what character in my input file (an output from UNITE) caused the problem but I solved by adding

reload(sys)
sys.setdefaultencoding('utf-8')

to the script.

Cheers
Tobias

UnicodeEncodeError with f.write('%s\n' % output_line) function

Hi

I am using Anaconda 3 and Python 3.6 but I am getting an EncodeError.

Traceback (most recent call last):
File "Guilds_v1.1.py", line 351, in
f.write('%s\n' % output_line)
File "C:\Users\Emily\anaconda3\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u0159' in position 593: character maps to

Can you help?

Thank you,
Emily

Output guilds_matched

Hi

I use Guilds__v1.1.py and the file output .guilds_matched.txt not have "\n" space between lines.

Saludos !!!!

Error with running funguild code

Hi,

I have been able to successfully run FUNGuild multiple times before, but this time I am having an error.

I have run the code below, and also tried running it with the Guilds v1.0.py and neither is working. I have python version 3.8.2.

Any help would be greatly appreciated.

-Jane

Janes-MBP:FUNGuild_katelyn janelucas$ python Guilds_v1.1.py -otu Katelyn_ITS_funguild.txt

Guilds_v1.1.py:92: DeprecationWarning: 'U' mode is deprecated
with open(otu_file, 'rU') as f1:
FunGuild v1.0 Beta
Connecting with FUNGuild database ...
Traceback (most recent call last):
File "Guilds_v1.1.py", line 128, in
current_record = json.loads(record)
File "/Users/janelucas/opt/anaconda3/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/Users/janelucas/opt/anaconda3/lib/python3.8/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 436 (char 435)

Something wrong and Guild script do not work properly

when upload the example .txt file, it takes 8 hours and do not return a result (python 2.7).
litaolindeMacBook-Pro:FUNGuild模版 litao.lin$ python bin/FUNGuild-master/Guilds_v1.0.py -otu
otu_table_example.txt
FunGuild v1.0 Beta
Downloading fungi database ...

In this morning,
litaolindeMacBook-Pro:FUNGuild模版 litao.lin$ python bin/FUNGuild-master/Guilds_v1.0.py -otu otu_table_example2.txt -db fungi
FunGuild v1.0 Beta
Downloading fungi database ...
Traceback (most recent call last):
File "bin/FUNGuild-master/Guilds_v1.0.py", line 147, in
current = ast.literal_eval(line)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 49, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 37, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "", line 1
"taxon":"Aabaarnia siphulicola","guid":"1214B0D5-C087-429A-ADD0-396A8CA30CF2","mbNumber":"810084","taxonomicLevel":"20","trophicMode":"Pathotroph","guild":"Lichen Parasite","confidenceRanking":"Highly Probable","growthForm":"Microfungus","trait":"NULL","notes": .... et al.
SyntaxError: invalid syntax

Another man run the Guild_1.1.py, jack-tristan$ python3 Guilds_v1.1.py -otu rep_set_tax_assignments.txt
FunGuild v1.1 Beta
Connecting with FUNGuild database ... (from yesterday 10 p.m. to today 7 a.m.)

New version of NEMAguild

In updating my FUNGuildR package to use the new version of the FUNGuild database, I find that there is no new version of NEMAguild, and the old version at [http://www.stbates.org/nemaguild_db.php] has no contents. Is the intention to stop supporting NEMAguild (in which case I should deprecate the relevant functions) or is this a temporary situation?

newline characters missing

Hi there

There are some newline characters missing in the python script. The following lines should be (at the moment the "\n" is missing):

Line 290: output.write('%s\n' % ('\t'.join(header))) #Header

Line 296: output.write('%s\n' % rec)

Line 323: output_unmatched.write('%s\n' % ('\t'.join(header)))

Best regards,

Marc

SyntaxError

Dear contributors,

I am very interested to use FUNGuild on my ITS DNA results, it looks like a great tool.
I have been trying to run the script, but so far without success. I would really appreciate some help. Here is what I did :

  • I installed anaconda, with python 3.7.4
  • I created a directory for FunGuild and saved the sequence table (OTU as rows - Unite database, with "taxonomy" as first column name, and samples as columns) as well as the script "Guilds_v1.0.py".
  • In my windows Command prompt, i typed "python Guilds_v1.0.py -otu C:\Users\Username\Desktop\anacondatest\Seqtab_funguild.txt -db fungi"

But I received the following error:
File "Guilds_v1.0.py", line 113
print "FunGuild v1.0 Beta"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("FunGuild v1.0 Beta")?

I am not very familiar with python (I work with R), so I don't feel confident to start modifying your script. Do you know what might be the problem ?

Thank you very much in advance for your help!

Kind regards

Marie-Liesse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.