Perl
Write a program to calculate the reverse complement of a strand of DNA. Do not # use the s/// or the tr functions. Use the substr function, and examine each base one at # a time in the original while you build up the reverse complement. (Hint: you might # find it easier to examine the original right to left, rather than left to right, although # either is possible.)
#!/usr/bin/perl -w # Calculating the reverse complement of a strand of DNA # The DNA $DNA = 'ACGGGAGGACGGGAAAATTACTACGGCATTAGC'; # Print the DNA onto the screen print "Here is the starting DNA:\n\n"; print "$DNA\n\n"; # Calculate the reverse complement # # First, copy the DNA into new variable $revcom # $revcom = reverse $DNA; # # Next substitute all bases by their complements, # A->T, T->A, G->C, C->G # $revcom =~ s/A/T/g; $revcom =~ s/T/A/g; $revcom =~ s/G/C/g; $revcom =~ s/C/G/g; # Print the reverse complement DNA onto the screen print "Here is the reverse complement DNA:\n\n"; print "$revcom\n"; # # Oh-oh, that didn't work right! # Our reverse complement should have all the bases in it, since the # original DNA had all the bases--but ours only has A and G! # # Do you see why? # # The problem is that the first two substitute commands above change # all the A's to T's (so there are no A's) and then all the # T's to A's (so all the original A's and T's are all now A's). # Same thing happens to the G's and C's all turning into G's. # print "\nThat was a bad algorithm, and the reverse complement was wrong!\n"; print "Try again ... \n\n"; # Make a new copy of the DNA (see why we saved the original?) $revcom = reverse $DNA; # See the text for a discussion of tr/// $revcom =~ tr/ACGTacgt/TGCAtgca/; # Print the reverse complement DNA onto the screen print "Here is the reverse complement DNA:\n\n"; print "$revcom\n"; print "\nThis time it worked!\n\n"; exit;
Perl Write a program to calculate the reverse complement of a strand of DNA. Do not...
help me answer these-
One strand of a section of DNA Isolated from the bacterium E. cow reads: answer all parts 5- GTAAGCTACGGATAGG -3 A. Suppose that an mRNA is transcribed from this DNA using the complementary strand as a template meaning this is the coding strand). What will be the sequence of the mRNA in this region (make sure you label the 5 and 3' ends of the mRNA)? B. How many different peptides could potentially be made from...
This PCR step is called annealing. The annealing step follows the denaturation step: it is usually the lowest temperature in the PCR. The temperature of this step varies with each PCR reaction because each primer has its own sequence and may not be an identical match to the DNA template strand. GC or CG have three hydrogen bonds and AT or TA have two hydrogen bonds. Higher annealing temperatures are more stringent and require a better match between primer and...
I need help programming this program in C. 1.) Write a program that reads a message, then checks whether it's a palindrome (the letters in the message are the same from left to right as from right to left), example is shown below: Enter a message: He lived as a devil, eh? Palindrome Enter a message: Madam, I am Adam. Not a Palindrome 2.) Ignore all characters that aren't letters. Use integer variables to keep track of positions in the...
ASSIGNMENT For the DNA sequence given below, write the complementary DNA sequence that would complete the double-strand. DNA 3’—A T T G C T T A C T T G C A T -- 5’ DNA 5’-- Does it matter which strand is the ‘code strand’? The following two sequences look identical, except one runs 3’-5’ and the other 5’-3’. For each DNA sequence given below, write the mRNA sequence that would be coded from it. Make sure you indicate the direction of each mRNA strand (i.e. 3’ and 5’ ends). Use the Universal triplet code to...
How
do your write this in Matlab.
Create a program that takes as input: An integer nFunction that is either 1 or 2 indicating which of the two functions below to nsc * An integer n in [1.oc) indicating how many data points (ro."). ·The left endpoint a of an overall interval. (n泓) tote. The right endpoint b of an overall interval Your program should find the interpolating polynomial of degree less than or equal to of the requested function...
Write this Game of Life program in Java. The Game of Life is a well-known mathematical game that gives rise to amazingly complex behavior, although it can be specified by a few simple rules. Here are the rules. The game is played on a rectangular board. Each square can be either empty or occupied. At the beginning, you can specify empty and occupied cells using 1's and 0's; then the game runs automatically. In each generation, the next generation is...
Write a JAVA program with methods that initializes an array with 20 random integers between 1 and 50 and then prints four lines of output, containing 1)The initialized array. 2)Every element at an even index. 3)Every even element. 4)All elements in reverse order. Requirements (and hints): 1. Build a method that takes any integer array as input and prints the elements of the array. ALL printing in this lab must be done using a call to the printArray method and...
Write this Game of Life program in Java. The Game of Life is a well-known mathematical game that gives rise to amazingly complex behavior, although it can be specified by a few simple rules. Here are the rules. The game is played on a rectangular board. Each square can be either empty or occupied. At the beginning, you can specify empty and occupied cells using 1's and 0's; then the game runs automatically. In each generation, the next generation is...
Help C++ Write a string class. To avoid conflicts with other similarly named classes, we will call our version MyString. This object is designed to make working with sequences of characters a little more convenient and less error-prone than handling raw c-strings, (although it will be implemented as a c-string behind the scenes). The MyString class will handle constructing strings, reading/printing, and accessing characters. In addition, the MyString object will have the ability to make a full deep-copy of itself...
Edit, compile, and run the following programs on the UNIX shell: Write a program that takes in six commandline arguments and has four functions (described below) that use bitwise operators. The user should enter six space-separated commandline arguments: four characters (any ASCII character) followed by two integers. Anything else should print an error message telling the user what the correct input is and end the program. Convert the commandline input into "unsigned char" and "unsigned int" datatypes. Be careful with...