Skip to content

marcellobeltrami/rocketfasta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rocketfasta 🚀

Overview

The FASTA Parser is a command-line tool designed to process FASTA files, retrieve sequence headers, and extract sequences based on a specified reference ID.

Command-line Arguments

1. Input File (-i, --fasta-input)

  • Description: Specifies the path to the input FASTA file.
  • Usage: This argument is required for the program to run.
  • Syntax:
    -i <path_to_file> 
    --fasta-input <path_to_file>
  • Example:
    ./fasta_parser -i input.fasta

2. Print Headers (-H, --print-headers)

  • Description: A flag to print the headers of the FASTA sequences. When this option is specified, the program will display the headers from the input FASTA file.
  • Usage: This argument is optional and acts as a flag (no additional value required).
  • Syntax:
    -H 
    --print-headers
  • Example:
    ./fasta_parser -i input.fasta -H

3. Reference ID (-r, --reference-id)

  • Description: Specifies the ID of the reference sequence to be located in the FASTA file. The program will search for and operate on the sequence with the given reference ID.
  • Usage: This argument is optional but requires a string value corresponding to the reference ID.
  • Syntax:
    -r <reference_id>
    --reference-id <reference_id>
  • Example:
    ./fasta_parser -i input.fasta -r ref123

4. Se (-s, --subsequence-pattern)

  • Description: "A nucleotide sequence that you want to file in the fasta sequences of fasta file. Return BED style Start and End coordinates.
  • Usage: This argument is optional but requires a string value corresponding to the wanted subsequence to be searched.
  • Syntax:
    -s <nucleotide_sequence> 
    --subsequence-pattern <nucleotide_sequence>
  • Example:
    ./fasta_parser -i input.fasta -s ATGT

Usage Examples

Example 1: Parse a FASTA file and print all headers

./fasta_parser -i input.fasta -H

Example 2: Parse a FASTA file and find aligns the sequence with the ID provided to the other sequences in file.

./fasta_parser -i input.fasta -r ID_123

Example 3: Parse a FASTA file without additional options

./fasta_parser -i input.fasta

Exit Codes

  • 0: Program executed successfully.
  • 1: Missing required arguments or invalid input.

Notes

  • The input file must be in valid FASTA format.
  • The program ensures UTF-8 compliance for all input arguments.

Credits

Developed using the CLI11 library.

About

FASTA Parser CLI Tool developed in C++

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages