Skip to content

AIM-GenASM is part of AIM, A Framework for High-throughput Sequence Alignment using Real Processing-in-Memory Systems..

License

Notifications You must be signed in to change notification settings

safaad/aim-genasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is part of the repository AIM https://github.com/safaad/aim

AIM: Alignment-in-Memory A Framework for High-throughput Sequence Alignment using Real Processing-in-Memory Systems

AIM is a framework for high-throughput pairwise sequence alignment using processing-in-memory. It targets UPMEM, the first publicly-available general-purpose programmable PIM architecture. AIM dispatches a large number of sequence pairs across different memory modules and aligns each pair using compute cores within the memory module where it resides. It supports multiple alignment algorithms including NW, SWG, GenASM [1], WFA [2], and WFA- adaptive, and includes two implementations of each algorithm that manage the UPMEM memory hierarchy differently and are suitable for different read lengths.

We evaluate AIM on a real UPMEM system and compare the throughput it can achieve with that achieved by server-grade multi-threaded CPU systems running at full scale. Our evaluation shows that a real PIM system can substantially outperform CPU systems for a wide variety of algorithms, read lengths, and edit distance thresholds. For example, for WFA-adaptive, the state-of-the-art sequence alignment algorithm, AIM achieves a speedup of up to 2.56x when data transfer time is included, and up to 28.14x when data transfer time is not included.

Citation

For more information on this project you can refer to the following papers:

Long paper:

Safaa Diab, Amir Nassereldine, Mohammed Alser, Juan Gómez Luna, Onur Mutlu, Izzat El Hajj, "A Framework for High-throughput Sequence Alignment using Real Processing-in-Memory Systems", Bioinformatics, 2023; btad155, https://doi.org/10.1093/bioinformatics/btad155

HiCOMB22 short paper (slides):

Safaa Diab, Amir Nassereldine, Mohammed Alser, Juan Gomez Luna, Onur Mutlu, & Izzat El Hajj (2022). "High-throughput Pairwise Alignment with the Wavefront Algorithm using Processing-in-Memory". In 2022 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW). IEEE.

If you find this project useful, please cite these papers.

Repository Structure

Each folder of this repository has the PIM implementations relative to the GenASM alignment algorithm. For each alignment algorithm, we provide two PIM implementations: (1) DPU-WRAM implementation stores the alignment data in the WRAM, and (2) DPU-MRAM implementation stores the alignment data in the MRAM and uses the WRAM as cache memory.

├───Datasets
└───GenASM
    ├───DPU-MRAM-DC
    ├───DPU-MRAM-filter
    ├───DPU-WRAM-DC
    └───DPU-WRAM-filter

Instructions

Prerequisites

AIM is designed to run on a server with a real UPMEM-PIM modules. However, the functional simulator included in the UPMEM SDK can be also used to run the implementations. The used SDK version in AIM is 2021.3.0.

Getting Started

Clone the repository:

git clone https://github.com/safaad/aim-genasm
cd aim-genasm

Running AIM

AIM provides a python script to run each PIM implementation run_*_pim.py. The script estimates the upper limit of the used WRAM and MRAM memory in order to determine the number of DPU threads needed NR_TASKLETS.It takes as an input features of the read pairs dataset such as read length, edit distance threshold, and the number of sequence pairs to align. Below is an example of running GenASM-Filter MRAM implementation (same method can be used for all versions) while enabling backtracing on a dataset with sequence length 100bp, ED=1%, and 40K sequence pairs:

cd GenASM/DPU-MRAM-filter

# Script usage
> python run-genasmfilter-pim-mram.py
> usage: run-genasmfilter-pim-mram.py [-h] -i INPUT [-o OUTPUT] -l READ_LENGTH [-e ERROR] -n NUMBER_READS [-m MATCH_COST]
                                    [-x MISMATCH_COST] [-g GAP_OPENING] [-a GAP_EXTENDING] [-k MAX_EDIT] [-t NR_OF_TASKLETS]
                                    [-d NR_OF_DPUS]
                           
# Example of running GenASM-filter MRAM implementation
python run-genasmfilter-pim-mram.py -i ../../Datasets/sample-l100-e1-40K.01 -l 100 -e 0.01 -n 40000 -d 2500

Note that this script uses heuristics to estimate the upper limit of the used WRAM and MRAM memory, so it might underestimate the NR_TASKLETS to avoid running out of memory.

Or, the user can compile and run these implementations manually but needs to determine the NR_TASKLETS and the WRAM_SEGMENT size assigned to each thread. Also, the sequence length, max edit distance, and the number of sequence pairs should be added at the compile and run time. For example:

cd GenASM/DPU-MRAM-filter

# Compile example
make NR_TASKLETS=19 NR_DPUS=2500 FLAGS="-DMAX_SCORE=1 -DREAD_SIZE=112 -DWRAM_SEGMENT=2122"

# Run Example
./build/host ../../Datasets/sample-l100-e1-40K.01 ./out 40000

Each line of the output file will contain the number of the aligned read-reference pair, the edit distance in case, and the CIGAR string if the backtracing is enabled.

Contact

For further questions and suggestions, feel free to reach out syd04@aub.edu.lb

References

About

AIM-GenASM is part of AIM, A Framework for High-throughput Sequence Alignment using Real Processing-in-Memory Systems..

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published