Hello, @fbeghini and bioBakery team! I have added the genome of interest in the Chocophlan database using the instructions mentioned in here and here. I got the following error: of glen
while using the new Chocophlan database.
Command:
metaphlan kneaddata_output/R1_kneaddata_paired_1.fastq, kneaddata_output/R2_kneaddata_paired_ 2.fastq --input_type fastq -o metaphlan_output/LW_NewDb.tsv -t rel_ab_w_read_stats --stat_q 0.2 --min_alignment_len 30 --nproc 64 --add_viruses --bowtie2db /home/samiahkanwar/Desktop/AKU_System/MetaPhlAn3/bowtie2db --add_viruses --bowtie2out metaphlan_output/LW_NewDB.bz2
Error:
> Traceback (most recent call last):
> File "/home/samiahkanwar/anaconda3/envs/mpa/bin/metaphlan", line 8, in <module>
> sys.exit(main())
> File "/home/samiahkanwar/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 1071, in main
> tree, map_out = create_tree_and_add_reads( mpa_pkl, ignore_markers, pars, avg_read_length, markers2reads)
> File "/home/samiahkanwar/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 936, in create_tree_and_add_reads
> tree = TaxTree( mpa_pkl, ignore_markers , unknown_calculation = unknown_calculation)
> File "/home/samiahkanwar/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 687, in __init__
> add_lens(self.root)
> File "/home/samiahkanwar/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 679, in add_lens
> lens.append( add_lens( c ) )
> File "/home/samiahkanwar/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 679, in add_lens
> lens.append( add_lens( c ) )
> File "/home/samiahkanwar/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 679, in add_lens
> lens.append( add_lens( c ) )
> [Previous line repeated 4 more times]
> File "/home/samiahkanwar/anaconda3/envs/mpa/lib/python3.7/site-packages/metaphlan/metaphlan.py", line 676, in add_lens
> return node.glen
> AttributeError: 'TaxClade' object has no attribute 'glen'
The above command does create the bowtie2 output file, and when I used this file as input for Metaphlan, the command ran successfully and generated the relative abundance file.
I’m wondering why this is happening.
- Why is Metaphlan unable to generate an output file when using fastq files as input and a customized database?
Note: Metaphlan runs without errors when I use the default chocophlan database (MPA_v30_CHOCOPhlAn_201901) with fastq files as input .
- Can I relay on the results generated by this
metaphlan metaphlan_output/LW_newDB.bz2 --nproc 5 --input_type bowtie2out -o metaphlan_output/LW_newDB.tsv -t rel_ab_w_read_stats --stat_q 0.2 --min_alignment_len 30 --add_viruses
command or has it missed some important steps?
Note: Bowtie2 output file contains the hits from the new marker sequence.