Fill in Order Details

  • Submit paper details for free using our simple order form

Make Payment Securely

  • Add funds to your account. There are no upfront payments. The writer will only be paid once you have approved your paper

Writing Process

  • The best qualified expert writer is assigned to work on your order
  • Your paper is written to standard and delivered as per your instructions

Download your paper

  • Download the completed paper from your online account or your email
  • You can request a plagiarism and quality report along with your paper

Perl Program HOMEWORK 5

Perl Program HOMEWORK 5

 

Cite your references INSIDE your code if you use any (as comments), but this is not recommended. Any code used that is not yours and is not cited will be considered plagiarized and you will be given a zero on the Homework.

(All codes will be turned into Turnitin.comfor plagiarized check)

For each of these questions submit the .pl file, name the files based on the question they belong to, so Q1.pl, Q2.pl…etc

Also copy and paste all your code into a Word document, this I will submit to Turnitin.com.

 

For questions 8 and 9, use at least one subroutine when solving them. For Q8 and 9 you may use any module or subroutine from the book “Beginning Perl for Bioinformatics” or CPAN. For all other questions, no pre-existing modules or subroutines are allowed as usual.

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”;

print out:

The 20 bases upstream of ATG are AGAGAACCCCGCGCGCTCGC

Use a regular expression to match the desired substring.

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

Your output should look like:

sum = 59

ave = 11.80

max = 40

min = 2

Your code should work on any file containing different or more numbers than listed above (i.e. don’t just assume you have 5 numbers in a file).
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.

The data file may have any number of rows, but will always have 3 columns.
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 ..

Go to GenBank and download a set of 5-10 FASTA sequences to test your code.

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).

Hint: You only need to make small changes! The goal here is to see if you understood the code, you need to fully understand the code in the lecture notes and book before attempting to modify it to work for the new file.

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 mutatedshuffled, 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

An example of how the score is calculated is shown below:

Original: AGCCGTAGCT

Mutated:  AATGTACGAT
Score = 0-1-1-2-2-2-2+0-2+0 = -3
Note: A and G are purines while C and T are pyrimidines.

Print out the score for the user to see. Also print out the original and mutated sequences aligned base pair by base pair (i.e. the way Blast reports do it).

Note: Accept the file as a command line argument. You will also have to remove the comment line “>…etc.” before storing the sequence in your program.


WHAT OUR CURRENT CUSTOMERS SAY

  • Google
  • Sitejabber
  • Trustpilot
Zahraa S
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!
Mindi D
Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.
Samuel Y
Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.
Cindy L
Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!

ORDER NOW

CategoriesUncategorized

Consider Your Assignments Done

“All my friends and I are getting help from eliteacademicresearch. It’s every college student’s best kept secret!”

Jermaine Byrant
BSN

“I was apprehensive at first. But I must say it was a great experience and well worth the price. I got an A!”

Nicole Johnson
Finance & Economics

Our Top Experts

See Why Our Clients Hire Us Again And Again!


OVER

10.3k
Reviews

RATING
4.89/5
Average

YEARS
13
Mastery

Success Guarantee

When you order form the best, some of your greatest problems as a student are solved!

Reliable

Professional

Affordable

Quick

Using this writing service is legal and is not prohibited by any law, university or college policies. Services of Elite Academic Research are provided for research and study purposes only with the intent to help students improve their writing and academic experience. We do not condone or encourage cheating, academic dishonesty, or any form of plagiarism. Our original, plagiarism-free, zero-AI expert samples should only be used as references. It is your responsibility to cite any outside sources appropriately. This service will be useful for students looking for quick, reliable, and efficient online class-help on a variety of topics.