-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bam2stats error - AttributeError: module 'pysam.libcalignmentfile' has no attribute 'PileupColumn' #109
Comments
So to answer your first issue regarding the conda install, what do you have in your base environment? Do you have python installed? In your base environment you should only have mamba installed and nothing else. For the pysam issue, it may take me a little time to debug, do you have the command and the data that you are using to run bam2stats? |
Thanks @Acribbs. My revision 0 of the base environment seems to contain python, and if I try to remove python, it will also remove conda. Is there any way I can easily get back to a "clean" base environment? The command that I used was: Note: I wrote this command for a pipeline a few years ago now, so I hope the format is still correct! I can send you one of my example BAM files. |
Ah damn, unfortunately there isn't a good way to clean the base environment. The only reliable way is to reinstall miniconda. Anything that is in your base environment usually gets copied to all your subsequent environment, so its pretty important not to install anything there Command looks good, if you can send me the file I can try on my end. Adam |
Hi @Acribbs, I just reinstalled miniconda, but python gets installed as a dependency. This is what I ran:
And these are the packages installed:
|
Hi, I am able to reproduce this with
Full steps (after ensuring that my shell does not have
This installs
I get I hope it helps! Best regards, |
Hi Sebastian, Thanks for this, you beat me to it. I also found that the latest pysam build led to issues with bam2stats. Now working out fi this is a cgat-apps issue or a pysam issue. |
Thanks both! |
Moreover it appears that nothing in cgat-apps actually uses from pysam.libcalignmentfile cimport * which (if built against pysam 0.16.0.1 or earlier) is presumably what is causing the need for (an outdated version of) |
Many thanks for your comment @jmarshall. I will make changes and go through the modifications made to pysam and hopefully catch other errors that may occur within our code. Thanks again! |
Note that after PR #110 there are still several instances of
|
Hi @jmarshall, thanks and indeed I am aware but don't have time to change all the cimports yet so just wanted to fix this issue and fix the others at the weekend. |
Hi,
I installed cgat-apps in a fresh Conda environment as follows:
I did not use mamba as this gave me an error (mamba installs python 3.9.7 by default):
When trying to run
bam2stats
, I get the following error:Do I require a different version of pysam?
conda list
:The text was updated successfully, but these errors were encountered: