|
|
@@ -443,6 +443,13 @@ impl Dorado {
|
|
|
}
|
|
|
|
|
|
pub fn from_flowcell(flowcell: &FlowCell, config: &Config) -> anyhow::Result<()> {
|
|
|
+ let tp_conv = |time_point: &str| -> String {
|
|
|
+ match time_point {
|
|
|
+ "normal" => config.normal_name.clone(),
|
|
|
+ "tumoral" => config.tumoral_name.clone(),
|
|
|
+ _ => panic!("Error time point name")
|
|
|
+ }
|
|
|
+ };
|
|
|
use crate::collection::flowcells::FlowCellLocation::*;
|
|
|
let base_pod_dir = match &flowcell.location {
|
|
|
Local(_) => None,
|
|
|
@@ -474,7 +481,7 @@ impl Dorado {
|
|
|
.iter()
|
|
|
.map(|c| FlowCellCase {
|
|
|
id: c.case_id.clone(),
|
|
|
- time_point: c.sample_type.clone(),
|
|
|
+ time_point: tp_conv(&c.sample_type),
|
|
|
barcode: c.barcode.clone(),
|
|
|
pod_dir: pod_dir.clone().into(),
|
|
|
})
|
|
|
@@ -496,7 +503,7 @@ impl Dorado {
|
|
|
let mut d = Dorado::init(
|
|
|
FlowCellCase {
|
|
|
id: c.case_id.clone(),
|
|
|
- time_point: c.sample_type.clone(),
|
|
|
+ time_point: tp_conv(&c.sample_type),
|
|
|
barcode: c.barcode.clone(),
|
|
|
pod_dir: pod_dir.into(),
|
|
|
},
|