BenoitMorel / covid19_cme_analysis

GNU Affero General Public License v3.0
7 stars 1 forks source link

TypeError: object of type '_io.TextIOWrapper' has no len() for `9_mptp_on_all_trees.py` #4

Open vinitamehlawat opened 2 years ago

vinitamehlawat commented 2 years ago

Hi @Pbdas

I ran ./pipeline/9_mptp_on_all_trees.py work_dir/2021-11-19_00/fmsan/ and I got following error on my terminal

WARNING: delimit was not compiled with libgsl. Likelihood ratio test disabled. WARNING: A speciation edge is smaller than the specified minimum branch length. mptp 0.2.4_linux_x86_64, 1008GB RAM, 96 cores https://github.com/Pas-Kapli/mptp WARNING: delimit was not compiled with libgsl. Likelihood ratio test disabled. WARNING: A speciation edge is smaller than the specified minimum branch length. WARNING: delimit was not compiled with libgsl. Likelihood ratio test disabled. Traceback (most recent call last): File "/home/vinita/covid19_cme_analysis/./pipeline/9_mptp_on_all_trees.py", line 191, in run_mptp_all_rootings_on_trees_one_histogram(paths.raxml_credible_ml_trees, paths.mptp_output, paths.mptp_output_summary_all_rootings_one_histogram) File "/home/vinita/covid19_cme_analysis/./pipeline/9_mptp_on_all_trees.py", line 181, in run_mptp_all_rootings_on_trees_one_histogram species = get_all_rootings_counts_one_histogram(results_all_rootings_ml + "/output.txt", species) File "/home/vinita/covid19_cme_analysis/./pipeline/9_mptp_on_all_trees.py", line 105, in get_all_rootings_counts_one_histogram for i in range(4, len(lines)): TypeError: object of type '_io.TextIOWrapper' has no len()

I also found so many tempOutFooBar_.svg something around 3000 in number , Please have a look at this error .

BenoitMorel commented 2 years ago

Dear Vinita,

unfortunately, our mptp expert has left academia. Do you really need to run species tree delimitation (that's what mptp does) or can you skip this part? If you really need it we'll try to help you, but I prefer asking before "wasting" time ;-)

Benoit

vinitamehlawat commented 2 years ago

Hi @BenoitMorel

My aim for using your pipeline to get phylogentic tree for my SARS-data with a very good boot support value(BS), If you think 9_mptp_on_all_trees.py script is not impacting my factor then I can skip this.

Thank you Vinita

BenoitMorel commented 2 years ago

That's good news :-) The mptp step is irrelevant for the tree and the support values. The rooting steps that are also causing you trouble are also irrelevant for you (rootdigger and epa).

Getting good support values for all branches will be difficult, but maybe you can get good values for some important branches... In our study, we tried running tree thinning (removing lots of the input sequences to keep to ones that we expect to have a strong phylogenetic signal). If you are ok with discarding sequences, that might be a good option for you. But As far as I remember, we also didn't get good support after thinning.

I am not sure that tree thinning is well documented and that the current script does exactly what's described in my paper. I will check it and keep you in touch today.

Best, Benoit