Skip to content

anj0la/nw_source_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Needleman-Wunsch Algorithm - Serial and Parallel Implementation

This repository contains the serial and parallel source code of the Needleman-Wunsch algorithm. When running the program, we assume that the two sequences are of equal length.

Required Compilers

  • GCC compiler
  • Nvidia NVC compiler (need a Linux system or virtual OS with a Nvdia GPU)

To run the serial version of the algorithm:

  1. Compile the program using the following line:
 gcc nw_serial.c -o nw_serial
  1. Execute the code in your chosen terminal (system terminal or using an IDE for C):
./[executable_file_name] [first file] [second file] [length] [match] [mismatch] [gap_penalty]
  1. With nw_serial, seq1.txt and seq2.txt:
./nw_serial seq1.txt seq2.txt 4 1 -1 -2

To run the parallel version of the algorithm:

  1. Compile the program using the following line:
nvc -fast -Minfo=all -mp nw_openmp.c -o nw_openmp
  1. Execute the code in your chosen terminal (system terminal or using an IDE for C):
./[executable_file_name] [first file] [second file] [length] [thread] [match] [mismatch] [gap_penalty]
  1. With nw_serial, seq1.txt, seq2.txt and 8 threads:
./nw_openmp seq1.txt seq2.txt 4 8 1 -1 -2

About

The Needleman-Wunsch algorithm is a pairwise DNA global sequence alignment algorithm used to obtain the optimal alignment between two sequences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages