You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depends on pysam.AlignmentFile which allows a file-like object for the reference but not the index.
importpysam# internal support for remote files http://www.htslib.org/doc/samtools.html#DESCRIPTION# We could use this, but would need to cache instances (like tiles/clodius) to avoid# re-initializing for each call to `tiles()`pysam.AlignmentFile('http://localhost:8080/data.bam##idx##s3://path/to/data.bai')
withopen('./data.bam') asf:
pysam.AlignmentFile(f) # workswithopen('./data.bam') asf, open('./data.bai') asidx:
pysam.AlignmentFile(f, index_filename=idx) # error, can't pass file-like object for index!withfsspec.open('http://localhost:8080/data.bam') asf:
pysam.AlignmentFile(f) # not recognized as a file-like object
Tracking whether file-like objects could be supported by the different tiles implementations.
🟩 = yes, 🟨 = unknown, 🟥 = no
🟨
bam.py
Depends on
pysam.AlignmentFile
which allows a file-like object for the reference but not the index.🟥
bed2ddb.py
Depends on
sqllite3.connect
which only accepts a string.🟥
bedarcsdb.py
Depends on
sqllite3.connect
which only accepts a string.🟥
beddb.py
Depends on
sqllite3.connect
which only accepts a string.🟩
bedfile.py
Currently a no-op.
🟨
bigbed.py
Depends on
tiles/bigwig.py
.🟨
bigwig.py
Depends on whether
pybbi
could accept file-like objects.🟩
chromsizes.py
Just reading a csv using builtin
open
.🟩
cooler.py
Depends on
h5py
which allows file-like objects🟩
density.py
Depends on
h5py
which allows file-like objects🟩/🟨
fasta.py
Depends on
pyfaidx.Fasta
supports only filenames. Some effort here that could be abstracted further.🟥
geo.py
Depends on
sqllite3.connect
which only accepts a string.🟩
hitile.py
Depends on
h5py
which allows file-like objects🟥
imtiles.py
Depends on
sqllite3.connect
which only accepts a string.🟩
mrmatrix.py
Depends on
h5py
which allows file-like objects🟩
multivec.py
Depends on
h5py
which allows file-like objects🟩
tabix.py
Uses builtin
open
andgzip.open
which can be replaced withf.open
andgzip.open(f)
if filehandles are provided.🟩
time_interval.py
Uses builtin
open
with can be replaced withfh.open
if file-like object is provided.The text was updated successfully, but these errors were encountered: