Skip to content

FASTA file processor is a CMake Project written in modern C++ and designed to take advantage of the new C++17 standard. It is designed to read and write FASTA files quickly and efficiently, and it can be used as a library or a stand-alone program. The project comes with a set of tests using the Catch2 framework.

Notifications You must be signed in to change notification settings

Mohamed-Nser-Said/ffp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ffp


Ubuntu CI Test MacOS CI Test Windows CI Test Deploy static content to Pages

Very Fast, limited FASTA file processor

This Project Requires:

  • C++20 or higher
  • CMake 3.16 or higher

Building

$ git clone https://github.com/Mohamed-Nser-Said/ffp.git ffp
$ cd ffp && mkdir build && cd build
$ cmake .. && cmake --build .

This Project features

  • Unit testing using Catch2, installed by CMake's FetchContent.
  • Libraries, executable and test code separated in distinct folders.
  • Use of modern CMake for building and compiling.

Usage samples

Basic usage

#include "fileio.h"


int main(){
    
    string FASTA_FILE_PATH="PATH/input.fasta" ;
    
    string PROTEIN_CSV_FILENAME = "/proteins.csv" ;
    string PEPTIDE_CSV_FILENAME = "/data/peptides.csv";
    string MAPPINGS_CSV_FILENAME = "/data/mappings.csv";

    // open the fasta file, if the file was not found, the program will terminate
    ifstream fasta_file = FileIO::openFastaFile(FASTA_FILE_PATH);

    // convert all the protein sequences in fasta file to 'Protein' objects and put them in a vector container
    vector<Protein> all_seq = FileIO::getProteinSequence(fasta_file);

    // close the original *.fasta file
    fasta_file.close();

    


    // creating protein csv file
    FileIO::writeProteinsCSV(PROTEIN_CSV_FILENAME, all_seq);

    // creating peptides csv file
    FileIO::writePeptidesCSV(PEPTIDE_CSV_FILENAME, all_seq);

    // creating mapping csv file
    FileIO::writeMappingsCSV(MAPPINGS_CSV_FILENAME, all_seq);




    return 0;
}

About

FASTA file processor is a CMake Project written in modern C++ and designed to take advantage of the new C++17 standard. It is designed to read and write FASTA files quickly and efficiently, and it can be used as a library or a stand-alone program. The project comes with a set of tests using the Catch2 framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published