Starting from:

$25

PL-Homework 3 Solved

1.         Please go to the following link to find the SSW library:

https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library

2.         Find the /src/ssw.c for the implementation in C of the Striped Smith Waterman algorithm as your reference.

(https://academic.oup.com/bioinformatics/article/23/2/156/205631)

3.         Write a software using a modern C++ SIMD library (e.g., simdpp:

https://github.com/p12tic/libsimdpp) that can perform pairwise alignment with the Striped Smither Waterman algorithm.

a.     INPUT: Two sequences (i.e., Seq1 and Seq2) in the FASTA format (https://en.wikipedia.org/wiki/FASTA_format), it is OK to assume no newline in a sequence.

b.     OUTPUT: BLAST like output but simplified

 

   Speedup: 0.4X

Seq1:      453    CCAATGCCACAAAACATCTGTCTCTAACTGGTG--TGTGTGT    492 

                  |||  ||| ||||  |||||| | ||| |||||  |*||||| 

Seq2:       17    CCA--GCC-CAAA--ATCTGT-TTTAA-TGGTGGATTTGTGT    51 

                                     

                                        “|”: match

                                        “ ”: indel, add gaps “-” in the corresponding sequences.

                                        “*” : mismatch

 

      The speedup is calculated against the time needed for the regular banded Smith-Waterman implementeation without SIMD, which means that you need to implemented both versions (i.e., w/ and w/o SIMD). 

 

 

 

 

             

#include<queue

#include<functional

#include<iostream

Void add()

{

                std::cerr<<“1”<<std::endl;

}

 

struct ADD

{

                void operator()()

                {

                                std::cerr<<”2”<<std::endl;

}

};

 

int main(void)

{

                ADD a;

                        std::queue< std::function<void(void) jobs;                jobs.push( std::bind(add) );      jobs.push( std::bind( std::bind(a) ) );

                jobs.push( std::bind(a) );

 

                while(!jobs.empty() )

                {

                                    jobs.front()();                 jobs.pop();

}

return 0;

}

More products