<aside> 🔅 Use cmd/ctrl+shift+l to switch between light/dark display mode.
</aside>
https://github.com/SynBioDex/SBOL-utilities/pull/160
feat_loc
shall hold the final FeatureLocation object (which will be just FeatureLocation
if there is only 1 location, else CompoundLocation
, if there are multiple).CompoundLocation
can be found here.feat_loc_array
will be the "flattened" list of start and end points of all locations of a feature, sorted internally:
feat_loc_array
will hold [1,30,2,4,3,9]feat_order
is a dictionary that will have key-value pairs of Feature Object - feat_locs
array. While performing the final sorting of features, this dictionary is used to access the feat_locs
array for each feature.feat_locs
array, which will be internally sorted for each Feature on the basis of each location's start and end points lexicographically before being stored in the final Feature object.CompoundLocation
Object takes in an operator argument which can be either of "join"/"order"/"compliment"; currently, I am using "join" whenever there are multiple locations. We need to discuss how the converter should decide which one to use based on parsed feature locations' details.sequence2_modified.gb
file. This feature has the location of the form:complement(join(1603..1891,2322..2438,2538..2633,2801..2843,
2918..3073,3167..3247,3874..3972,4082..4637))
But once this is round-tripped to return the sequence2_modified.gb
file inside the test/test_files
directory, the location becomes:
complement(join(4082..4637,3874..3972,3167..3247,
2918..3073,2801..2843,2538..2633,2322..2438,1603..1891))
The order inside the join operator reverses, and I am struggling to understand how to deal with this issue. I think this is related to the previous point, and maybe the operator used should not be "join" here.
In the previous blog, I discussed the addition of a conversion method for the opposite direction of conversion, i.e., SBOL3 → GenBank. Here, I shall discuss the handling of features with multiple locations and how they will further be stored.