AttributeError: 'pysam.csamfile.Samfile' object has no attribute '_hasIndex'
Homepage for CoNIFER (Copy Number Inference From Exome Reads)
Status: Beta
Brought to you by:
nkrumm99
Hello,
you made very good tool, I am new user of CoNIFER and I try to run conifer.py rpkm. When I try call this:
python conifer.py rpkm --probes rpkm/probes.txt --input rpkm/sample1667.sorted.bam --output rpkm/1998.rpkm.txt
I will get this error:
I also tried other way, with calling bai file as was mentioned in pysam.SamtoolsError: 'csamtools returned with error 1: ' thread, but then I have this error:
In my folder I have three files - sample1667.sorted.bam, sample1667.sorted.bam.bai, sample1667.sorted.bam.tdf
What should I do to get .hdf5 file properly?
Thank you
Sincerely
David S.
Last edit: David Stanek 2015-11-25
Hello David, I'm having the exact same problem, did you solved?.
the same error was posted here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805687
and claim to be solved with an update of "pbcore" but trying to install this i get another error:
"error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1"
this error is disccussed here:
http://stackoverflow.com/questions/26053982/error-setup-script-exited-with-error-command-x86-64-linux-gnu-gcc-failed-wit
but none of the solutions proposed there, works for me.
Thanks!
and best regards
I'm having the same problem too. Still no fix?
python conifer.py rpkm \
--probes probes.txt \
--input Bam_Files/1249TLY0003.bam \
--output rpkm_files/1249TLY0003.rpkm.txt
[INIT] Successfully read in 194080 probes from probes.txt
[RUNNING] Counting total number of reads in bam file...
[RUNNING] Found 209170362 reads
Traceback (most recent call last):
File "conifer.py", line 682, in <module>
args.func(args)
File "conifer.py", line 564, in CF_bam2RPKM
if not f._hasIndex():
AttributeError: 'pysam.csamfile.Samfile' object has no attribute '_hasIndex'</module>
I'm using Ubuntu 14.04 LTS.
Hope help comes soon!
It's a very simple fix. Just change line 564 of conifer.py from:
to
Then it should work.
Hi all,
I ran into the same issue and simonzee's suggestion didn't work for me. I did, however, come across this discussion of another program with the same Pysam error: https://github.com/hammerlab/varlens/issues/1
Their suggestion of downgrading Pysam to version 0.8.3 solved this problem for me.
Cheers,
Tim
this code is as old as greek's piramides.
now it should be
f.check_index()