Write a perl program that calculates the at and gc content

Assignment Help Programming Languages
Reference no: EM13995981

Questions:

1. Explain the difference between a compiled language and an interpreted language, which one is Perl?

2. Write a Perl program that prints out all the even numbers from 0 to 20.Print this list 4 times, using while, until, do-until and for loops (so you need to use all 4 loop structures! Just to give you practice in using them). Also make sure to use the % function (don't just add 2!).

3. Write a Perl program that calculates the AT and GC content (i.e. the percentage of G and C, and the percentage of A and T) in a given sequence. You can make up your own dummy sequence and store it as a scalar variable for this question (no need to take it from a file here). Print out the results to a file called DNA_Statistics, the result should look something like this:

The GC content of the DNA sequence give is: 48.5%

The AT content of the DNA sequence give is: 51.5%

Here is a sample DNA sequence for you to use: ‘ACGTAGCGCGTAATAGGCGCCGCGTCAACGCATGACGATCGT'. But your code should work with ANY given DNA sequence! You can declare your sequence as a string in your code, i.e. no need to read it from a file.

4. Write a Perl program that checks if two DNA sequences given as user input are reverse complements to each other.

5. Write a Perl program (call it Ques5A.pl) that takes user entered lines from the keyboard and stores them in an array. When the user enters "quit", the program prints out all the lines sorted (ASCII order - i.e. a line starting with an "Ab..." would print out before one starting with "Ac..."). Now modify the program (call it Ques5B.pl) so it tells you how many lines have been entered, and then prints out only lines 2, 3, and 4.

6. Write a Perl program to read a file, and then print its lines in reverse order, the last line first. Create a dummy file and insert sequences or random text, to test your program with.

7. Ask the user for a list of sequence lengths, separated by whitespace (Example: 100 123 45 ...etc.). The sequence lengths will be stored in a string called $input.

a. Split the String $input and create an array.

b. Use the foreach loop to get the sum of all sequence lengths.

c. Print the average.

8. Write a program, called Convert, that asks a user for a temperature reading in Fahrenheit (F) and then returns the Celsius (C) equivalent, using the following formula:

C = (F - 32) / 1.8

Reference no: EM13995981

Questions Cloud

Research on kickstarter : Do some research on Kickstarter. What does the company do? Is it successful? Why won't they go public
Find the probability that a randomly selected cr-v : Find the probability that a randomly selected CR-V has a gas mileage below 27 miles per gallon and if the distribution of the gas mileage of the CR-V is approximately normal with a standard deviation of 4 miles per gallon.
Display an in-depth understanding of benchmarking : Evaluate the general adequacy of the major performance criteria used in the AHP article for assessing other organizations' logistics. Feel free to suggest additions to, or modifications of, the performance criteria if you believe these are inadequ..
What view of the earth does the gaia hypothesis offer : What is nature? What view of the Earth does the Gaia hypothesis offer? Why did (for some, does) the word "alive" provoke controversy
Write a perl program that calculates the at and gc content : Write a Perl program that calculates the AT and GC content (i.e. the percentage of G and C, and the percentage of A and T) in a given sequence.
How is the role of government likely to change : The paper must answer the following questions: How is the role of government likely to change? Will government be more or less involved in the health sector
Should developing societies have a carbon right : Write and turn in a one-paragraph response to the discussion questions: "Should developing societies have a carbon right to continue burning fossil fuels in order to make economic progress and become more prosperous
Determine the nature of globalization and cultures : Determine the nature of globalization, cultures, and labor markets, and assess the impact on human resource management (HRM) and identify human resource requirements and formulate supporting HRM plans that can improve productivity and contribute to t..
What fraction of baseballs kinetic energy is rotational : A 230 g baseball is pitched at 34 m/s spinning at 41 rad/s . You can treat the baseball as a uniform solid sphere of radius 4.5 cm What fraction of its kinetic energy is rotational?

Reviews

Write a Review

Programming Languages Questions & Answers

  Program-visual basic to compute tips for services rendered

Write a program in Visual Basic 2010 to compute tips for services rendered. The program should request the person's occupation, the amount of the bill and the percentage tip

  Create the program uses two arrays to hold employee names

Create the program which uses two arrays: one to hold employee names and one to hold employee salaries (standard US currency, two decimal points). The program must prompt user to enter employee names.

  Write a program to find a baseball players batting average

Write a program to find a baseball player's batting average. The program should ask the user to enter the number of times the player was at bat and the number of hits he got. It should then show his batting average to four decimal places.

  Create a multi-threaded competition

Create a multi-threaded competition

  Write a full program to convert seconds into hours

Write a full program (starting from #include) that takes as input the number of seconds after midnight and displays the time in hours.

  Write a program that can be used to assign seats for plane

Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with six seats in each row. Rows 1 and 2 are first class. 3-7 are business rows. 8-13 are economy rows

  Write pseudocode to accept candy name

Write a pseudocode for the following: A programm to accept a candy name (for exmple, "chocolate-covered blueberries'), price per pound, and number of pounds sold.

  Return boolean value true if string in array is palindrome

Write the recursive method testPalindrome which returns boolean value true if string stored in array is palindrome and false otherwise. Method must ignore spaces and punctuation in string.

  Implement a query functionality to the catalogue

Implement a query functionality to the Catalogue. This will return a list of Albums that match a given criteria. We specify the criteria as a search rule (based on a very simple query language) that is executed against all the Genres and albums in..

  Specific changes made for different countries-sites directed

Why were these specific changes made for different countries at whom the sites were directed? Is there anything else you would consider changing.

  Write a program that uses the curve class hierarchy

Write a program that uses the curve class hierarchy. The program should define several different objects, output their area, circumference, etc. It should also use the printcurve function.

  Write a program that takes three command-linearguments

Write a program that takes three command-linearguments number operator number and performs the required operation and prints the result on a single complete line in standard output.

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