We currently use an algorithm to allow for a user to provide a sequence and then query the API for parts, cache the query, find all forward/reverse part sequences in the query sequence, and then use a scheduling algorithm to sort the list and (starting with the longest) add part sequences to the query that don't overlap. Complete details are in this comment: vsoch/freegenes#63 (comment)
I tested basic cases (manually assembling a part) and we would need unit tests to ensure that (most) use cases that are possible return correctly (as we would want/expect). To do this, the unit tests shouldn't rely on the API, but instead can add a loaded json of output from the API, provided here:
parts.json.txt
To the client, meaning like:
from freegenes.main import Client
# Don't check for token
client = Client(validate=False)
# Load the json data here (parts), add to the cache
client.cache['parts'] = parts
# Then test the function to return sequences from some query sequence
selected_parts = self._derive_parts(sequence)
The above should all be possible without needing to interact with API endpoints / tokens (and reasonable for unit testing).
As a logged in user, you can see the create endpoint here and the function for the client to interact is documented here. @shea256 would this be something you'd like to work on, if you are interested in the genomics side of things too? I think @Koeng101 could give you guidance about the kinds of testing cases that we would want.
We currently use an algorithm to allow for a user to provide a sequence and then query the API for parts, cache the query, find all forward/reverse part sequences in the query sequence, and then use a scheduling algorithm to sort the list and (starting with the longest) add part sequences to the query that don't overlap. Complete details are in this comment: vsoch/freegenes#63 (comment)
I tested basic cases (manually assembling a part) and we would need unit tests to ensure that (most) use cases that are possible return correctly (as we would want/expect). To do this, the unit tests shouldn't rely on the API, but instead can add a loaded json of output from the API, provided here:
parts.json.txt
To the client, meaning like:
The above should all be possible without needing to interact with API endpoints / tokens (and reasonable for unit testing).
As a logged in user, you can see the create endpoint here and the function for the client to interact is documented here. @shea256 would this be something you'd like to work on, if you are interested in the genomics side of things too? I think @Koeng101 could give you guidance about the kinds of testing cases that we would want.