GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Q. Inquiry for the Alignment Render in the BioJava. · Issue #983 · biojava/biojava

Q. Inquiry for the Alignment Render in the BioJava. #983

New issue
Copy link
New issue
Copy link
Open
Open
Q. Inquiry for the Alignment Render in the BioJava.#983
Copy link
Labels
questionOpen discussions about the libraryOpen discussions about the library

Description

@RoshanShrestha123
RoshanShrestha123
opened on Oct 20, 2021
Issue body actions

Hello,

I am software developer (new to biojava) currently using the Biojava API [biojava-core - 4.0.0 , alignment -1.9.3] for an application.

We are trying to accomplish Alignment render of the Query and the target
on Blast search like the image below. We are using the SmithWaterman algorithm for local Alignment. Now we are looking for a different way to visualize exactly where the sequence was aligned in our frontend application (we are using biojava in our backend side), like the following.

AAGAA
||| |
AAGGA

I found SimpleAlignment to render query and target alignment using TranslatedSequencePanel. but SimpleAlignment does not handle different length sequences and does not contain any gap-editing concepts. Upon further research I also came across formatOut which return string with the format we were looking for. But formatOut is only available in biojava-legacy. Is there any way i can get the result like this one?
image

Thanks!

Activity

  1. willishf commented on Oct 20, 2021

    @willishf
    willishf
    on Oct 20, 2021 via email
    Contributor
    More actions
    Not sure of the current status of the RichSequenceViewer that I put together many many years ago and probably in BioJava legacy at this point but should be what you are looking for. https://biojava.org/wiki/BioJava:CookBook:Interfaces:ProteinPeptideFeatures found at https://biojava.org/wiki/BioJava:CookBookLegacy as well as https://biojava.org/wiki/BioJava:CookBook:Interfaces:Alignments You can do just about anything related to the work for displaying a sequence, have it auto wrap when resize and then draw features etc that are graphic elements etc. If you have Java GUI background you should be able to
    …
    On Wed, Oct 20, 2021 at 3:57 AM Roshan Shrestha ***@***.***> wrote: Hello, I am software developer (new to biojava) currently using the Biojava API [biojava-core - 4.0.0 , alignment -1.9.3] for an application. We are trying to accomplish Alignment render of the Query and the target on Blast search like the image below. We are using the SmithWaterman algorithm for local Alignment. Now we are looking for a different way to visualize exactly where the sequence was aligned in our frontend application (we are using biojava in our backend side), like the following. AAGAA ||| | AAGGA I found SimpleAlignment to render query and target alignment using TranslatedSequencePanel. but SimpleAlignment does not handle different length sequences and does not contain any gap-editing concepts. Upon further research I also came across formatOut which return string with the format we were looking for. But formatOut is only available in biojava-legacy. Is there any way i can get the result like this one? [image: image] <https://user-images.githubusercontent.com/31877486/138051362-026422d1-7f5a-4a8b-9993-4b85c76939c9.png> Thanks! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#983>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA653HQW4VGFTVYMHXMIMNLUHZY4ZANCNFSM5GK62GPA> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
    Reacted by Roshan Shrestha and praneen
    Reacted by Roshan Shrestha
  2. josemduarte
    added
    questionOpen discussions about the libraryOpen discussions about the library
    on Oct 20, 2021
  3. RoshanShrestha123 commented on Oct 21, 2021

    @RoshanShrestha123
    RoshanShrestha123
    on Oct 21, 2021
    Author
    More actions

    Thank you @willishf , 🎉
    I will look into the link you shared.

  4. RoshanShrestha123 commented on Oct 22, 2021

    @RoshanShrestha123
    RoshanShrestha123
    on Oct 22, 2021
    Author
    More actions

    I looked into couple of thing you mention @willishf , I believe they are the AWT or Swing based component that render the alignment. I was really looking for the class that can return the alignments as the "Text" so that i can return it to the frontend application( of different stack) via API call and render their instead. Thanks

  5. aalhossary commented on Oct 22, 2021

    @aalhossary
    aalhossary
    on Oct 22, 2021
    Member
    More actions

    Hello @RoshanShrestha123 You are welcome to extract the text based rendering and share it to (current) BioJava.
    Alternatively, you may request it to be ported to BioJava and provide the ability to expose the text alignment. But the drawback of this approach is that you will have to wait until of the developers have time to do it for you.
    I may have time in December if you want.

    Reacted by Roshan Shrestha
  6. sbliven commented on Jan 4, 2022

    @sbliven
    sbliven
    on Jan 4, 2022
    Member
    More actions

    @RoshanShrestha123 Take a look at SimpleProfile.toString(StringFormat). In particular, maybe the PDBWEB format would work for you. It outputs an HTML DIV like

          seq 2 ERNDKK 7
                 || | |
          seq 1 ER-DNK 5
    
    Legend: Green - identical residues | Pink - similar residues | Blue - sequence mismatch | Brown - insertion/deletion |

    (legend included, and some css has to be defined appropriately to enable colors).

    If you really want to match the text output above, this can either be implemented as a new Profile.StringFormat (easy but needs a BioJava PR) or you can do it in app code.

  7. sbliven
    added a commit that references this issue on Jan 27, 2022

    Temporary commit. Needs to be amended!

    a4006f0
  8. sbliven commented on Jan 27, 2022

    @sbliven
    sbliven
    on Jan 27, 2022
    Member
    More actions

    I started working on this, thinking it would be an easy fix. However there are some things I need to clarify about how the StringFormat methods are intended to work (see separate issue). There are some commits in sbliven/biojava-sbliven/fix983 which will need to be ammended and rebased. However ProfileFormatTest.java has a method for printing the desired format in BioJava 6.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionOpen discussions about the libraryOpen discussions about the library

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.