-
Notifications
You must be signed in to change notification settings - Fork 22
Description
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.
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π₯ 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 and gzip.open which can be replaced with f.open and gzip.open(f) if filehandles are provided.
π© time_interval.py
Uses builtin open with can be replaced with fh.open if file-like object is provided.