Question: Pysam usage problem
0
gravatar for Rongbin
2.3 years ago by
Rongbin0
Rongbin0 wrote:

Hi BioStars,

I am using pysam to count read from bam file. I use pysam.AlignmentFile to read bam file and pysam.AlignmentFile.count to do read count, but it requires bai file which is an index should in the same path where bam file is. However I have no writing permission in bam file path. Is it possible to input index bai file from other path, I mean save bam file and its bai file in different path? Thanks very much if some guys can help this!

software error • 859 views
ADD COMMENTlink written 2.3 years ago by Rongbin0
0
gravatar for WouterDeCoster
2.3 years ago by
Belgium
WouterDeCoster38k wrote:

Easiest is probably to create a symbolic link to the bam (ln - s) in a directory where you can write, or /tmp/, and write the index there. You can probably fix this using the os module

ADD COMMENTlink written 2.3 years ago by WouterDeCoster38k
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: 1356 users visited in the last hour