-
Notifications
You must be signed in to change notification settings - Fork 0
Relational biosd, submission management commands
Simply, there is a command for loading a SampleTab file (what we call a submission) and to unload it, given the submission accession.
##Loading Syntax:
load.sh <path-to-biosampletab-file>
##Unloading Syntax
unload.sh <submission accession>
##Programmatic API
The Loader class can be used to load a SampleTab file, parse and turn it into an instance of the BioSD object model.
The Persister can be used to save such a model instance into a relational database. This starts from the submission object and walks the connected graph in top-down direction.
This is all based on JPA and Hibernate, so most of the persistence magic just happens inside such framework.
Due to technical reasons the underlining SampleTab parser creates many objects that actually correspond to the same real-world entity, e.g., ontology terms or ontology reference sources. Moreover, there are certain objects, such as the samples and sample groups, that should be re-used, so existing records should be linked to the submission being loaded, when they are referred by a SampleTab file. This double normalisation is done in the persister, by means of a normalisation framework. The entry point for that is MSINormalizer
The Unloader class is used for the unloading job. Similarly to the persistence, unloading is done through Hibernate. Before/After firing JPA deletion operations, some pre/post processing is needed to keep in the database objects that are linked to multiple submissions, as well as to remove objects that are not referred any more after the removal of a submission (e.g., ontology sources). This is done through entity listeners. This is started by the MSIUnloadingListener.