Open yeban opened 8 years ago
Regarding overlapping HSPs, a minimal example is:
git clone git@github.com:wurmlab/sequenceserver.git
cd sequenceserver
bundle install
bundle exec bin/sequenceserver -d spec/database/v5/
>SI2.2.0_09373fake MHPTVLDATGYTLLLSNFITFAILLWKGYKRKRKCPFYVLSLSDIFSATLMAVVLLVNHIEAGIRLNYNWQNNTGGDMPNHTWTIQDKRFPFLQMHLREVDDLDVTLTCGMKDIFMHYGMLLAALANAFTSLLTFAVQCNFNAAAIKRRCANVMKSSLKNAQLELPTDAEVKCLSELKSTSRERRIDAKVKSNVTQRIEKMSKFRSPKRVDEKPLPTTMTTTFLVTSHWLVPFLVAGILYFAEYNDMNNVRHTEDIECVFGSNFPMSDFHTFLDSIDNLMMIDSVAYVNTPPEENYFLGEKLSNWSQSSSVQVDEVVSKVQSIVRSALNSTKDMEMTNFINTSGARNLTEDIILTNDIVRYIKNITNINSAVQGLNGTPINVHNSSTSNIHLNWKESQVPLAYDVSEQSDSSSTTAAPGSLSGVSRPSTETEDVIELSDYQEDAQIHFARTEESTTREIADIPFVRNATFVSNDQIYDEIMKRIQSANVRVHSSAKSHRNRSASRAKNGNQPADISSLKNYIAKRKQKNSIENLFSNKNGSRYVDASETKQSDSPPITANECLVSTKFLKLQLFVLSLAIYFLPILLSSILQMRGKHMCKNTLAILRAKTNFTFTDGKKSQSRDSVEFTVPQGSRNDRSKTIIDVMKEGSCKENESIALEIDRMVRTLDTIKLSLILCVLLWSPVFLGTLLRVYSCTRAPQWLTDVTFLSAILFGIVRNVLNVNIVRIQEACTDANAKDNRIQPVFAEYNDMNNVRHTEDIECVFGSNFPMSDFHTFLDSIDNLMMIDSVAYVNTPPEENYFLGEKLSNWSQSSSVQVDEVVSKVQSIVRSALNSTKDMEMTNFINTSGARNLTEDIILTNDIVRYIKNITNINSAVQGLNGTPINVHNSSTSNIHLNWKESQVPLAYDVSEQSDSSSTTAAPGSASDFKHLSKDFJHBKLJHDSLFKJHFDLKJSDFHLDSKJFHDSLSGVSRPSTETEDVIELSDYQEDAQIHFARTEESTTREIADIPFVRNATFVSNDQIYDEIFAEYNDMNNVRHTEDIECVFGSNFPMSDFHTFLDSIDNLMMIDSVAYVNTPPEENYFLGEKLSNWSQSSSVQVDEVVSKVQSIVRSALNSTKDMEMTNFINTSGARNLTEDIILTNDIVRYIKNITNINSAVQGLNGTPINVHNSSTSNIHLNWKESQVPLAYDVSEQSDSSSTTAAPGSLSGVSRPSTETEDVIELSDYQEDAQIHFARTEESTTREIADIPFVRNATFVSNDQIYDEI
You should see that that top (and only) hit has 3 overlapping HSP.
s
If I search with:
>NP_059488.2modified cytochrome P450 3A4 isoform 1 [Homo sapiens] - modified
SKETESHKALSDLELVAQSIIFIFAGYETTSSVLSFIMYELATHPDVQQKLQEEIDAVLPNKAPPTYDTV
LQMEYLDMVVNETLRLFPIAMRLERVCKKDVEINGMFIPKGVVVMIPSYALHRDPKYWTEPEKFLPERFS
KKNKDNIDPYIYTPFGSGPRNCIGMRFALMNMKLALIRVLQNFSFKPCKETQIPLKLSLGGLLQPEKPVV
LKVESRDGTVSGASDFKLSDJFSDLKJxCLVKJBcLVKFGLKERJtlrekjtrelkjfgklJGdFOIUDGFKLJGFdFLGLFDKGJDFLGKJDFLKGJSDNbLKJROtidfkl
MALIPDLAMETWLLLAVSLVLLYLYGTHSHGLFKKLGIPGPTPLPFLGNILSYHKGFCMFDMECHKKYGK
VWGFYDGQQPVLAITDPDMIKTVLVKECYSVFTNRRPFGPVGFMKSAISIAEDEEWKRLRSLLSPTFTSG
KLKEMVPIIAQYGDVLVRNLRREAETGKPVTLKDVFGAYSMDVITSTSFGVNIDSLNNPQDPFVENTKKL
LRFDFLDPFFLSITVFPFLIPILEVLNICVFPREVTNFLRKSVKRMKESRLEDTQKHRVDFLQLMIDSQN
against the database 2020-11 Swiss-Prot insecta
, then some of the HSPs at the right aren't appropriately shown. (i.e. they are white/invisible although they shouldn't be).
Note: I don't think next highest HSP should be on the next line (i.e. we should not increase y). Because one line per hit is a very established concept.
Instead, there should be a white border at the edge of the HSP, so that the user knows something funny is going on (1pt vertical). Perhaps this requires separating the drawing of the fill colour and the border colour. And on hover, the HSP we are hovering on should move to the top.
[x] Colour based on HSP's evalue (#265)
[ ] Draw overlapping HSPs on the next line (increase y), in increasing order of evalue. Currently, they are drawn on the same line and can cause weaker HSPs to hide stronger HSPs (see screenshot below & Yannick's comment "Regarding overlapping HSPs").
[ ] ensure that the width of the HSPs and inter-hit spacing are appropriate. The following screenshot highlights a situation with many hits that end up being too thin. (perhaps our minimum height should be 1pt?, and minus inter-hit distance should be 1 pt?)
[ ] Fill HSPs with >>> or <<< pattern based on strand.
[ ] If displaying very long genomic sequence: assume 10kb or so can be shown properly at once, add a -> and <- button on top to pan to the next 10kb. If the next 10kb does not contain HSPs (domain is
max(longest hit's length, query's length)
, so this is possible), pan to the next 10kb that contains HSPs. (#264). Alternatively, by default show the span of the region with aligning pieces & enable zooming/panningThis largely takes place within https://github.com/wurmlab/sequenceserver/blob/master/public/js/hits_overview.js