pub struct BlockGroup {
pub id: HashId,
pub collection_name: String,
pub sample_name: String,
pub name: String,
pub created_on: i64,
pub parent_block_group_id: Option<HashId>,
pub is_default: bool,
}Fields§
§id: HashId§collection_name: String§sample_name: String§name: String§created_on: i64§parent_block_group_id: Option<HashId>§is_default: boolImplementations§
Source§impl BlockGroup
impl BlockGroup
pub fn select(conn: &Connection) -> BlockGroupSelect<'_>
pub fn all(conn: &Connection) -> Result<Vec<Self>, ModelSelectError>
Source§impl BlockGroup
impl BlockGroup
pub fn create( conn: &GraphConnection, new_block_group: NewBlockGroup<'_>, ) -> Result<BlockGroup, BlockGroupError>
pub fn delete( conn: &GraphConnection, collection_name: &str, sample_name: &str, name: &str, ) -> Result<(), BlockGroupError>
pub fn get_by_id( conn: &GraphConnection, id: &HashId, history_ref: Option<&str>, ) -> Result<BlockGroup, BlockGroupError>
pub fn get_by_name( conn: &GraphConnection, collection_name: &str, sample_name: &str, name: &str, history_ref: Option<&str>, ) -> Result<BlockGroup, BlockGroupError>
pub fn get_reference_block_groups( conn: &GraphConnection, collection_name: &str, ) -> Result<Vec<BlockGroup>, BlockGroupError>
pub fn get_or_create_sample_block_groups( conn: &GraphConnection, collection_name: &str, sample_name: &str, group_name: &str, parent_samples: Vec<String>, ) -> Result<Vec<BlockGroup>, BlockGroupError>
pub fn find_parent_block_groups( conn: &GraphConnection, collection_name: &str, sample_name: &str, group_name: &str, parent_samples: &[String], history_ref: Option<&str>, ) -> Result<Vec<BlockGroup>, BlockGroupError>
pub fn get_id( collection_name: &str, sample_name: &str, group_name: &str, parent_block_group_id: Option<&HashId>, ) -> HashId
pub fn get_graph( conn: &GraphConnection, workspace: &Workspace, block_group_id: &HashId, history_ref: Option<&str>, ) -> Result<GenGraph, BlockGroupError>
Sourcepub fn get_graph_from_edges(
conn: &GraphConnection,
workspace: &Workspace,
block_group_id: &HashId,
edges: &[AugmentedEdge],
) -> Result<GenGraph, BlockGroupError>
pub fn get_graph_from_edges( conn: &GraphConnection, workspace: &Workspace, block_group_id: &HashId, edges: &[AugmentedEdge], ) -> Result<GenGraph, BlockGroupError>
Build a graph from a set of known edges. If a source or target node is unknown, the graph will expand out automatically to cover it.
pub fn prune_graph(graph: &mut GenGraph)
pub fn get_all_sequences( conn: &GraphConnection, workspace: &Workspace, block_group_id: &HashId, _prune: bool, ) -> Result<HashSet<String>, BlockGroupError>
pub fn add_accession( conn: &GraphConnection, path: &Path, name: &str, start: i64, end: i64, cache: &mut PathCache<'_>, ) -> Result<Accession, BlockGroupError>
pub fn insert_changes( conn: &GraphConnection, workspace: &Workspace, changes: &[BlockGroupChange], tree_map: Option<&mut IntervalTreeCache>, ) -> Result<(), BlockGroupError>
pub fn insert_change( conn: &GraphConnection, workspace: &Workspace, change: &BlockGroupChange, ) -> Result<(), BlockGroupError>
pub fn set_up_new_edges( change: &BlockGroupChange, tree: &IntervalTree<i64, NodeIntervalBlock>, ) -> Result<Vec<AugmentedEdgeData>, BlockGroupError>
pub fn intervaltree_for( conn: &GraphConnection, workspace: &Workspace, block_group_id: &HashId, remove_ambiguous_positions: bool, ) -> Result<IntervalTree<i64, NodeIntervalBlock>, BlockGroupError>
pub fn get_current_path( conn: &GraphConnection, block_group_id: &HashId, history_ref: Option<&str>, ) -> Result<Path, BlockGroupError>
pub fn get_path_by_name( conn: &GraphConnection, block_group_id: &HashId, path_name: &str, ) -> Result<Option<Path>, BlockGroupError>
pub fn derive_subgraph( conn: &GraphConnection, workspace: &Workspace, source_block_group_id: &HashId, start: SubgraphBoundary<'_>, end: SubgraphBoundary<'_>, target_block_group_id: &HashId, create_terminal_edges: bool, ) -> Result<(), BlockGroupError>
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 (const: unstable) · 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
impl Eq for BlockGroup
Source§impl Hash for BlockGroup
impl Hash for BlockGroup
Source§impl PartialEq for BlockGroup
impl PartialEq for BlockGroup
Source§impl RegionResolver for BlockGroup
impl RegionResolver for BlockGroup
type Connection = GraphConnection
type Error = BlockGroupError
fn resolve( region: &Region, conn: &Self::Connection, collection_name: &str, sample_name: &str, ) -> Result<Self, RegionResolutionError<Self::Error>>
Source§impl Serialize for BlockGroup
impl Serialize 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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