Individual genes are substrings of a genome

Assignment Help C/C++ Programming
Reference no: EM13164643

The DNA molecule employs a 4-element code consisting of sequences of the following nucleotides: Adenine,
Guanine, Cytosine and Thymine. Biologists often use a letter sequence to represent the genome, in which each
letter stands for one of the four nucleotides. For example:

. . . AGTCTATGTATCTCGTT . . .

Individual genes are substrings of a genome delineated by 3-element start and stop codons. Genes begin with
the start codon ATG and end with one of the following 3 stop codons: TAG, TAA or TGA. Note that start codons
can appear anywhere in the string, followed by a series of 3-element codons and ending with a stop codon.
Note that genes are multiples of 3 in length and do not contain any of the triples ATG, TAG, TAA or TGA.

Write a program that will read in a genome and display all the genes in the genome. Your program must do the
following:
• Include a function named genes that will take two arguments: a string containing a DNA sequence
as described above plus an integer reference parameter, and return a dynamically-allocated array of
strings containing all the genes in the DNA sequence. Each string in the array will contain a unique
gene. The number of elements in the array should be exactly equal to the number of genes in the
sequence and the number of genes found should be returned using the function's reference argument.
• Include a main function that will solicit a DNA sequence string from the user, call the genes function
to obtain all the genes in the sequence and print each one on the console display.

[Hint: there are many ways to do this, but you may find it easiest to perform two "passes" of the sequence. A
first pass to determine how many genes there are, and a second to construct the individual gene strings]

Example:
Enter a DNA sequence: TCATGTGCCCAAGCTGACTATGGCCCAATAGCG
Gene 1 TGCCCAAGC
Gene 2 GCCCAA

Reference no: EM13164643

Questions Cloud

Dynamic character arrays : Dynamic character arrays str and add contain strings. Write a function append that uses str and add as arguments and appends add to the end of str. Write a main program that illustrates the use of function append to concatenate five strings.
Multiply a set of complex numbers : Write a C program to multiply a set of complex numbers stored in an array (that has been dynamically allocated). Specifically, first prompt the user to enter how many complex numbers need to be multiplied, dynamically create an array to store the ..
Afterwards a way for the user to input : And so on and so forth then afterwards a way for the user to input that they finished a particular task on the list. After the user has input that they have finished a particular task the program should be print "Good Job!" or "Keep it up!"
User enters a list of car parts : So if the user enters a list of car parts, the programm holds this list. Afterward, when the user types in the name of the part the programm outputs that name from the list.
Individual genes are substrings of a genome : Individual genes are substrings of a genome delineated by 3-element start and stop codons. Genes begin with the start codon ATG and end with one of the following 3 stop codons: TAG, TAA or TGA. Note that start codons can appear anywhere in the string..
Function that accepts a pointer to a c-string : Write a function that accepts a pointer to a C-string as an argument and returns the number of words contained in the string. Also have it display the average number of letters in each word.
Write a program that prompts the user to enter the accounts : The program should pass these values to a function that returns the future value of the account after the specified number of months. The program should display the accounts future value.
Create a 1-dimensional (1d) array : Write a program to create a 1-dimensional (1D) array that contains 15 characters and display to the screen a count of the occurrences of each of the vowels a, e, i, o, and u in the array.
. write a segment of code that prints the number of elements : Assuming the array x has been defined as: int x[n]; for some n and that values have been assigned to all the elements. Write a segment of code that prints the number of elements between (but not including) the largest and smallest values in the array..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create the appropriate constructor, getters and setters

Create the appropriate constructor, getters and setters for the class. Create an instance of Student for each of the students listed above from array. Construct the instance with lastname, firstname, and job.

  A run is a sequence of adjacent repeated val

A   run   is   a   sequence   of   adjacent   repeated   values.   Using   an   array,   write   a   program   that   generates   a   sequence   of

  Programs written with inheritance

Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

  Perform operations on arrays

Perform operations on arrays execute tests and repetitions

  Which of the following are valid case statements in a switch

What will following segment of code output? int x = 5; if (x != 2)      System,out.println( "This is true!"); else      System.out.println( "This is false!");      System.out.println("This is all folks!");

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implement a function to recursively

Implement a function to recursively determine if a word is a palindrome. A palindrome is a word, phrase, number, or other sequence of symbols or elements, whose meaning may be interpreted the same way in either forward or reverse direction.

  Draws a single level for a "rogue­like" computer game

You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the ..

  The two-dimensional array

1. Given the two-dimensional array declared by the following statement int myArray[4][3] = {{2,4,6},{1,8,10},{3,5,7},[9,11,13}}; what is the value of myArray[1][2]

  Determine order in which constructors of class will execute

Suppose that an object of class three enters its scope, so the constructors of theses classes will execute. Determine the order in which the constructors of these classes will execute.

  Write a c program which takes a string from command line

Write a c program which takes a string from command line with mainfunction has no parameter and convert the string in upperca

  Write an input validation loop

write an input validation loop that asks the user to enter a number in the range of 1 through 4.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd