Skip to content

Commit

Permalink
feat: add sdf read options (#161)
Browse files Browse the repository at this point in the history
* feat: support domtab
* feat: add sdf read options
* fix: fix for tests to run
  • Loading branch information
tshauck authored Jul 16, 2024
1 parent 6fa6f30 commit dc24e42
Show file tree
Hide file tree
Showing 14 changed files with 539 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ crate-type = ["cdylib"]
name = "biobear"

[dependencies]
arrow = { version = "52.0.0", features = ["pyarrow"] }
datafusion = "39"
exon = { version = "0.26", features = ["default"] }
arrow = { version = "52.1.0", features = ["pyarrow"] }
datafusion = "40"
exon = { version = "0.29", features = ["default"] }
pyo3 = "0.21.2"
tokio = { version = "1", features = ["rt"] }
noodles = { version = "0.77", features = ["core"] }
noodles = { version = "0.78", features = ["core"] }

[profile.release]
codegen-units = 1
Expand Down
2 changes: 2 additions & 0 deletions python/biobear/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from .biobear import GenBankReadOptions
from .biobear import FCSReadOptions
from .biobear import CRAMReadOptions
from .biobear import SDFReadOptions
from .biobear import connect
from .biobear import new_session
from .biobear import __runtime
Expand Down Expand Up @@ -72,6 +73,7 @@
"BCFReadOptions",
"VCFReadOptions",
"BEDReadOptions",
"SDFReadOptions",
"FCSReadOptions",
"CRAMReadOptions",
"BigWigReadOptions",
Expand Down
16 changes: 15 additions & 1 deletion python/biobear/biobear.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class VCFReadOptions:
file_compression_type: Optional[FileCompressionType] = None,
parse_info: bool = False,
parse_formats: bool = False,
partition_cols: list[str | None] = None,
partition_cols: list[str] | None = None,
) -> None: ...

class BCFReadOptions:
Expand All @@ -141,6 +141,16 @@ class BAMReadOptions:
region: Optional[str] = None,
) -> None: ...

class SDFReadOptions:
"""Options for reading SDF data."""
def __init__(
self,
/,
file_compression_type: Optional[FileCompressionType] = None,
file_extension: Optional[str] = None,
partition_cols: list[str] | None = None,
) -> None: ...

class BEDReadOptions:
"""Options for reading BED data."""
def __init__(
Expand Down Expand Up @@ -187,6 +197,10 @@ class BioBearSessionContext:
self, file_path: str, /, options: Optional[FASTQReadOptions] = None
) -> ExecutionResult:
"""Reads one or more FASTQ files and returns an ExecutionResult."""
def read_sdf_file(
self, file_path: str, /, options: Optional[SDFReadOptions] = None
) -> ExecutionResult:
"""Reads one or more SDF files and returns an ExecutionResult."""
def read_fasta_file(
self, file_path: str, /, options: Optional[FASTAReadOptions] = None
) -> ExecutionResult:
Expand Down
Loading

0 comments on commit dc24e42

Please sign in to comment.