Documentation

utils/data.h

Stores information about an RNA molecule: the sequence string containing bases in a sequence, and the dot bracket structure, which contains information about how the bases pair up.

struct Sequence

include/rnaFold.h

Reads the input sequence file and uses the ViennaRNA package to compute the dot bracket structure for the RNA sequence.

FILE* getRnaFoldOutput()

Reads the input file containing the RNA sequence. Runs the RNAfold command.

Parameters: (none)
Return: FILE* - the file stream variable.

struct Sequence getSequenceAndDotStructure(FILE* pipe)

Extracts the RNA sequence and the dot bracket structure from the output of the getRnaFoldOutput() function and creates a struct instance to store that information.

Parameters

Return: struct Sequence - the instance of the Sequence struct conataining the sequence string and the dot bracket structure.

struct Sequence getSequenceDetails()

Calls getSequenceAndDotStructure(FILE*) and returns the struct instance.

Parameters: (none)
Return: struct Sequence : the instance of the Sequence struct conataining the sequence string and the dot bracket structure.

include/predictStructure.h

Takes an RNA sequence as input and calculates the maximum number of pairs that are possible such that there are no sharp turns or knots.

void solve(const std::string& str)

Computes the maximum number of matching base pairs in an RNA sequence using dynamic programming. The function updates a DP table based on valid RNA base pair matches (A-U, U-A, G-C, C-G).

Parameters

Return: (none)

void makePairs(int i, int j)

Recursively reconstructs the matching base pairs from the DP table and stores them in a list of pairs.

Parameters

Return: (none)

void predict(struct Sequence seq)

Calls solve to fill the table, and makePairs to reconstruct the pairings, and finally outputs the results.

Parameters

Return: (none)

include/visualization.h

Produces a URL as an output to which the user can navigate to for visualizing the secondary structure of the RNA sequence.

std::string dotEncode(const std::string& value)

Converts the dot bracket structure into an encoded form that can be passed over a URL.

Parameters

Return: std::string - the encoded dot bracket string.

std::string getURL(std::string sequence, std::string dotStructure)

Generates the URL for visualizing the secondary structure of the RNA.

Parameters

Return: std::string - the visualization URL.

void visualize(struct Sequence seq)

calls the getURL(std::string, std:string) function that generates the URL.

Parameters

Return: (none)