linspace - Space-Efcient Alignment CMSC 858S Space Usage...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Space-Efficient Alignment CMSC 858S
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Space Usage O(n 2 ) is pretty low space usage, but for a 10 Gb genome, you’d need a huge amount of memory. Can we use less? Hirschberg’s algorithm
Image of page 2
Remember the meaning of a cell 0 1 2 3 4 5 6 7 8 9 10 11 12 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x y C A G T T G C A A A A G G T A T G A A T C Best alignment between prefix x[1..5] and prefix y[1..5]
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Linear Space for Alignment Scores If you are only interested in the cost or score of an alignment, you need to use only O(n) space. How?
Image of page 4
Linear Space for Alignment Scores If you are only interested in the cost or score of an alignment, you need to use only O(n) space. How? 0 1 2 3 4 5 6 7 8 9 10 11 12 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 When filling in an entry (gray box) we only look at the current and previous rows. Only need to keep those two rows in memory.
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
We can do more... Given 2 strings X and Y, we can, in linear space and O(nm) time, compute the cost of aligning... every prefix of X with Y X with every prefix of Y a particular prefix of X with every prefix of Y a particular suffix of X with every suffix of Y How can we do that?
Image of page 6
Best Alignment Between Prefix of X and Y 0 1 2 3 4 5 6 7 8 9 10 11 12 9 8 7 6 5 4 3 2 1 0 9g 8g 7g 6g 5g 4g 3g 2g 1g 0 1g 2g 3g 4g 5g 6g 7g 8g 9g 10g 11g 12g x y C A G T T G C A A A A G G T A T G A A T C Score of an optimal alignment between Y and a prefix of X
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Fill in the matrix by columns... 0 1 2 3 4 5 6 7 8 9 10 11 12 9 8 7 6 5 4 3 2 1 0 9g 8g 7g 6g 5g 4g 3g 2g 1g 0 1g 2g 3g 4g 5g 6g 7g 8g 9g 10g 11g 12g x y C A G T T G C A A A A G G T A T G A A T C What is this column?
Image of page 8
Fill in the matrix by columns... 0 1 2 3 4 5 6 7 8 9 10 11 12 9 8 7 6 5 4 3 2 1 0 9g 8g 7g 6g 5g 4g 3g 2g 1g 0 1g 2g 3g 4g 5g 6g 7g 8g 9g 10g 11g 12g x y C A G T T G C A A A A G G T A T G A A T C What is this column?
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern