Task Description: Implement DNA Analysis Functions
You are required to implement a function in C++ that calculates the GC content of a DNA sequence. The specific requirements are as follows:
Function Name: Create a function named get_gc_content that accepts a std::string representing a DNA sequence.
Function Logic:
The function should compute the GC content of the provided DNA sequence.
GC content is defined as the proportion of 'G' (Guanine) and 'C' (Cytosine) bases in the sequence.
The GC content should be returned as a decimal (e.g., for a sequence containing 3 G's and 1 C in a total length of 8 bases, the GC content should be 0.50).
Input Handling:
The function should handle both uppercase and lowercase characters. For example, both 'g' and 'G' should be counted as G, and both 'c' and 'C' should be counted as C.
Ignore any characters in the sequence that are not A, T, G, or C.
Return Value:
If the DNA sequence is empty or contains no valid nucleotides (A, T, G, C), the function should return 0.0.
File Structure:
Implement the get_gc_content function in the dna.cpp file located in the /app/ directory. Ensure you include the appropriate header guard in dna.h.
By completing this task, the provided test cases will pass, confirming that the GC content calculation is correct.