-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
In order to keep organized as things scale, we need to structure the packages a little differently.
Each online resource should have an interface class:
- NCBI Variation Services: This is a wrapper class for the NCBI API. The current api_class.py has a few methods that could form the basis of this class (e.g., spdi_to_hgvs, hgvs_to_spdi).
- VICC: This is a wrapper class for the VICC API. The current api_class.py has a few methods that could form the basis of this class (variation_to_vrs).
Each format should have a class:
- VRS: DONE? - the VRS packages already define a VRS object and many methods for translation/validation. Any time we have a VRS object, this class should be used to manipulate it.
- I believe this package already has to_hgvs and to_spdi methods
- HGVS: DONE? - the biocommons hgvs packages already define a HGVS object and many methods for translation/validation. If we get an HGVS string, it should be parsed with this class. Any time we have an HGVS object, this class should be used to manipulate it.
- If the hgvs package does not have a "to_spdi" method, we can extend it by adding a method that uses the NCBI Var Services class.
- to_vrs: if this doesn't already exist, we could add it as a pass-through call to one of the VRS methods
- SPDI: Currently there is no SPDI class defined (that I am aware of). We should write this. It will be a simple class with 4 required input params (SPDI) that uses the NCBI Var Services class for validation. Methods include:
- init: create an object from scratch using required params
- to_hgvs( format ): returns an HGVS object or string, as determined by the value of "format". This method can use the NCBI Var Services class to do the heavy lifting.
- to_vrs: if this doesn't already exist, we could add it as a pass-through call to one of the VRS methods
- Gen Std Core: this is the primary class we're working on now, to serve as the common data structure. The class needs to have the following methods.
- init: create an object from scratch using required params
- var_obj_to_core: takes as input a VRS, HGVS, or SPDI object, extracts values for required params, calls init()
- to_spdi( format ): returns a SPDI object, string, or dict ( { sequence, position, deletion, insertion } ) as determined by the value of "format"
- to_hgvs( format ): returns an HGVS object or string, as determined by the value of "format". This method can use the NCBI Var Services class to do the heavy lifting, or the hgvs package if we want to try to assemble it from scratch (probably harder)
- to_vrs( format ): returns a VRS object or JSON structure, as determined by the value of "format". This method can use the VICC class to do the heavy lifting.
Additional classes (future):
- Core db interface
- FHIR R5+
- FHIR R4?
Reactions are currently unavailable