Write a perl program that given a dna string

Assignment Help Programming Languages
Reference no: EM13806314

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.

Reference no: EM13806314

Questions Cloud

Cybersecurity research papersummary: : Cybersecurity Research PaperSummary: After selecting a topic from the approved list (see below), you will research a cybersecurity incident using news articles, magazine articles (trade press), journal articles, and/or technical reports from governme..
Discuss competition within intermodal transportation : Discuss competition within intermodal transportation. Points of discussion may include strategies, the impact of regulation/deregulation, competition between the various modes of transport, safety, rates, supply and demand, port ownership, equipme..
About teacher perceptions and expectations : Teacher Perceptions and Expectations
Why is it often difficult to organize collective action : What are public goods, and why is it often difficult to organize collective action to achieve them
Write a perl program that given a dna string : Write a Perl program that given a DNA string, prints out the 20 characters upstream of the start codon ATG
8-step negotiation model : Why is it useful to have an 8-step negotiation model? What are the consequences if a step is skipped?
How many are in your experimental value of g : What was the instantaneous velocity of the cart at x=4.00 meters assuming your value of the acceleration a is correct? Show your work.
Describe statistical methods of quality control : The idea that statistical methods of quality control, including six-sigma, does not prevent defects, is central to what alternative quality system
Write a paper about abortion, capital punishment and euthana : Write a paper about abortion, capital punishment and euthanasia. In the Explaining a Concept Paper, you will simply want to explain a concept of your choice, using research to support your explanations/definitions.

Reviews

Write a Review

Programming Languages Questions & Answers

  Design logic that continuously prompt user for numeric value

Design the logic for a program that continuously prompts a user for a numeric value until the user enters 0. The application passes the value in turn to a method that squares the number

  The code to implement a state diagram to recognize

The code to implement a state diagram to recognize one form of the comments of the C-based programming languages, those begin with /* and end with */.

  Write a program that reads the coordinates

Write a program that reads the (x,y) coordinates of a point in the Cartesian plane and prints a message telling in which quadrant, or on which axis (or axes) the point lies. The quadrants are labeled as follows:

  Write complete payroll program for a company

Now, write a complete PAYROLL program for a company in which each employee falls into one of the 3 categories - Administrative, FactoryEmployee or Salesperson.

  Design and implement set of classes to model employees

Design and implement a set of classes to model the employees of a hospital: doctor, nurse, administrator, etc. Include methods in each class.

  Write program which reads data into type integer

Write down the program which reads data into type int. Valid values are from 0 to 10. The program must find out how many values were inputted.

  Write web application that will give report of balance

Write the web application that will give a report of the balance held in a visitor's account during past several months.

  Object-oriented analysis and design

Object-Oriented Analysis and Design,  PART B-object-oriented design involves the steps 13-18:

  Write program which bounces blue ball inside jpanel

Write a program which bounces blue ball inside a JPanel. The ball must begin moving with a mousePressed event. When the ball hits the edge of the JPanel.

  Define function that takes year as it-s input argument

Define and call a function fast_food_billions that takes the year as it's input argument and returns the prediction as it's result. Tell the user that entry of a year before 2005 will cause the program to stop.

  Write a program that uses a random number generator

Write a program that uses a random number generator to generate a two digit positive integer

  Write a program to calculate diameter in centimeters

Write a program to compute the diameter in centimeters of steel rod, aluminum rod, adn copper rod, which can withstand a particular compression load.

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