Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9151751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:52:44+00:00 2026-06-17T11:52:44+00:00

How can I implement sequence alignment with minimum subsequence length constraint. For example let

  • 0

How can I implement sequence alignment with minimum subsequence length constraint. For example let for these inputs minimum sub-sequence length be 3. Using Smith-Waterman gives output like below.

ATACGGACC
||    |||
ATCATAACC

But instead I need like below.

---ATACGGACC
   |||   |||
ATCATA---ACC

Is there a know algorithm for this, or do you know an approach?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:52:46+00:00Added an answer on June 17, 2026 at 11:52 am

    Look at how Smith-Waterman works. You have two sequences (S1 of length N, S2 of length M) and you create an NxM matrix (let’s call it A) where A(i,j) is “the best score alignment of S1[1..i] and S2[1..j].” To do that, you write a recurrance about how to get A(i,j) based on the last element – A(i,j) is the best of

    A(i-1, j-1) + match/mismatch score
    A(i,j-1) + indel score
    A(i-1,j) + indel score
    

    Here’s the basic idea; you may need to tweak it a little.

    To do what you’re asking, you need two matrices. Let A(i,j) be “the best score alignment of S1[1..i] and S2[1..j] ending with a match” and B(i,j) be “the best score alignment of S1[1..i] and S2[1..j] ending with an indel.”

    Let’s start with B, because it’s easier. B(i,j) is the best of

    A(i,j-1) + indel score
    A(i-1,j) + indel score
    B(i,j-1) + indel score
    B(i-1,j) + indel score
    

    And A(i,j) is the best of

    A(i-1, j-1) + match/mismatch score
    B(i-3, j-3) + match/mismatch score for the three
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can implement reordring in winforms datagridview by using the feature of drag and
How I can implement dynamic Jtree, which shows created instances of clases? For example,
For example... I have two scripts for look if a (Multiple Sequence Alignment) MSA
Is it possible to implement animating sequence of images using CAAnimation? And i dont
I am trying to implement the Fibonacci sequence using callables and seeded the initial
I can implement both variants - it's easy. But I'm interested: what approach is
Can someone please tell me how I can implement the following line of pseudo-code.
Anyone knows how i can implement re-arrangable divs (Drag the divs around on the
I know that classes can implement various special methods, such as __iter__ , __setitem__
How I can implement Background Processing in asp.net. Can anyone give a small and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.