Thank you for your advice! I will try again with 0.8.4. BTW, newist deeptools is working good on ubuntu 16.04?
Hello, I'm setting up my PC to install pysam and deeptools.
- Ubuntu 16.04LTS
- pip install deeptools
- #python
- >>>import pysam
- >>>print pysam.__version__
- 0.9.1.4
- >>>cn = pysam.view("-F4","-c",'./testbam.bam');
- Segmentation fault ( core dumped )
this is an error. So I tried other way to install pysam.
- pip uninstall pysam
- apt-get install python-pysam
- #python
- >>>import pysam
- >>> print pysam.__version__
- 0.7.7
- >>>cn = pysam.view("-F4","-c",'./testbam.bam');
- >>>
I thought I solved but other error appear in deeptools
- #computeGCBias --numberOfProcessors 16 --fragmentLength 160 --bamfile IonXpress_001_rawlib.bam --effectiveGenomeSize 2451960000 --genome /hprnd0001/hg19fa/hg19fa/hg19.2bit --GCbiasFrequenciesFile frequencies.txt --plotFileFormat png --biasPlot plot --regionSize 200
- AttributeError: 'pysam.csamtools.AlignedRead' object has no attribute 'get_tags'
So I back to install pysam again.
- #pip install --upgrade pysam
then pysam version back to 0.9.1.4. And I did excute again "computeGCBias" command. and it is done well.
But first problem appeared again.(pysam's execution return "Segmentation Fault ( core dumped )"
my python version is 2.7.11. How can I solve this? Or is there a way to install pysam and deeptools well?
Please help me...
2 answers
deepTools requires pysam >= 0.8.2, which is why 0.7.7 is throwing an error. I have no clue why pysam is segfaulting, the easiest fix is to just use conda instead (you can conda install -c bioconda deeptools).
If for some reason you absolutely need to install with pip, then you can try an older version of pysam (e.g., pip install pysam==0.8.4).
0.8.4 is working good. 0.7.7 is also working good. but 0.9.1.4 is not working. Please give me any idea..
did you check for the required version of the samtools or htseq library? Most tools use samtools instead of rolling their on BAM support.
pysam is using a bundled copy of htslib. Many people have had issues getting the various 0.9 releases of pysam installed, because of underlying changes in how htslib is itself compiled. I fully expect that the segfault is related to that.
For whatever reason pysam-0.9.1.4 isn't getting installed/compiled correctly on your system. Just don't use that version of pysam then.
All versions of deepTools will work on any even remotely recent version of Linux.
Thank you so much. I will check required version of the samtools and htseq lib. And I'm gonna use pysam-0.8.4 instead of 0.9.1.4. Thank you so much again!
Log in to answer this question.
is not a descriptive title, fixed.