Tracking whether file-like objects could be supported by the different tiles implementations.
🟩 = yes, 🟨 = unknown, 🟥 = no
Depends on pysam.AlignmentFile which allows a file-like object for the reference but not the index.
import pysam
# 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')
with open('./data.bam') as f:
pysam.AlignmentFile(f) # works
with open('./data.bam') as f, open('./data.bai') as idx:
pysam.AlignmentFile(f, index_filename=idx) # error, can't pass file-like object for index!
with fsspec.open('http://localhost:8080/data.bam') as f:
pysam.AlignmentFile(f) # not recognized as a file-like object
Depends on sqllite3.connect which only accepts a string.
Depends on sqllite3.connect which only accepts a string.
Depends on sqllite3.connect which only accepts a string.
Currently a no-op.
Depends on tiles/bigwig.py.
Depends on whether pybbi could accept file-like objects.
Just reading a csv using builtin open.
Depends on h5py which allows file-like objects
Depends on h5py which allows file-like objects
Depends on pyfaidx.Fasta supports only filenames. Some effort here that could be abstracted further.
Depends on sqllite3.connect which only accepts a string.
Depends on h5py which allows file-like objects
Depends on sqllite3.connect which only accepts a string.
Depends on h5py which allows file-like objects
Depends on h5py which allows file-like objects
Uses builtin open and gzip.open which can be replaced with f.open and gzip.open(f) if filehandles are provided.
Uses builtin open with can be replaced with fh.open if file-like object is provided.
Tracking whether file-like objects could be supported by the different tiles implementations.
🟩 = yes, 🟨 = unknown, 🟥 = no
🟨
bam.pyDepends on
pysam.AlignmentFilewhich allows a file-like object for the reference but not the index.🟥
bed2ddb.pyDepends on
sqllite3.connectwhich only accepts a string.🟥
bedarcsdb.pyDepends on
sqllite3.connectwhich only accepts a string.🟥
beddb.pyDepends on
sqllite3.connectwhich only accepts a string.🟩
bedfile.pyCurrently a no-op.
🟨
bigbed.pyDepends on
tiles/bigwig.py.🟨
bigwig.pyDepends on whether
pybbicould accept file-like objects.🟩
chromsizes.pyJust reading a csv using builtin
open.🟩
cooler.pyDepends on
h5pywhich allows file-like objects🟩
density.pyDepends on
h5pywhich allows file-like objects🟩/🟨
fasta.pyDepends on
pyfaidx.Fastasupports only filenames. Some effort here that could be abstracted further.🟥
geo.pyDepends on
sqllite3.connectwhich only accepts a string.🟩
hitile.pyDepends on
h5pywhich allows file-like objects🟥
imtiles.pyDepends on
sqllite3.connectwhich only accepts a string.🟩
mrmatrix.pyDepends on
h5pywhich allows file-like objects🟩
multivec.pyDepends on
h5pywhich allows file-like objects🟩
tabix.pyUses builtin
openandgzip.openwhich can be replaced withf.openandgzip.open(f)if filehandles are provided.🟩
time_interval.pyUses builtin
openwith can be replaced withfh.openif file-like object is provided.