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

problems combining otu tables to one #190

Open
camillaln opened this issue Jul 17, 2024 · 3 comments
Open

problems combining otu tables to one #190

camillaln opened this issue Jul 17, 2024 · 3 comments

Comments

@camillaln
Copy link

Hi,

I get an error when trying to combine several OTU tables to one.
This command ran successfully:
for i in *.profile.tsv
do
name=$(basename $i profile.tsv)
singlem summarise --input-taxonomic-profile $i --output-species-by-site-relative-abundance $name.genus_by_site.csv --output-species-by-site-level genus
done

But when I do

singlem summarise --input-otu-tables *.genus_by_site.csv --output-otu-table combined.otu_table.csv
I get an error.

(singlem) can002@inter-c-aafc-ubuntu2004:/gpfs/fs3c/aafc/aafc_shp/can0002/deep-metagenomes/SingleM$ singlem summarise --input-otu-tables *.genus_by_site.csv --output-otu-table combined.otu_table.csv
07/17/2024 03:17:12 AM INFO: SingleM v0.18.1
Traceback (most recent call last):
File "/gpfs/fs3c/aafc/aafc_shp/can0002/miniconda3/envs/singlem/bin/singlem", line 858, in
otus.add_otu_table(open(o))
File "/gpfs/fs3c/aafc/aafc_shp/can0002/miniconda3/envs/singlem/lib/python3.12/site-packages/singlem/otu_table_collection.py", line 32, in add_otu_table
self.otu_table_objects.append(OtuTable.read(input_otu_table_io))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/gpfs/fs3c/aafc/aafc_shp/can0002/miniconda3/envs/singlem/lib/python3.12/site-packages/singlem/otu_table.py", line 113, in read
for otu in OtuTable.each(input_otu_table_io):
File "/gpfs/fs3c/aafc/aafc_shp/can0002/miniconda3/envs/singlem/lib/python3.12/site-packages/singlem/otu_table.py", line 26, in each
raise Exception("Parse issue parsing line of OTU table: '%s'" % d)
Exception: Parse issue parsing line of OTU table: '['taxonomy', 'S00JY-0887_S190_L001_R1_001']'

Do you have any suggestions as to what I am doing wrong?
Thanks
Camilla

@wwood
Copy link
Owner

wwood commented Jul 17, 2024

Hi Camilla,

That does look to me as if there is an issue with the input OTU table file. How was it generated? OTU tables (note, these are not taxonomic profiles - see the glossary in the docs) have 5+ columns, where that line only has 2.

@camillaln
Copy link
Author

Thanks for your quick reply!
I generated the OTU tables using this command:

for i in *.profile.tsv
do
name=$(basename $i profile.tsv)
singlem summarise --input-taxonomic-profile $i --output-species-by-site-relative-abundance $name.genus_by_site.csv --output-species-by-site-level genus
done

@wwood
Copy link
Owner

wwood commented Jul 22, 2024

Hi @camillaln - did thsi get solved?

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

No branches or pull requests

2 participants