Project 0

BIOL/CMPU 353 - Bioinformatics Smith and Schwarz Fall 2008

Mon, Sep. 8

Hello DNA Land

The purpose of this in-class assignment is to access the bioinf cluster using your new login account, create and run a Perl script, submit your work electronically and print a hardcopy.

1. First secure-shell (ssh) login

  • From a Windows computer in the Sci Vis Lab, find the ssh icon on the desktop and double-click on it.
  • Open a connection to bioinf.cs.vassar.edu and fill in your login id and password.
  • Enter the passwd command at the Linux prompt to change your password. Be sure to choose a good (secure) password:
  mlsmith@n1:~> passwd
  Changing password for mlsmith.
  Old Password: 
  New Password:
  New Password:
  • Logout and login again to test your new password. Use the exit command to logout:
  mlsmith@n1:~> exit

2. Create and protect your course directory

  • Once you’re logged in again, create a course directory by entering the following command at the Linux prompt:
  mlsmith@n1:~> mkdir bioinformatics
  • Protect your course directory by entering the following command:
  mlsmith@n1:~> chmod 700 bioinformatics
  • List your files and directories with the following command: (you should see bioinformatics listed among your files and directories)
  mlsmith@n1:~> ls
  • Next, change your current directory to the course directory:
  mlsmith@n1:~> cd bioinformatics
  mlsmith@n1:~/bioinformatics> 
  • Notice how your prompt changes when you change directories, always indicating your current directory. The tilde (~) is an abbreviation for your home directory. If you want to see the fully qualified path of your working directory, enter the pwd command:
  mlsmith@n1:~/bioinformatics> pwd
  /home/mlsmith/bioinformatics
  mlsmith@n1:~/bioinformatics> 

3. Launch jEdit and type in your program

  • Find the jEdit icon on your Sci Vis Lab computer desktop and double-click it.
  • Type in your program, as shown below (be sure to type your own name instead of Matthew Vassar’s):
#!/usr/bin/perl
#use strict; 
#use warnings;
 
# This is my first Perl program
# Programmer: Matthew Vassar
 
print "Hello DNA Land\n";

4. Save your program on bioinf

  • From the jEdit menu bar, select Plugins / FTP / Save to Secure FTP Server...
  • A dialog window will appear titled “Connect to Secure FTP Server”. Fill in the following three fields:
    • Remote host: bioinf.cs.vassar.edu
    • User name: mavassar (use your own login id here)
    • Password: 18(BeeR)61 (and your own secure password)
  • Be sure the “Save Password” checkbox is NOT checked, then press the “OK” button.
  • From the “File System Browser” dialog, you’ll see your home directory on bioinf. Double-click on the bioinformatics folder to change to that directory.
  • We want to save your first script in a subdirectory of bioinformatics. To create a new subdirectory, click the rightmost button on the button bar of the “File System Browser”–it looks like a file folder with a plus sign (+) in its upper right corner. When prompted for the name of the new directory, enter proj0 and click the OK button.
  • Double click on the proj0 subdirectory you just created. Enter the file name to save your program under: helloDNA.pl (the .pl file extension is the naming convention for a Perl script)
  • Click the Save button. On the message bar at the bottom of the jEdit window you should see:

“Input/Output complete”

5. Run your program from your ssh connection

  • Now that you saved your program on bioinf, go back to your ssh window.
  • You should still be in the bioinformatics course directory you created, but if you list the files in it (by entering the ls command), you’ll see the proj0 subdirectory you created in jEdit.
  • Change directories once more to the proj0 subdirectory:
  mlsmith@n1:~/bioinformatics> cd proj0
  • List the files in the proj0 subdirectory–you should now see helloDNA.pl.
  • Okay, time to run your first Perl program! Type the following command, you should see similar output:
  mlsmith@n1:~/bioinformatics/proj0> perl helloDNA.pl
  Hello DNA Land
  mlsmith@n1:~/bioinformatics/proj0> 
  • If you see output similar to the above, congratulations! :-)
  • If you don’t see similar output, or if an error is indicated, go back and compare what you typed into jEdit with the sample code given above. Look very closely for any discrepancy.

6. Print your program and submit it electronically

  • From jEdit, print your program by selecting File / Print... from the menu options.
  • From your ssh connection, use the lpr (line printer) command to print your file:
  mlsmith@n1:~/bioinformatics/proj0> lpr helloDNA.pl
  • Retrieve both copies of your printout from the printer in the Sci Vis Lab. Make sure the printout you pick up is your own! (That’s one reason to put your name in the program’s comment header.)
  • To submit electronically, again from your ssh connection, enter the following commands: (the first changes your current directory back to bioinformatics, and the second submits (copies) your entire proj0 subdirectory into the course drop box.
  mlsmith@n1:~/bioinformatics/proj0> cd ..
  mlsmith@n1:~/bioinformatics> submit353 proj0
courses/cs353-200803/assigns/lab01.txt · Last modified: 2008/09/02 13:57 by mlsmith
VCCS Top Events Extended Site Search Vassar Science Web Vassar Home Driven by DokuWiki Valid XHTML 1.0