Skip to content

Commit

Permalink
Merge pull request #10 from FlyBase/fix_db_status
Browse files Browse the repository at this point in the history
update db status vocab term
  • Loading branch information
christabone authored Aug 15, 2023
2 parents cf654b0 + 3951394 commit 08442dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/AGR_data_retrieval_curation_allele.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __init__(self, feature):
self.in_collection_name = None # Will be library.name.
self.is_extinct = None # Make True if extinction reported; make False is stock exists; leave as None otherwise.
self.reference_curies = [] # Will be a list of reference curies (directly or indirectly related).
self.allele_database_status_dto = None # Will be "public" or "private" slot annotation.
self.allele_database_status_dto = None # Use term from "allele database status" CV.
self.allele_inheritance_mode_dtos = [] # Will be list of slot annotations. TEMPORARY: Suppress phenotype_curie_term.
self.allele_mutation_type_dtos = [] # Will be list of slot annotations.
# Future ToDo:
Expand Down Expand Up @@ -1076,7 +1076,7 @@ def synthesize_inheritance_mode(self, allele):
inheritance_data[pheno_key] = [pub_curie]
# Convert data into Alliance slot annotations.
INHERITANCE_MODE_NAME = 0
PHENOTYPE_CURIE_NAME = 1 # TEMPORARY: Suppress until AGR has FBcv
# PHENOTYPE_CURIE_NAME = 1 # TEMPORARY: Suppress until AGR has FBcv
PHENOTYPE_STATEMENT = 2
for pheno_key, pub_curie_list in inheritance_data.items():
for pub_curie in pub_curie_list:
Expand Down Expand Up @@ -1254,18 +1254,19 @@ def add_data_provider_info(self, allele):

def flag_internal_alleles(self, allele):
"""Flag alleles as internal."""
allele.allele_database_status_dto = self.generic_audited_object.copy()
allele.allele_database_status_dto['database_status_name'] = 'approved'
# Allele database status may change depending on checks below.
if allele.obsolete is True:
allele.internal = True
allele.internal_reasons.append('Obsolete')
allele.allele_database_status_dto['database_status_name'] = 'deleted'
if allele.organism_abbr != 'Dmel':
allele.internal = True
allele.internal_reasons.append('Non-Dmel')
if allele.allele_of_internal_gene is True:
allele.internal = True
allele.internal_reasons.append('Allele of internal Dmel gene type.')
allele_status = {False: 'public', True: 'private'}
allele.allele_database_status_dto = self.generic_audited_object.copy()
allele.allele_database_status_dto['database_status_name'] = allele_status[allele.internal]
return

def flag_unexportable_alleles(self, allele):
Expand Down
2 changes: 1 addition & 1 deletion src/AGR_data_retrieval_curation_disease.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def __init__(self):
}
generic_data_provider_dto = generic_audited_object.copy()
generic_data_provider_dto['source_organization_abbreviation'] = 'FB'
generic_cross_reference_dto = {'prefix': 'FB', 'page_area': 'disease/fb', 'internal': False}
generic_cross_reference_dto = {'prefix': 'DOID', 'page_area': 'disease/fb', 'internal': False}
relevant_qualifiers = [
'model of',
'DOES NOT model'
Expand Down

0 comments on commit 08442dd

Please sign in to comment.