Midpoint Profiles
cfdna midpoints writes <prefix>.midpoint_profiles.zarr. Load midpoint profile Zarr stores and extract count arrays or data frames by group, fragment length bin, and midpoint position.
This is loader API documentation, not command-line help. See cfdna midpoints for command flags and output generation.
Quick Use
- Python
- R
import cfdnalab as cfl
profiles = cfl.read_midpoints("sample.midpoint_profiles.zarr")
groups = profiles.group_metadata()
length_bins = profiles.length_bins()
positions = profiles.positions()
profile = profiles.data_frame(groups="LYL1", with_lengths=167)
library(cfdnalab)
profiles <- read_midpoints("sample.midpoint_profiles.zarr")
groups <- group_metadata(profiles)
length_bins <- length_bins(profiles)
positions <- positions(profiles)
profile <- midpoint_data_frame(
profiles,
groups = "LYL1",
with_lengths = 167
)
Notes
- Select groups or length bins before expanding to a data frame when the store is large.
- Python indices are zero-based. R indices are one-based.
Function Index
- Python
- R
| Symbol | Type | Summary |
|---|---|---|
read_midpoints | function | Open a cfDNAlab midpoint profile Zarr store. |
MidpointProfiles | class | Helper for loading and slicing midpoint profile Zarr output. |
Full details: Python API.
| Topic | Summary |
|---|---|
read_midpoints | Loads a <prefix>.midpoint_profiles.zarr store created with the cfdna midpoints CLI tool from the main cfDNAlab rust package. |
group_metadata | Return group metadata. |
length_bins | Return length-bin metadata. |
positions | Return midpoint position-bin metadata. |
group_idx | Look up a group index. |
length_bin_idx | Look up the length-bin index containing a fragment length. |
profile_array | Return one midpoint profile as an array vector. |
midpoint_data_frame | Return midpoint profiles as a data frame. |
midpoint_array | Return the full midpoint count array. |
schema_version | Return the cfDNAlab schema version. |
Full details: R API.