|
|
@@ -4,34 +4,33 @@ use std::{
|
|
|
};
|
|
|
|
|
|
use arrow::array::{
|
|
|
- ArrayRef, Float64Array, Int32Array, StringArray, TimestampMillisecondArray, UInt16Array,
|
|
|
+ ArrayRef, Int16Array, StringArray, TimestampMillisecondArray, UInt16Array,
|
|
|
};
|
|
|
-use arrow::array::{Int16Array, UInt32Array};
|
|
|
use arrow::{array::RecordBatch, ipc::reader::FileReader};
|
|
|
use chrono::TimeZone;
|
|
|
use chrono::{DateTime, Utc};
|
|
|
use podders::{root_as_footer, ContentType};
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
-struct Pod5Info {
|
|
|
- acquisition_id: String,
|
|
|
- acquisition_start_time: DateTime<Utc>,
|
|
|
- adc_max: i16,
|
|
|
- adc_min: i16,
|
|
|
- experiment_name: String,
|
|
|
- flow_cell_id: String,
|
|
|
- flow_cell_product_code: String,
|
|
|
- protocol_name: String,
|
|
|
- protocol_run_id: String,
|
|
|
- protocol_start_time: DateTime<Utc>,
|
|
|
- sample_id: String,
|
|
|
- sample_rate: u16,
|
|
|
- sequencing_kit: String,
|
|
|
- sequencer_position: String,
|
|
|
- sequencer_position_type: String,
|
|
|
- software: String,
|
|
|
- system_name: String,
|
|
|
- system_type: String,
|
|
|
+pub struct Pod5Info {
|
|
|
+ pub acquisition_id: String,
|
|
|
+ pub acquisition_start_time: DateTime<Utc>,
|
|
|
+ pub adc_max: i16,
|
|
|
+ pub adc_min: i16,
|
|
|
+ pub experiment_name: String,
|
|
|
+ pub flow_cell_id: String,
|
|
|
+ pub flow_cell_product_code: String,
|
|
|
+ pub protocol_name: String,
|
|
|
+ pub protocol_run_id: String,
|
|
|
+ pub protocol_start_time: DateTime<Utc>,
|
|
|
+ pub sample_id: String,
|
|
|
+ pub sample_rate: u16,
|
|
|
+ pub sequencing_kit: String,
|
|
|
+ pub sequencer_position: String,
|
|
|
+ pub sequencer_position_type: String,
|
|
|
+ pub software: String,
|
|
|
+ pub system_name: String,
|
|
|
+ pub system_type: String,
|
|
|
}
|
|
|
|
|
|
impl Pod5Info {
|
|
|
@@ -76,25 +75,25 @@ impl Pod5Info {
|
|
|
let mut system_type = String::new();
|
|
|
|
|
|
// Update variables with actual values
|
|
|
- acquisition_id = "acquisition_123".to_string();
|
|
|
- acquisition_start_time = Utc::now();
|
|
|
- adc_max = 32767;
|
|
|
- adc_min = -32768;
|
|
|
- experiment_name = "Experiment XYZ".to_string();
|
|
|
- flow_cell_id = "FC123456".to_string();
|
|
|
- flow_cell_product_code = "FCPROD123".to_string();
|
|
|
- protocol_name = "Protocol ABC".to_string();
|
|
|
- protocol_run_id = "protocol_run_456".to_string();
|
|
|
- protocol_start_time = Utc::now();
|
|
|
- sample_id = "sample_789".to_string();
|
|
|
- sample_rate = 44100;
|
|
|
- sequencing_kit = "SEQKIT123".to_string();
|
|
|
- sequencer_position = "Position A1".to_string();
|
|
|
- sequencer_position_type = "Type B".to_string();
|
|
|
- software = "Software v1.0".to_string();
|
|
|
- system_name = "System Name".to_string();
|
|
|
- system_type = "System Type".to_string();
|
|
|
-
|
|
|
+ // acquisition_id = "acquisition_123".to_string();
|
|
|
+ // acquisition_start_time = Utc::now();
|
|
|
+ // adc_max = 32767;
|
|
|
+ // adc_min = -32768;
|
|
|
+ // experiment_name = "Experiment XYZ".to_string();
|
|
|
+ // flow_cell_id = "FC123456".to_string();
|
|
|
+ // flow_cell_product_code = "FCPROD123".to_string();
|
|
|
+ // protocol_name = "Protocol ABC".to_string();
|
|
|
+ // protocol_run_id = "protocol_run_456".to_string();
|
|
|
+ // protocol_start_time = Utc::now();
|
|
|
+ // sample_id = "sample_789".to_string();
|
|
|
+ // sample_rate = 44100;
|
|
|
+ // sequencing_kit = "SEQKIT123".to_string();
|
|
|
+ // sequencer_position = "Position A1".to_string();
|
|
|
+ // sequencer_position_type = "Type B".to_string();
|
|
|
+ // software = "Software v1.0".to_string();
|
|
|
+ // system_name = "System Name".to_string();
|
|
|
+ // system_type = "System Type".to_string();
|
|
|
+ //
|
|
|
if let Some(contents) = footer.contents() {
|
|
|
for content in contents.iter() {
|
|
|
match content.content_type() {
|