vrmarcelino / CCMetagen

Microbiome classification pipeline
GNU General Public License v3.0
64 stars 19 forks source link

Index out of range when using CCMetagen.py #35

Closed tamascogustavo closed 2 years ago

tamascogustavo commented 2 years ago

Hello, I am facing the following problem:

(metagenomics) ➜  sample2 CCMetagen.py -i out_kma.res -o result

Reading file out_kma.res

Traceback (most recent call last):
  File "/opt/anaconda3/envs/metagenomics/bin/CCMetagen.py", line 274, in <module>
    df = fParseKMA.populate_w_tax(df, ref_database, st, gt, ft, ot, ct, pt)
  File "/opt/anaconda3/envs/metagenomics/lib/python3.7/site-packages/ccmetagen/fParseKMA.py", line 90, in populate_w_tax
    match_info.Lineage = split_match[2]
IndexError: list index out of range

I am also sending in attach the files so you can try to reproduce the error if needed. Obs: .res is .txt due to git.

out_kma.txt

The out files were created based on resfinder indexed database:

kma -ipe Sample.R1.trim.fastq.gz Sample.R2.trim.fastq.gz -o out_kma -t_db ~/resfinder_db/all -t 8 -1t1 -mem_mode -and

all is the database for all resistant genes.

Best, Tamasco

vrmarcelino commented 2 years ago

Hi Gustavo!

CCMetagen was designed for taxonomic classifications, so you need to use a reference database containing taxonomies. It won't work for AMR. It would be a great to be able to identify which species encode the AMR genes, but the genes in the resfinder db are the 'acquired' ones only, so it is really tricky to know from which genomes they come from.

tamascogustavo commented 2 years ago

Thank's for the feedback! Best, Tamasco