Open slvrshot opened 7 years ago
The problem looks like it's in the soil_phyloseq_json_L6.txt file.
It looks like you are using the tab-separated version, not the JSON or HDF format, which is correct. Have you opened it in excel by chance? Sometimes excel will save it with funky line endings i.e. ^M
vs /n
.
Do you mind sending me a snipped of the file to inspect?
Something like: head -n5 soil_phyloseq_json_L6.txt > test.file
should work. You can email me or drag and drop it in here.
Can it take the .biom file directly from my pick_open_reference_otus.py step? Also when I get home I'll head the .txt file.
You need to convert it to a TSV based biom, generally after picking otus it's in JSON format (or HDF5 if you have that enabled).
You can tell what format the file is currently in by doing a less -S soil_phyloseq_json_L6.txt
and looking at the output.
less
says it's a binary file it's in HDF5 formatless
shows one line with a bunch of brackets, colons, and quotes it's in JSONless
shows a spreadsheet looking file it's in a TSVSo if it doesn't look like a spreadsheet try to convert it like this:
biom convert -i tsoil_phyloseq_json_L6.txt -o soil_phyloseq_json_L6.tsv --to-tsv --header-key taxonomy
here you go! Thanks!
On Jan 28, 2017, at 4:39 PM, Gene Blanchard notifications@github.com wrote:
-n5 soil_phyloseq_json_L6.txt > test.file
OK, I figured it out. I think originally I was using the OTU files generated by the summarize_taxa_through_plots.py
script. Those files have a different header on the file.
The taxa_summaries header looks like:
Taxon Samplename1 Samplename2...
Where a standard OTU file like yours starts with:
# Constructed from biom file
#OTU ID Samplename1 Samplename2...
I can update the code (and write some much needed documentation) to work with standard OTU files too.
In the meantime you can do this:
# Constructed from biom file
line#OTU ID
to Taxon
Let me know if that works for you!
I think we're close. I get another error but its different from the previous one. It seems its having issues with sample names.
MacQIIME Todds-Mac-Pro:qiime_to_lefse-master $ python qiime_to_lefse.py -m map.txt -t soil_phyloseq_json_L6.txt -c Site -o converted_2lefse.txt --clean
Traceback (most recent call last):
File "qiime_to_lefse.py", line 126, in
Thanks!!!!
So I took a look at the error and it appears that your mapping file contains samples that your OTU table does not. I can't find TB8S2 in the header line of the OTU file you sent.
I am sorry about all the problems you are having. This was a quick script I put together for a collaborators specific file types. I really need to make it more general!
I think I posted the wrong mapping file. I tried it with the correct one and got a similar error. Anyway, I hope my issues end up making the software even better. Thanks for taking the time to look at my issue.
Is there any chance you can email me your full files to help me debug?
gblanchard4-at-gmail-dot-com
Which specific ones do you need?
Oops sorry yes I will!
MacQIIME Todds-Mac-Pro:qiime_to_lefse-master $ python qiime_to_lefse.py -m map_soil_final3.txt -t soil_phyloseq_json_L6.txt -c Description -o converted_2lefse.txt --clean Traceback (most recent call last): File "qiime_to_lefse.py", line 126, in
main()
File "qiime_to_lefse.py", line 122, in main
append_otu_info(taxafile, outfile, sample_dict, categories, clean)
File "qiime_to_lefse.py", line 52, in append_otu_info
taxa, abundance = line.rstrip('\n').split('\t', 1)
ValueError: need more than 1 value to unpack