How many contigs have a name that begins with the letters lp
How many contigs have a name that begins with the letters lp? How many contigs are not plasmids? What is the longest contig? How many ORFs begin after the first 150 positions of their contig? Which ORFs occupy at least 10% of the length of their contig? Which ORFs begin with a TC followed by 3 nucleotides and then followed by a TG? What are the names of the contigs that contain ORFs that begin with 2 Cs separated from each other by 2 nucleotides and then followed by a G? Which contigs contain ORFs that end in a T and C with one nucleotide between them? How many ORFs contain at least 4 A\'s followed immediately by at least 3 C\'s? #include using namespace std; void BasicTest(); void RelationTest(); void BinaryMathTest(); void MathAssignTest(); string boolString(bool convertMe); int main() { BasicTest(); RelationTest(); BinaryMathTest(); MathAssignTest(); } void BasicTest() { cout << \"\ ----- Testing basic fraction creation & printing\ \"; const fraction fr[] = {fraction(4, 8), fraction(-15,21), fraction(10), fraction(12, -3), fraction(), fraction(28, 6), fraction(0, 12)}; for (int i = 0; i < 7; i++){ cout << \"fraction [\" << i <<\"] = \" << fr[i] << endl; } } string boolString(bool convertMe) { if (convertMe) { return \"true\"; } else { return \"false\"; } } void RelationTest() { cout << \"\ ----- Testing relational operators between fractions\ \"; const fraction fr[] = {fraction(3, 6), fraction(1,2), fraction(-15,30), fraction(1,10), fraction(0,1), fraction(0,2)}; for (int i = 0; i < 5; i++) { cout << \"Comparing \" << fr[i] << \" to \" << fr[i+1] << endl; cout << \"\\tIs left < right? \" << boolString(fr[i] < fr[i+1]) << endl; cout << \"\\tIs left <= right? \" << boolString(fr[i] <= fr[i+1]) << endl; cout << \"\\tIs left > right? \" << boolString(fr[i] > fr[i+1]) << endl; cout << \"\\tIs left >= right? \" << boolString(fr[i] >= fr[i+1]) << endl; cout << \"\\tDoes left == right? \" << boolString(fr[i] == fr[i+1]) << endl; cout << \"\\tDoes left != right ? \" << boolString(fr[i] != fr[i+1]) << endl; } cout << \"\ ----- Testing relations between fractions and integers\ \"; fraction f(-3,6); int num = 2; cout << \"Comparing \" << f << \" to \" << num << endl; cout << \"\\tIs left < right? \" << boolString(f < num) << endl; cout << \"\\tIs left <= right? \" << boolString(f <= num) << endl; cout << \"\\tIs left > right? \" << boolString(f > num) << endl; cout << \"\\tIs left >= right? \" << boolString(f >= num) << endl; cout << \"\\tDoes left == right? \" << boolString(f == num) << endl; cout << \"\\tDoes left != right ? \" << boolString(f != num) << endl; fraction g(1,4); num = -3; cout << \"Comparing \" << num << \" to \" << g << endl; cout << \"\\tIs left < right? \" << boolString(num < g) << endl; cout << \"\\tIs left <= right? \" << boolString(num <= g) << endl; cout << \"\\tIs left > right? \" << boolString(num > g) << endl; cout << \"\\tIs left >= right? \" << boolString(num >= g) << endl; cout << \"\\tDoes left == right? \" << boolString(num == g) << endl; cout << \"\\tDoes left != right ? \" << boolString(num != g) << endl; }
Solution
#include