pub struct BlockGroup {
pub id: HashId,
pub collection_name: String,
pub sample_name: Option<String>,
pub name: String,
pub created_on: i64,
}Fields§
§id: HashId§collection_name: String§sample_name: Option<String>§name: String§created_on: i64Implementations§
Source§impl BlockGroup
impl BlockGroup
pub fn create( conn: &GraphConnection, collection_name: &str, sample_name: Option<&str>, name: &str, ) -> BlockGroup
pub fn delete( conn: &GraphConnection, collection_name: &str, sample_name: Option<&str>, name: &str, )
pub fn get_by_id(conn: &GraphConnection, id: &HashId) -> BlockGroup
pub fn duplicate(&self, conn: &GraphConnection, target_block_group_id: &HashId)
pub fn get_or_create_sample_block_group( conn: &GraphConnection, collection_name: &str, sample_name: &str, group_name: &str, parent_sample: Option<&str>, ) -> Result<HashId, QueryError>
pub fn get_id( collection_name: &str, sample_name: Option<&str>, group_name: &str, ) -> HashId
pub fn get_graph(conn: &GraphConnection, block_group_id: &HashId) -> GenGraph
pub fn prune_graph(graph: &mut GenGraph)
pub fn get_all_sequences( conn: &GraphConnection, block_group_id: &HashId, _prune: bool, ) -> HashSet<String>
pub fn add_accession( conn: &GraphConnection, path: &Path, name: &str, start: i64, end: i64, cache: &mut PathCache<'_>, ) -> Accession
pub fn insert_changes( conn: &GraphConnection, changes: &[PathChange], cache: &mut PathCache<'_>, modify_blockgroup: bool, ) -> Result<(), ChangeError>
pub fn insert_change( conn: &GraphConnection, change: &PathChange, tree: &IntervalTree<i64, NodeIntervalBlock>, ) -> Result<(), ChangeError>
pub fn intervaltree_for( conn: &GraphConnection, block_group_id: &HashId, remove_ambiguous_positions: bool, ) -> IntervalTree<i64, NodeIntervalBlock>
pub fn get_current_path(conn: &GraphConnection, block_group_id: &HashId) -> Path
pub fn get_path_by_name( conn: &GraphConnection, block_group_id: &HashId, path_name: &str, ) -> Option<Path>
pub fn derive_subgraph( conn: &GraphConnection, collection_name: &str, child_sample_name: &str, source_block_group_id: &HashId, start_block: &NodeIntervalBlock, end_block: &NodeIntervalBlock, start_node_coordinate: i64, end_node_coordinate: i64, target_block_group_id: &HashId, ) -> HashMap<HashId, HashId>
Trait Implementations§
Source§impl<'a> Capnp<'a> for BlockGroup
impl<'a> Capnp<'a> for BlockGroup
Source§impl Clone for BlockGroup
impl Clone for BlockGroup
Source§fn clone(&self) -> BlockGroup
fn clone(&self) -> BlockGroup
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockGroup
impl Debug for BlockGroup
Source§impl<'de> Deserialize<'de> for BlockGroup
impl<'de> Deserialize<'de> for BlockGroup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for BlockGroup
impl Hash for BlockGroup
Source§impl PartialEq for BlockGroup
impl PartialEq for BlockGroup
Source§impl Query for BlockGroup
impl Query for BlockGroup
const TABLE_NAME: &'static str = "block_groups"
type Model = BlockGroup
fn process_row(row: &Row<'_>) -> Self::Model
const PRIMARY_KEY: &'static str = "id"
fn query( conn: &Connection, query: &str, params: impl Params, ) -> Vec<Self::Model>
fn get( conn: &Connection, query: &str, params: impl Params, ) -> Result<Self::Model>
fn get_by_id<'a, T>(conn: &Connection, id: &'a T) -> Option<Self::Model>
fn query_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
fn delete_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
fn table_name() -> &'static str
fn all(conn: &Connection) -> Vec<Self::Model>
fn all_with_limit(conn: &Connection, limit: usize) -> Vec<Self::Model>
Source§impl Serialize for BlockGroup
impl Serialize for BlockGroup
impl Eq for BlockGroup
impl StructuralPartialEq for BlockGroup
Auto Trait Implementations§
impl Freeze for BlockGroup
impl RefUnwindSafe for BlockGroup
impl Send for BlockGroup
impl Sync for BlockGroup
impl Unpin for BlockGroup
impl UnsafeUnpin for BlockGroup
impl UnwindSafe for BlockGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more