Răsfoiți Sursa

from_flowcell

Thomas 6 luni în urmă
părinte
comite
623c1f0264
1 a modificat fișierele cu 7 adăugiri și 9 ștergeri
  1. 7 9
      src/commands/dorado.rs

+ 7 - 9
src/commands/dorado.rs

@@ -10,11 +10,7 @@ use log::{debug, info, warn};
 use uuid::Uuid;
 
 use crate::{
-    collection::{
-        bam::bam_compo,
-        flowcells::{FlowCell, IdInput},
-        pod5::FlowCellCase,
-    },
+    collection::{bam::bam_compo, flowcells::FlowCell, pod5::FlowCellCase},
     config::Config,
     helpers::find_unique_file,
     io::pod5_infos::Pod5Info,
@@ -447,9 +443,10 @@ impl Dorado {
     }
 
     pub fn from_flowcell(flowcell: &FlowCell, config: &Config) -> anyhow::Result<()> {
+        use crate::collection::flowcells::FlowCellLocation::*;
         let base_pod_dir = match &flowcell.location {
-            crate::collection::flowcells::FlowCellLocation::Local(pod_dir) => None,
-            crate::collection::flowcells::FlowCellLocation::Archived(pod_tar) => {
+            Local(_) => None,
+            Archived(pod_tar) => {
                 let file = File::open(pod_tar)
                     .map_err(|e| anyhow::anyhow!("Failed to open tar file: {pod_tar}\n\t{e}"))?;
                 let mut archive = tar::Archive::new(file);
@@ -463,8 +460,9 @@ impl Dorado {
             }
         };
 
+        use crate::collection::flowcells::FlowCellExperiment::*;
         match &flowcell.experiment {
-            crate::collection::flowcells::FlowCellExperiment::WGSPod5Mux(pod_dir) => {
+            WGSPod5Mux(pod_dir) => {
                 let pod_dir = if let Some(base_pod_dir) = base_pod_dir {
                     format!("{base_pod_dir}/{pod_dir}")
                 } else {
@@ -485,7 +483,7 @@ impl Dorado {
 
                 Dorado::from_mux(cases, config.clone())?;
             }
-            crate::collection::flowcells::FlowCellExperiment::WGSPod5Demux(pod_dir) => {
+            WGSPod5Demux(pod_dir) => {
                 let pod_dir = if let Some(base_pod_dir) = base_pod_dir {
                     format!("{base_pod_dir}/{pod_dir}")
                 } else {