Project 0

BIOL/CMPU 353 - Bioinformatics
Smith and Schwarz
Spring 2012

Tue., Jan 24

Hello DNA Land

The purpose of this in-class assignment is to access the CCAS cluster (jr) 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 jr.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@ccas20:~> 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@ccas20:~> 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@ccas20:~> mkdir bioinf
  • Protect your course directory by entering the following command:
  mlsmith@ccas20:~> chmod 700 bioinf
  • List your files and directories with the following command: (you should see bioinf listed among your files and directories)
  mlsmith@ccas20:~> ls
  • Next, change your current directory to the course directory:
  mlsmith@ccas20:~> cd bioinf
  mlsmith@ccas20:~/bioinf> 
  • 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@ccas20:~/bioin> pwd
  /home/mlsmith/bioinf
  mlsmith@ccas20:~/bioinf> 

3. Launch jEdit and type in your program

  • Find the jEdit icon on your Sci Vis Lab computer desktop and double-click it.
  • Install two plugins from the Plugins/Plugin Manager menu:
    • FTP (enables remote file editing)
    • BufferTabs (enables tabbed editing of multiple files)
  • 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 jr

  • 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: jr.vassar.edu
    • User name: mavassar (use your own login id here)
    • Password: 18B(ee)R61 (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 jr. Double-click on the bioinf folder to change to that directory.
  • We want to save your first script in a subdirectory of bioinf. 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 jr, go back to your ssh window.
  • You should still be in the bioinf 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@ccas20:~/bioinf> 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@ccas20:~/bioinf/proj0> perl helloDNA.pl
  Hello DNA Land
  mlsmith@ccas20:~/bioinf/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. Using jrun

You just ran your program on the head node of jr. This is the node that everyone logs into, and we want to make sure that we do not create a bottleneck by running programs on it. You can instead run your program on one of the back nodes by using the command “jrun”

  • try running your Hello DNA Land program using jrun:
  mlsmith@ccas20:~/bioinf/proj0> jrun perl helloDNA.pl

Use the jrun command every time that you want to run a program on jr.

7. 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@ccas20:~/bioinf/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 bioinf, and the second submits (copies) your entire proj0 subdirectory into the course drop box.
  mlsmith@ccas20:~/bioinf/proj0> cd ..
  mlsmith@ccas20:~/bioinf> submit353 proj0
courses/cs353-201201/assigns/lab01.txt · Last modified: 2012/01/12 12:37 by joschwarz
VCCS Top Events Extended Site Search Login Vassar Science Web Vassar Home Driven by DokuWiki Valid XHTML 1.0