diff --git a/Cargo.lock b/Cargo.lock index 869c70c..2fcf109 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2687,7 +2687,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plascad" -version = "0.7.3" +version = "0.7.4" dependencies = [ "bincode", "bio", diff --git a/Cargo.toml b/Cargo.toml index 42953bc..48e5c4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plascad" -version = "0.7.3" +version = "0.7.4" edition = "2021" authors = ["David O'Connor "] #description = "Tools for plasmid and primer design, PCR, and related." diff --git a/src/gui/autocloning.rs b/src/gui/autocloning.rs index e2b570c..15fd1dd 100644 --- a/src/gui/autocloning.rs +++ b/src/gui/autocloning.rs @@ -104,7 +104,7 @@ fn backbone_filters(filters: &mut BackboneFilters, ui: &mut Ui) { } pub fn autocloning_page(state: &mut State, ui: &mut Ui) { - ui.heading("Assisted cloning"); + ui.heading("Assisted cloning (Work in progress)"); ui.label("For a given insert, automatically select a backbone, and either restriction enzymes, or PCR primers to use\ to clone the insert into the backbone."); diff --git a/src/main.rs b/src/main.rs index c325c85..2c3796c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -503,7 +503,7 @@ impl Default for State { restriction_enzyme_lib: Default::default(), backbone_lib: Default::default(), reading_frame: Default::default(), - volatile: Default::default(), + volatile: vec![Default::default()], search_seq: Default::default(), backbone_selected: Default::default(), cloning_res_matched: Default::default(), @@ -637,6 +637,10 @@ impl State { /// Identify restriction enzyme sites in the sequence. pub fn sync_re_sites(&mut self) { + if self.active >= self.volatile.len() { + eprintln!("Error: Volatile len too short for RE sync."); + return; + } self.volatile[self.active].restriction_enzyme_matches = Vec::new(); self.volatile[self.active]