POD5 API Types Reference
Container class for a pod5 Read object
BaseRead
dataclass
BaseRead(
read_id: UUID,
pore: Pore,
calibration: Calibration,
read_number: int,
start_sample: int,
median_before: float,
end_reason: EndReason,
run_info: RunInfo,
num_minknow_events: int = 0,
tracked_scaling: ShiftScalePair = ShiftScalePair(),
predicted_scaling: ShiftScalePair = ShiftScalePair(),
num_reads_since_mux_change: int = 0,
time_since_mux_change: float = 0.0,
open_pore_level: float = float("nan"),
)
Base class for POD5 Read Data
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
read_id
|
UUID
|
The read_id of this read as UUID. |
required |
pore
|
Pore
|
Pore data. |
required |
calibration
|
Calibration
|
Calibration data. |
required |
read_number
|
int
|
The read number on channel. This is increasing but typically not necessarily consecutive. |
required |
start_sample
|
int
|
The number samples recorded on this channel before the read started. |
required |
median_before
|
float
|
The level of current in the well before this read. |
required |
end_reason
|
EndReason
|
EndReason data. |
required |
run_info
|
RunInfo
|
RunInfo data. |
required |
num_minknow_events
|
int
|
Number of minknow events that the read contains |
0
|
tracked_scaling
|
ShiftScalePair
|
Shift and Scale for tracked read scaling values (based on previous reads shift) |
ShiftScalePair()
|
predicted_scaling
|
ShiftScalePair
|
Shift and Scale for predicted read scaling values (based on this read's raw signal) |
ShiftScalePair()
|
num_reads_since_mux_change
|
int
|
Number of selected reads since the last mux change on this reads channel |
0
|
time_since_mux_change
|
float
|
Time in seconds since the last mux change on this reads channel |
0.0
|
open_pore_level
|
float
|
The tracked open pore level for the read. |
float('nan')
|
Calibration
dataclass
Parameters to convert the signal data to picoamps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset
|
float
|
Calibration offset used to convert raw ADC data into pA readings. |
required |
scale
|
float
|
Calibration scale factor used to convert raw ADC data into pA readings. |
required |
from_range
classmethod
from_range(offset: float, adc_range: float, digitisation: float) -> Calibration
Create a Calibration instance from offset, adc_range and digitisation
CompressedRead
dataclass
CompressedRead(
read_id: UUID,
pore: Pore,
calibration: Calibration,
read_number: int,
start_sample: int,
median_before: float,
end_reason: EndReason,
run_info: RunInfo,
num_minknow_events: int = 0,
tracked_scaling: ShiftScalePair = ShiftScalePair(),
predicted_scaling: ShiftScalePair = ShiftScalePair(),
num_reads_since_mux_change: int = 0,
time_since_mux_change: float = 0.0,
open_pore_level: float = float("nan"),
signal_chunks: List[NDArray[uint8]] = list(),
signal_chunk_lengths: List[int] = list(),
)
Bases: BaseRead
POD5 Read Data with a compressed signal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
read_id
|
UUID
|
The read_id of this read as UUID. |
required |
pore
|
Pore
|
Pore data. |
required |
calibration
|
Calibration
|
Calibration data. |
required |
read_number
|
int
|
The read number on channel. This is increasing but typically not necessarily consecutive. |
required |
start_sample
|
int
|
The number samples recorded on this channel before the read started. |
required |
median_before
|
float
|
The level of current in the well before this read. |
required |
end_reason
|
EndReason
|
EndReason data. |
required |
run_info
|
RunInfo
|
RunInfo data. |
required |
signal_chunks
|
List[array[uint8]]
|
Compressed signal data in chunks. |
list()
|
signal_chunk_lengths
|
List[int]
|
Chunk lengths (number of samples) of signal data before compression. |
list()
|
decompressed_signal
property
Decompress and return the chunked signal data as a contiguous numpy array.
Returns:
| Name | Type | Description |
|---|---|---|
decompressed_signal |
array[int16]
|
Decompressed signal data |
EndReason
dataclass
EndReason(reason: EndReasonEnum, forced: bool)
Data on why the Read ended.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reason
|
EndReasonEnum
|
The end reason enumeration. |
required |
forced
|
bool
|
True if it is a 'forced' read break. |
required |
from_reason_with_default_forced
classmethod
from_reason_with_default_forced(reason: EndReasonEnum) -> EndReason
Return a new EndReason instance with the 'forced' flag set to the expected default for the given reason
EndReasonEnum
Bases: Enum
EndReason Enumeration
Pore
dataclass
Data for the pore that the Read was acquired on
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel
|
int
|
1-indexed channel. |
required |
well
|
int
|
1-indexed well. |
required |
pore_type
|
str
|
The pore type present in the well. |
required |
Read
dataclass
Read(
read_id: UUID,
pore: Pore,
calibration: Calibration,
read_number: int,
start_sample: int,
median_before: float,
end_reason: EndReason,
run_info: RunInfo,
num_minknow_events: int = 0,
tracked_scaling: ShiftScalePair = ShiftScalePair(),
predicted_scaling: ShiftScalePair = ShiftScalePair(),
num_reads_since_mux_change: int = 0,
time_since_mux_change: float = 0.0,
open_pore_level: float = float("nan"),
signal: NDArray[int16] = (lambda: array([], dtype=int16))(),
)
Bases: BaseRead
POD5 Read Data with an uncompressed signal
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
read_id
|
UUID
|
The read_id of this read as UUID. |
required |
pore
|
Pore
|
Pore data. |
required |
calibration
|
Calibration
|
Calibration data. |
required |
read_number
|
int
|
The read number on channel. This is increasing but typically not necessarily consecutive. |
required |
start_sample
|
int
|
The number samples recorded on this channel before the read started. |
required |
median_before
|
float
|
The level of current in the well before this read. |
required |
end_reason
|
EndReason
|
EndReason data. |
required |
run_info
|
RunInfo
|
RunInfo data. |
required |
signal
|
array[int16]
|
Uncompressed signal data. |
(lambda: array([], dtype=int16))()
|
RunInfo
dataclass
RunInfo(
acquisition_id: str,
acquisition_start_time: datetime,
adc_max: int,
adc_min: int,
context_tags: Dict[str, str],
experiment_name: str,
flow_cell_id: str,
flow_cell_product_code: str,
protocol_name: str,
protocol_run_id: str,
protocol_start_time: datetime,
sample_id: str,
sample_rate: int,
sequencing_kit: str,
sequencer_position: str,
sequencer_position_type: str,
software: str,
system_name: str,
system_type: str,
tracking_id: Dict[str, str],
)
Higher-level information about the Reads that correspond to a part of an experiment, protocol or acquisition
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
acquisition_id
|
str
|
A unique identifier for the acquisition. |
required |
acquisition_start_time
|
datetime
|
This is the clock time for sample 0 |
required |
adc_max
|
int
|
The maximum ADC value that might be encountered. |
required |
adc_min
|
int
|
The minimum ADC value that might be encountered. |
required |
context_tags
|
Dict[str, str]
|
The context tags for the run. (For compatibility with fast5). |
required |
experiment_name
|
str
|
The user-supplied name for the experiment being run. |
required |
flow_cell_id
|
str
|
Uniquely identifies the flow cell the data was captured on. |
required |
flow_cell_product_code
|
str
|
Identifies the type of flow cell the data was captured on. |
required |
protocol_name
|
str
|
The name of the protocol that was run. |
required |
protocol_run_id
|
str
|
The unique identifier for the protocol run that produced this data. |
required |
protocol_start_time
|
datetime
|
When the protocol that the acquisition was part of started. |
required |
sample_id
|
str
|
A user-supplied name for the sample being analysed. |
required |
sample_rate
|
int
|
The number of samples acquired each second on each channel. |
required |
sequencing_kit
|
str
|
The type of sequencing kit used to prepare the sample. |
required |
sequencer_position
|
str
|
The sequencer position the data was collected on. |
required |
sequencer_position_type
|
str
|
The type of sequencing hardware the data was collected on. |
required |
software
|
str
|
A description of the software that acquired the data. |
required |
system_name
|
str
|
The name of the system the data was collected on. |
required |
system_type
|
str
|
The type of system the data was collected on. |
required |
tracking_id
|
Dict[str, str]
|
The tracking id for the run. (For compatibility with fast5). |
required |