Question: Problems with Pysam and deeptools [Help me, please..]
0
gravatar for mink2mink2
2.8 years ago by
mink2mink20
mink2mink20 wrote:

Hello, I'm setting up my PC to install pysam and deeptools.

  1. Ubuntu 16.04LTS
  2. pip install deeptools
  3. #python
  4. >>>import pysam
  5. >>>print pysam.__version__
  6. 0.9.1.4
  7. >>>cn = pysam.view("-F4","-c",'./testbam.bam');
  8. Segmentation fault ( core dumped )

this is an error. So I tried other way to install pysam.

  1. pip uninstall pysam
  2. apt-get install python-pysam
  3. #python
  4. >>>import pysam
  5. >>> print pysam.__version__
  6. 0.7.7
  7. >>>cn = pysam.view("-F4","-c",'./testbam.bam');
  8. >>>

I thought I solved but other error appear in deeptools

  1. #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
  2. AttributeError: 'pysam.csamtools.AlignedRead' object has no attribute 'get_tags'

So I back to install pysam again.

  1. #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...

pysam deeptools • 1.8k views
ADD COMMENTlink modified 2.7 years ago • written 2.8 years ago by mink2mink20
1

Help me please

is not a descriptive title, fixed.

ADD REPLYlink written 2.8 years ago by Michael Dondrup46k
1
gravatar for Devon Ryan
2.8 years ago by
Devon Ryan89k
Freiburg, Germany
Devon Ryan89k wrote:

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).

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by Devon Ryan89k

Thank you for your advice! I will try again with 0.8.4. BTW, newist deeptools is working good on ubuntu 16.04?

ADD REPLYlink written 2.8 years ago by mink2mink20
1

All versions of deepTools will work on any even remotely recent version of Linux.

ADD REPLYlink written 2.8 years ago by Devon Ryan89k

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..

ADD REPLYlink written 2.8 years ago by mink2mink20

did you check for the required version of the samtools or htseq library? Most tools use samtools instead of rolling their on BAM support.

ADD REPLYlink written 2.8 years ago by Michael Dondrup46k

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.

ADD REPLYlink written 2.8 years ago by Devon Ryan89k

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.

ADD REPLYlink written 2.8 years ago by Devon Ryan89k
0
gravatar for mink2mink2
2.7 years ago by
mink2mink20
mink2mink20 wrote:

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!

ADD COMMENTlink written 2.7 years ago by mink2mink20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1852 users visited in the last hour