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:
[INIT] Successfully read in 194080 probes from rpkm/probes.txt
[RUNNING] Counting total number of reads in bam file...
[RUNNING] Found 751008 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'
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:
lab@VBdna:~/galaxy-Win-Lin/David/conifer/conifer_v0.2.2$ sudo python conifer.py rpkm --probes rpkm/probes.txt --input rpkm/sample1667.sorted.bam.bai --output rpkm/1998.rpkm.txt
[INIT] Successfully read in 194080 probes from rpkm/probes.txt
[RUNNING] Counting total number of reads in bam file...
[E::hts_hopen] fail to open file 'rpkm/sample1667.sorted.bam.bai'
[E::hts_open] fail to open file 'rpkm/sample1667.sorted.bam.bai'
Traceback (most recent call last):
File "conifer.py", line 682, in <module>
args.func(args)
File "conifer.py", line 559, in CF_bam2RPKM
total_reads = float(pysam.view("-c", args.input[0])[0].strip("\n"))
File "/usr/local/lib/python2.7/dist-packages/pysam/__init__.py", line 79, in __call__
(retval, "\n".join(stderr)))
pysam.SamtoolsError: 'csamtools returned with error 1: '
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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'
I'm using Ubuntu 14.04 LTS.
Hope help comes soon!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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'
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()