Open yeban opened 7 years ago
A simple first implementation can simply be a 'Matching ± 1kb' button next to 'FASTA' button that downloads all matching regions (HSPs) for the database sequence (hit) ± 1kb on both sides.
A slightly more refined version would allow the user to choose how many base pairs each side to include in the download.
Hi, I started implementing this feature (as it is required for a project I'm collaborating). So far, I have managed to add a link to a new route that corresponds to the hit.
I extended the Retriver
class to have the range as an optional parameter. The unit tests still work, but I'm still to add unit tests for single and multiple regions.
Right now the flanking size is hardcoded as 1000, it may be a configuraiton file, or added as a field.
I am using the whichdb
method to find out which database I need to query. This is very slow, but I think the queries using blastcmd
can be cached, but this probably a different issue.
I added the route get_sequence_range
, but I think this could be overloaded with the get_sequence
call, but I realised that it is using the POST method, which is not how the links.rb
works.
I'm still to figure out a way to change the UI to include a field similar to this.
Finally, on my use case I would like o be able to disable the default Fasta download, as my use case requires NOT to be able to download the full chromosome (as this can be huge).
You can see my changes here: https://github.com/homonecloco/sequenceserver/tree/download_flanking_sequence
Carry over from #92.