Strainphlan.py won't run when additional arguments are passed

37 views
Skip to first unread message

Megan Folkerts

unread,
Jan 21, 2020, 3:34:25 PM1/21/20
to MetaPhlAn-users
Hello,

I'm running an installation of strainphlan that I downloaded from the bitbucket repository to by-pass the current issue with conda download. When I run strainphlan.py with minimal arguments as follows:

strainphlan.py --ifn_samples samplemarkersout/*.markers --ifn_markers s_B_intestinihominis.markers.fasta --ifn_ref_genomes /scratch/mfolkerts/bin/ncbi-genomes-2019-12-20/GCF_000296465.1_Barn_inte_YIT_11860_V1_genomic.fna --output_dir relaxed_parameters/ --clades s__Barnesiella_intestinihominis --nprocs_main 8 --mpa_pkl /scratch/mfolkerts/bin/metaphlan_databases/mpa_v294_CHOCOPhlAn_201901.pkl

everything runs correctly, and RaXML trees are created. However when I try to run with relaxed parameters like so:

strainphlan.py --ifn_samples samplemarkersout/*.markers --ifn_markers s_B_intestinihominis.markers.fasta --ifn_ref_genomes /scratch/mfolkerts/bin/ncbi-genomes-2019-12-20/GCF_000296465.1_Barn_inte_YIT_11860_V1_genomic.fna --output_dir relaxed_parameters/ --clades s__Barnesiella_intestinihominis --nprocs_main 8 --relaxed_parameters --mpa_pkl /scratch/mfolkerts/bin/metaphlan_databases/mpa_v294_CHOCOPhlAn_201901.pkl 

I get the following error:

Traceback (most recent call last):
  File "/scratch/mfolkerts/bin/metaphlan/strainphlan.py", line 1583, in <module>
    strainphlan()
  File "/scratch/mfolkerts/bin/metaphlan/strainphlan.py", line 1579, in strainphlan
    strainer(args)
  File "/scratch/mfolkerts/bin/metaphlan/strainphlan.py", line 1512, in strainer
    float(clade2num_markers[c]) < args['marker_in_clade']:
UnboundLocalError: local variable 'c' referenced before assignment

I'm also getting this error, if, instead of using --relaxed_parameters, I manually pass any or all arguments that --relaxed_parameters conveys. Do you have any idea why this might be happening or what I can do to fix it? 

Thanks,

Megan


Aitor Blanco-Miguez

unread,
Jan 23, 2020, 9:53:37 AM1/23/20
to MetaPhlAn-users
Hi Megan,
Could you check which version of the MetaPhlAn2.9 database did you use for executing sample2markers Script?
On your previous post you were using the version v2.95 for extracting the markers from your metagenomic samples. If this is the case, can you try to execute StrainPhlAn with the v2.95 database version?

Best,
Aitor

Megan Folkerts

unread,
Jan 23, 2020, 10:23:08 AM1/23/20
to Aitor Blanco-Miguez, MetaPhlAn-users
I will try 2.95. I was using 2.94, as there was that issue with the viral genomes in 2.95. 

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/metaphlan-users/b203558e-84b6-496c-80c1-09adaa9a47b4%40googlegroups.com.


--
Megan Folkerts, MS
Research Associate II
Center for Emerging Pathogens and Technologies
TGen North
Flagstaff, Arizona
928-226-6375

This electronic message is intended to be for the use only of the named recipient, and may contain information that is confidential or privileged, including patient health information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately by contacting the sender at the electronic mail address noted above, and delete and destroy all copies of this message. Thank you.

Megan Folkerts

unread,
Jan 23, 2020, 1:38:09 PM1/23/20
to Aitor Blanco-Miguez, MetaPhlAn-users
That fixed it. Thank you!
Reply all
Reply to author
Forward
0 new messages