A very, VERY preliminary outline

PART1. LEARNING BASICS OF PERL

Class 1

  • Where to get Perl?
  • Where to run it - windows, Linux, OSX, biotech cluster?
  • Which text editor to use?
  • The dreaded new line symbols.
  • Basic UNIX commands.
  • Basic vi / vim commands - how to get context color on your screen
  • Basic Perl Punctuation.
  • Variables and Data Types. Basic I/O. Chapters 1,2.

Notes

Assignments:

  • Read handouts on variables, <>, and chomp
  • Read the above
  • Install ssh on your computer
  • log into your account at bbcxsrv1.biotech.uconn.edu
    (if you use ssh under windows go to the "profile" menu, add a profile, THEN edit the profile, THEN use the profile - this is somewhat backwards, but it works, in the future you only need to select the profile)
  • Once you logged in change your password. To do so type he command passwd <return>
  • start the vi editor and create a .vimrc file that allows you to use context dependent colors (see above)
  • ex1.1: Create first Perl Program- “hello, world!” [make file executable using chmod 755 *.pl]
    #!/usr/bin/perl -w
    print ("Hello, world!\n");
    What does the -w stand for? What happens if you leave out the new line character?
    You can run the program by typing ./program_name.pl, if the file containing the program is an executable.
  • ex1.2 modify the program so that it asks for your name and then greets you by a phrase like "hello $your_name.
  • ex2.1: Write a program that computes the circumference of a circle with a radius of 12.5. The circumference is 2[pi] times the radius, or about 2 times 3.141592654 times the radius.
  • ex2.2: Modify the program from the previous exercise to prompt for and accept a radius from the person running the program.
  • Email the programs as separate attachments to gogarten@uconn.edu (i.e. one email, with several independent files as attachments).

If you are stuck, send an email with description of your problem.

Class 2

Discussion of assignments and problems

Interpolation

 

Class 3

Control Structures. Boolean Operators.

 

Class 4

Lists and Arrays.

Assignments:

  • Write a program that calculates GC content of a sequence.

Class 5

Hashes Chapter 5

Assignments:

  • Write a program that counts all motifs occuring within a sequence.

Class 6

Input and Output.

Assignments:

  • Make FASTA-formatted file to have customized definition line

Class 7

String Manipulation. Pattern Matching. Chapter 7

Assignments:

·        Write a program that takes as input sequence file & file with known restriction enzymes and saves a report of which enzymes cut/do not cut the sequence.

PART 2. MAKING USE OF PERL FOR DAILY TASKS

 

Count how many sequences/trees in a file

 

Remove identical strings in a file (sequences, gi #s, whatever)

 

Add names to the deflines in FASTA files

 

Work with many files in a batch

 

Run external programs in a batch

 

Parse output of programs such PHYLIP, TREE-PUZZLE, BLAST