Write a perl program that given a dna string prints out the


1. Write a Perl program that given a DNA string, prints out the 20 characters upstream of the start codon ATG. That is, given:

$dna = "CCCCATAGAGATAGAGATAGAGAACCCCGCGCGCTCGCATGGGG";

2. Write a Perl subroutine that reads in a file containing two strings on each line, and creates a hash with the first string as key and second string as value. Test your subroutine on a file containingthe following lines (copy the text and paste it in notepad, and then save it). Your code should work with any size file, not just the one given!

color blue
shape round
weight 150
speed fast

3. Write a program that will predict the size of a population of organisms. The program should ask for the starting number of organisms, their average daily population increase (as a percentage), and the number of days they will multiply. For example, a population might begin with two organisms, have an average daily increase of 50 percent, and will be allowed to multiply for seven days. The program should use a loop to display the size of the population for each day. So for the previous example, the output should look like:

Day                        Organisms

-----------------------------

1                              2.0

2                              3.0

3                              4.5

4                              6.75

5                              10.125

6                              15.1875
7                              22.78125

4. Write a Perl program that adds up the numbers in a file and prints out their sum, average, max and min.  Assume that there is one number per line.  Print the average out showing two digits after the decimal point (Hint: look up the printf command).

Test your program with a file containing:

40

10

2

3

4

5. Write a Perl script to compute the average for each column of numbers in a file with the following format:

1 2 3
5 4 6
0 2 4
etc.

6. Write a Perl script to print out the GI numbers from each header in a FASTA file of sequences. Assume that the headers of the form:

>gi|1234567| more info ..

7. Modify the code in the lecture notes (and book) so that it parses the DNASIS restriction enzyme file (see attached - this is just a small sample of the file so you can test your code on) instead of the BIONET file (which was used in the lecture notes and book).

8. Next generation sequencing is used to sequence RNA samples to get accurate measurements of gene expression on a genomic scale. Write a Perl program that parses out the attached sequence read alignment file (6_perianth_A_filtered.SAM) to count how many reads a gene produced (a higher number indicates a gene that is highly expressed). You basically just have to count the number of times a gene ID (like gene29004) occurs in the given sequence. All lines starting with @ are comment lines and should be ignored. Print out the gene ID's and their counts once done. For instance if you find gene29004 mentioned 3 times while gene23457 6 times in the file, the output should be:

Gene ID:                                              Number of reads aligning:

gene29004                                          3
gene23457                                          6

9. Design a Perl program that takes the following DNA sequence file (test_seq.txt - see attached) and mutates it while maintaining the same base pair distribution (i.e. shuffles the base pairs). Once mutated\shuffled, find the similarity between the mutated and original DNA by calculating a score based on the following criteria:

If a purine was mutated to another purine --> -1

If a pyrimidine was mutated to a pyrimidine --> -1

If a purine was mutated to a pyrimidine or vice versa --> -2

If no change occurred --> 0.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a perl program that given a dna string prints out the
Reference No:- TGS01086564

Expected delivery within 24 Hours