Problem Set: Perl II: Solutions

Solutions to Perl II Problem Sets================================ Perl_II Problem 1 (Jessen) Perl_II Problem 2 (Jessen) Perl_II Problem 3 (Jessen) Perl_II Problem 4 (Jessen) Perl_II Problem 5 (Jessen) Perl_II Problem 6 (Jessen) Perl_II Problem 7 (Jessen) Perl_II Problem 8 (Jessen) Perl_II Problem 9 (Jessen) Perl_II Problem 10 (Jessen) Perl_II Problem 11 (Jessen) Perl_II Problem 12 (Jessen)

Problem Set: Perl VIII

Perl VIII – Modules – Problem Set   1. Download and install a module using CPAN   $ cpan   CPAN should ask if you want to configure automatically. Say YES. Once it’s done configuring, you should get a cpan prompt like this:   cpan>   Type the following to install the module Math::Round:  … (read more)

Problem Set: Perl VII

Subroutines and Scope, Perl VII Problem Set Perl VII Problem Set ===================== 1. Create a subroutine that reverse complements a sequence. This subroutine should take a nucleotide sequence as a parameter and return the reverse complement.   Here’s the pseudo code:   — BEGIN PSEUDOCODE —   subroutine reverse_complement {   get the parameter nucleotide… (read more)

Review Code: Tab-delimited parsing

Input file for this code: test_data #!/usr/bin/perl # Takes a three-column, tab-delimited file and creates two hashes. # The keys for both hashes will be the items in the first column, # and the values will be the second and third column ############################################################### use warnings; use strict;   my $infile = shift @ARGV; my %institute;… (read more)

Problem Set: Perl V: Solutions

Solutions to Perl V Problem Sets ================================ Questions 1 & 2: perl5_1.2.pl (Steven) Questions 3 & 4: perl5_3.4.pl (Steven) Questions 5 & 6: perl5_5.6.pl (Steven) Question 7: perl5_7.pl (Steven)

Problem Set: Perl IV: Solutions

Solutions for Perl IV Problem Set: ====================================== Question 1: perl4_1.pl (Steven) Perl_IV.Q1_Solutions.pl (Jessen) Question 2: perl4_2.pl (Steven) Perl_IV.Q2_Solutions.pl (Jessen) Question 3: perl4_3.pl (Steven) Perl_IV.Q3_Solutions.pl (Jessen) Question 4: perl4_4.pl (Steven) Perl_IV.Q4_Solutions.pl (Jessen) Question 5: perl4_5a.pl (Steven) perl4_5b.pl (Steven) Use this file with perl4_5b.pl: Perl_IV.fasta_aln perl4_5.pl Perl_IV.Q5_Solutions.pl (Jessen) Question 6: perl4_6.pl (Steven) Perl_IV.Q6_Solutions.pl (Jessen) Question 7: perl4_7.pl (Steven)… (read more)

Lecture Code: Perl V: Hashes

#!/usr/bin/perl use warnings; use strict; use Data::Dumper;   ## create a hash all at once my %genetic_code = ( "ATG" => "Met", "AAA" => "Lys", "CCA" => "Pro", );   ## print a singe key/value pair print "Before/ATG: " , $genetic_code{"ATG"} ,"\n";   ##print out the entire hash one key/value pair at a time foreach… (read more)