mengyao / Complete-Striped-Smith-Waterman-Library

298 stars 112 forks source link

modify your library for semi-global alignment? #3

Closed jeffdaily closed 10 years ago

jeffdaily commented 10 years ago

We are interested in speeding up our semi-global alignment code. Of course, global/semi-global/local alignment are all very similar so I thought I would be able to modify your code for our needs. Unfortunately, I have never explicitly used SSE2 before. In addition, I am still trying to understand Farrar's pseudocode and your own C implementation.

If I understand sequence alignment correctly, I would need to modify your SW local alignment code to allow for negative scores, and then locate the max score from the last column and last row.

Is this possible given your current implementation?

mengyao commented 10 years ago

Dear Jeff,

Thank you very much for your interest in this library.

Yes, I think it may not difficult to revise SSW into semi-global or global alignment.

I think what you described bellow is the global alignment: If I understand sequence alignment correctly, I would need to modify your SW local alignment code to allow for negative scores, and then locate the max score from the last column and last row.

A semi-global alignment should allow negative score getting from one direction (up to down or left to right) and locate the max score from the bottom row or last column, depending on which sequence will be aligned globally.

I'll be very glad if you would like to revise this. You could fork from SSW. Maybe I could add your revision as an option, if you don't mind. :-)

You can find the SSE2 intrinsic codes I used from the attached document. To allow negative scores may just need to change the corresponding codes.

Best wishes,

Mengyao

jeffdaily commented 10 years ago

Mengyao,

I did not see an attached document for the SSE2 intrinsic codes?

I'm very interested in getting semi-global alignment to work. Thank you for the initial tips. My goal would be to not just return the score, but also the cigar as you have done for the ssw code.

Any additional tips or ideas on how to go about this would be fantastic. Thus far my first attempt at modifying your ssw code resulted in always getting scores of 0...

Jeff

On Fri, Sep 27, 2013 at 1:42 PM, mengyao notifications@github.com wrote:

Dear Jeff,

Thank you very much for your interest in this library.

Yes, I think it may not difficult to revise SSW into semi-global or global alignment.

I think what you described bellow is the global alignment: If I understand sequence alignment correctly, I would need to modify your SW local alignment code to allow for negative scores, and then locate the max score from the last column and last row.

A semi-global alignment should allow negative score getting from one direction (up to down or left to right) and locate the max score from the bottom row or last column, depending on which sequence will be aligned globally.

I'll be very glad if you would like to revise this. You could fork from SSW. Maybe I could add your revision as an option, if you don't mind. :-)

You can find the SSE2 intrinsic codes I used from the attached document. To allow negative scores may just need to change the corresponding codes.

Best wishes,

Mengyao

Reply to this email directly or view it on GitHubhttps://github.com/mengyao/Complete-Striped-Smith-Waterman-Library/issues/3#issuecomment-25275798 .

mengyao commented 10 years ago

Dear Jeff,

I'm afraid Git Hub may not allow to post attachments.

Could you please send email to me directly? So that, I can reply you the attachment.

If you would like to get the cigar, the banded SW for trace back also needs to be revised into a semi-global one.

Best wishes,

Mengyao

jrderuiter commented 9 years ago

Any news on the implementation of the (semi-)global alignment?

mengyao commented 9 years ago

Dear Julian,

I apologize I stil haven’t gotten time to do this.

I just graduated and began a new job. Now, I’m still revising my PhD thesis and busy with the starting up.

I may not have time to do this for a while…

Yours,

Mengyao

On Nov 21, 2014, at 4:52 AM, Julian de Ruiter notifications@github.com wrote:

Any news on the implementation of the (semi-)global alignment?

— Reply to this email directly or view it on GitHub https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library/issues/3#issuecomment-63948056.