added a column 'asm_accession' to the sequence_collection_l1 table #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, the API doesn't store the assembly accession value that corresponds to each inserted seqcol object. Which is an important meta data that can be useful.
Fixes #13
Solution design
We propose to add a new attribute
asm_accession
in theSeqColLevelOneEntity
class (and hence a new column in thesequence_collections_l1
table).So the resulting table will be the following (we ignored the display of the jsonLevelOneObject):
And of course, the
asm_accession
will not be returned in level 1 nor in level 2. (we may have a further discussion about this)Now the API will check for the existence of an asm_accession before proceeding with the ingestion process, this will help avoid all the extra work of downloading data, constructing the objects and then checking.
However, we should consider checking the case where not all seqcol objects that correspond to a specific asm_accession are inserted in the database, in that case we should insert them. (I think this case is very much less likely to happen)
Further discussion
I think we can discuss the naming of
asm_accession
, because it might make sense to call itinsdc_accession
?