phyloacc / PhyloAcc

PhyloAcc a software to detect the changes of conservation of a genomic region
GNU General Public License v3.0
26 stars 12 forks source link

**Error IO2: Error reading tree from file! #42

Closed YellowStar96 closed 1 year ago

YellowStar96 commented 1 year ago

Dear authors:

Thanks for sharing these useful codes and resources!

When I'm running the Phyloacc test data, I get an error in the phyloacc_post.py step:

**Error IO2: Error reading tree from file! image

My phyloacc version is "# PhyloAcc version 2.1.0 released on October 23, 2022"

I noticed that you changed the script "phyloacc_post.py" specifically for this error type, but why do I still get similar errors using this version (v2.1.0) of the script?

Looking forward to your reply. Thank you!

Best regards, Xin Huang

gwct commented 1 year ago

Hey there, Sorry for the delay, for some reason I'm still not getting notifications of new issues here. I am able to replicate this error and am looking into it. I'll let you know as soon as I know more!

gwct commented 1 year ago

I believe I've fixed this by adding back in the line in the interface that prints the tree to the log file. Without it there, the post-processing script couldn't look it up.

I've pushed a new release which should update on bioconda soon. You could wait and update to that release, in which case you'd have to run the interface script again with --overwrite (result files in the phyloacc-job-files/phyloacc-output/ directory should be preserved).

Alternatively, just add the following line to the interface log file:

# Tree read from mod file: <tree string>

and replace <tree string> with the Newick formatted tree used as input (from the .mod file). Let me know if you have any other issues with this, and I'll leave this open until bioconda updates the release!

gwct commented 1 year ago

Sorry for the delay on this again. I've pushed the update as v2.1.1 here, but no one at bioconda seems to be available to merge the PR there. The manual fix I mentioned above should work for now, and hopefully it gets updated on bioconda soon...

gwct commented 1 year ago

The PR on bioconda was just merged so the fix is now available there. Let me know if you still have problems!

conniecl commented 5 months ago

Hi @gwct, I still met same errors, and as you suggested, I add the tree file to the log, but faced another problem, hope can get your help. Here is my error log: post-err And my version is: PhyloAcc version 2.2.0 released on April 20, 2023; Tree was added in the first line of the log:

log

gwct commented 5 months ago

Hi @conniecl, It looks like the log file you added the tree to was a log file from an individual PhyloAcc run. You should add it to the log file that is generated by the phyloacc.py interface script. When you ran phyloacc.py, you may have given it an option for an output directory using -o. If so, your log file will be something like /path/to/your/outdir/outdir.log. If you didn't specify -o, there will be a directory created in the directory you ran phyloacc.py called phyloacc-out-[datetime]/ and the log file will be phyloacc-out-[datetime]/phyloacc.log.

If, however, you didn't run phyloacc.py first and are just running a version of PhyloAcc by itself, then you won't have this log file and you won't be able to run phyloacc_post.py.

Hopefully that is clear, but let me know if you have any questions.