hi
I’m trying to use Metaphlan2 to look at the microbiome abundance in several samples, but when I try to run them I get the following error ,at first ,I use command: metaphlan2.py /pub/yuanjian/lsd/Biosoft/bowtie/alignment_out/unaligned_fq/SRR7828865_unaligned_R_1.fastq,/pub/yuanjian/lsd/Biosoft/bowtie/alignment_out/unaligned_fq/SRR7828865_unaligned_R_2.fastq --bowtie2out SRR7828865.bowtie2.bz2 --nproc 4 --input_type fastq > profiled_SRR7828865.txt
Downloading MetaPhlAn2 database
Please note due to the size this might take a few minutes
Downloading https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1
Warning: Unable to download https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1
Traceback (most recent call last):
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 1580, in
metaphlan2()
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 1373, in metaphlan2
check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘offline’])
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 842, in check_and_install_database
download_unpack_tar(FILE_LIST, index, bowtie2_db, bowtie2_build, nproc)
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 749, in download_unpack_tar
url_tar_file = ls_f[“mpa_” + download_file_name + “.tar”]
UnboundLocalError: local variable ‘ls_f’ referenced before assignment
it may cannot access to dropbox,then I have downloaded databases manually,and use caommand:
metaphlan2.py /pub/yuanjian/lsd/Biosoft/bowtie/alignment_out/unaligned_fq/SRR7828865_unaligned_R_1.fastq,/pub/yuanjian/lsd/Biosoft/bowtie/alignment_out/unaligned_fq/SRR7828865_unaligned_R_2.fastq --bowtie2_exe /pub/yuanjian/lsd/Biosoft/bowtie -x /pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan_databases/MetaPhlAn_databases/mpa_v20_m200 --bowtie2db /pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan_databases/MetaPhlAn_databases/ --bowtie2out SRR7828865.bowtie2.bz2 --nproc 4 --input_type fastq > profiled_SRR7828865.txt
then:
Downloading MetaPhlAn2 database
Please note due to the size this might take a few minutes
File /pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan_databases/MetaPhlAn_databases/file_list.txt already present!
Traceback (most recent call last):
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 1580, in
metaphlan2()
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 1373, in metaphlan2
check_and_install_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2_build’], pars[‘nproc’], pars[‘offline’])
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 842, in check_and_install_database
download_unpack_tar(FILE_LIST, index, bowtie2_db, bowtie2_build, nproc)
File “/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan2.py”, line 749, in download_unpack_tar
url_tar_file = ls_f[“mpa_” + download_file_name + “.tar”]
KeyError: ‘mpa_/pub/yuanjian/lsd/Biosoft/metaphlan/metaphlan_databases/MetaPhlAn_databases/mpa_v20_m200.tar’
Any help would be greatly appreciated.