[Errno 13] could not open alignment file
1
0
Entering edit mode
4.4 years ago
cdc421 ▴ 10

Hello everyone,

I trying to load the Bam file, but it seems doesn't allow me to read it from there (working with Ubuntu). I'm working on Windows 10 and now using pysamstats. I had a difficult time. Would you please tell me the reason?

Here the code:

(base) cdc421@DESKTOP-6PSGIA8:~$ pysamstats --type coverage W2.bam > output
[E::hts_open_format] Failed to open file W2.bam
Traceback (most recent call last):
  File "/home/cdc421/anaconda3/bin/pysamstats", line 253, in <module>
    **kwargs
  File "/home/cdc421/anaconda3/lib/python3.7/site-packages/pysamstats/io.py", line 49, in write_csv
    recs = stats_function(alignmentfile, **kwargs)
  File "/home/cdc421/anaconda3/lib/python3.7/site-packages/pysamstats/pileup.py", line 94, in stat_pileup
    no_del=no_del, no_dup=no_dup)
  File "pysamstats/opt.pyx", line 1835, in pysamstats.opt.iter_pileup
  File "pysam/libcalignmentfile.pyx", line 741, in pysam.libcalignmentfile.AlignmentFile.__cinit__
  File "pysam/libcalignmentfile.pyx", line 940, in pysam.libcalignmentfile.AlignmentFile._open
PermissionError: [Errno 13] could not open alignment file `W2.bam`: Permission denied
software error python • 975 views
ADD COMMENT
0
Entering edit mode
4.4 years ago
Jianyu ▴ 580

The error has clearly shown you don't have the permission to this file, check the owner of W2.bam

ADD COMMENT

Login before adding your answer.

Traffic: 1990 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6