Recently I am following a metaphlan2 tutorial. But I got an error in step 4 (Taxonomic biomarker discovery with LEfSe). The command is:
$ format_input.py tmp/merged_abundance_table.4lefse.txt tmp/merged_abundance_table.lefse -c 1 -o 1000000
Then I got the following error:
Traceback (most recent call last):
File "/expt/expt_5/jessie/src/lefse/format_input.py", line 415, in <module>
params['subject']-1 if not params['subject'] is None else None)))
File "/expt/expt_5/jessie/src/lefse/format_input.py", line 123, in sort_by_cl
if n == 1: data.sort(sort_lines1)
TypeError: must use keyword argument for key function
I am using python 3.6 to run this command. But this script seems to be written with python2. I am a newbie to python and I have tried to debug some other errors so far. However, I cannot fix this error. Anyone who can help me? Any suggestions would be greatly appreciated.
Best Regards,
Jessie
--
You received this message because you are subscribed to the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jessie
--
You received this message because you are subscribed to a topic in the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/metaphlan-users/8GzrXbRWUIE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to metaphlan-use...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to metaphlan-users+unsubscribe@googlegroups.com.
Hi guys,
(lefse) Nguyens-iMac:~ Bioinformatics$ /Users/Bioinformatics/Downloads/nsegata-lefse-9adc3a62460e/format_input.py /Users/Bioinformatics/Downloads/genus-lefse.txt /Users/Bioinformatics/Desktop/genus-lefse.in -c 1 -s 1 -o 1000000
Traceback (most recent call last):
File "/Users/Bioinformatics/Downloads/nsegata-lefse-9adc3a62460e/format_input.py", line 427, in <module>
first_line = modify_feature_names(list(first_line))
File "/Users/Bioinformatics/Downloads/nsegata-lefse-9adc3a62460e/format_input.py", line 278, in modify_feature_names
if r[0] in ['0','1','2','3','4','5','6','7','8','9','_']:
IndexError: string index out of range
(lefse) Nguyens-iMac:~ Bioinformatics$ /Users/Bioinformatics/Downloads/nsegata-lefse-9adc3a62460e/format_input.py /Users/Bioinformatics/Downloads/genus-lefse.txt /Users/Bioinformatics/Desktop/genus-lefse.in -c Status -s 1 -o 1000000
usage: format_input.py [-h] [--output_table OUTPUT_TABLE] [-f {c,r}]
[-c [1..n_feats]] [-s [1..n_feats]] [-o float]
[-u [1..n_feats]] [-m {f,s}] [-n int]
[-biom_c BIOM_CLASS] [-biom_s BIOM_SUBCLASS]
INPUT_FILE OUTPUT_FILE