Skip to content

Commit

Permalink
Add the curation session key to each annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
kimrutherford committed Nov 16, 2024
1 parent 4bbf24c commit 7633f11
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pombase/data_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,8 @@ pub struct OntAnnotationDetail {
#[serde(skip_serializing_if="Option::is_none")]
pub reference: Option<ReferenceUniquename>,
#[serde(skip_serializing_if="Option::is_none")]
pub curation_session: Option<CurationSessionKey>,
#[serde(skip_serializing_if="Option::is_none")]
pub evidence: Option<Evidence>,
#[serde(skip_serializing_if="Option::is_none")]
pub eco_evidence: Option<Evidence>,
Expand Down
1 change: 1 addition & 0 deletions src/pombase/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub type MiscExtRange = FlexStr;
pub type GeneUniquename = FlexStr;
pub type TermUniquename = FlexStr;
pub type ReferenceUniquename = FlexStr;
pub type CurationSessionKey = FlexStr;
pub type GeneName = FlexStr;
pub type TypeName = FlexStr;
pub type GeneProduct = FlexStr;
Expand Down
5 changes: 5 additions & 0 deletions src/pombase/web/data_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4040,6 +4040,7 @@ phenotypes, so just the first part of this extension will be used:
let mut allele_promoters = vec![];
let mut throughput: Option<Throughput> = None;
let mut curator_orcid: Option<CuratorOrcid> = None;
let mut curation_session: Option<CurationSessionKey> = None;

// need to get evidence first as it's used later
// See: https://github.com/pombase/website/issues/455
Expand Down Expand Up @@ -4135,6 +4136,9 @@ phenotypes, so just the first part of this extension will be used:
"curator_orcid" => {
curator_orcid = prop.value.clone();
},
"canto_session" => {
curation_session = prop.value.clone();
},
"annotation_throughput_type" => {
if let Some(throughput_type) = prop.value.clone() {
throughput = Some(match throughput_type.as_ref() {
Expand Down Expand Up @@ -4273,6 +4277,7 @@ phenotypes, so just the first part of this extension will be used:
genes: gene_uniquenames_vec,
transcript_uniquenames,
reference: reference_uniquename,
curation_session,
genotype: maybe_genotype_uniquename,
genotype_background,
allele_promoters,
Expand Down
1 change: 1 addition & 0 deletions tests/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ fn make_one_detail(id: i32, gene_uniquename: &str, reference_uniquename: &str,
genotype: maybe_genotype_uniquename.map(|s| s.to_shared_str()),
genotype_background: None,
reference: Some(reference_uniquename.into()),
curation_session: None,
evidence: Some(evidence.into()),
eco_evidence: Some(evidence.into()),
annotation_phenotype_score: None,
Expand Down

0 comments on commit 7633f11

Please sign in to comment.