130 likes | 364 Views
Bio 271. Lecture 1. Robert Gentleman. Office M1B28, Mayer Building at DFCI Phone: 617-632-5250 Email: rgentlem@hsph.harvard.edu Office Hours: TBA It is easiest to contact me by email. TA: Beiying Ding. email: bding@hsph.harvard.edu Office hours: TBA Office: TBA.
E N D
Bio 271 Lecture 1
Robert Gentleman • Office M1B28, Mayer Building at DFCI • Phone: 617-632-5250 • Email: rgentlem@hsph.harvard.edu • Office Hours: TBA • It is easiest to contact me by email
TA: Beiying Ding • email: bding@hsph.harvard.edu • Office hours: TBA • Office: TBA
How do computers work? • Memory • RAM • Harddisk • bus • peripheral devices
Multiusers/multiprocessors • Several users sharing one processor • job control • One user with multiple processors • threads, fork • Multiple users multiple processors
Memory concerns • If your job requires more memory than the computer has RAM then swapping/paging occurs • This is a relatively slow process • Job control uses pretty much the same mechanism • Why should you run jobs sequentially rather than concurrently?
Some Unix commands • Processes on Unix can either run in the foreground (you don’t get the prompt back) or in the background (you can go on while they execute). • Processes running in background are sometimes called batch jobs. • nice : a Unix command to use for background jobs.
Grep • grep this searches a file (or several files) for instances of a particular character string • you have a number of ways of expressing the character string (regular expressions) • grep comes in many flavors (egrep, fgrep) but I don’t believe there is much in it • check out the man page….
Job control • ps : a Unix command to tell you what processes are running. On many machines, but not hsph, top also runs. • ps combined with grep can let you see what is going on. • Use ssh to go to hsph and then use ps and grep to find all netscape processes that are running.
R and Word • Find R and start it on your computer. • Issue the command plot(rnorm(10), rnorm(10)) • Start Word with a new document. • Copy the plot to the Word document. • You might need to save it as a file and then open the file.
Emacs • Locate and start emacs on the PC • Try starting emacs on hsph…what happens • create a file called myfirstday.tex • What information do you need?
Finding things on Unix • find : a useful function, but some think hard to use • locate : a much simpler function • which : tells you which version of a command will run • On Windows, under the start button you should see a tab for Search
Try the following on HSPH • find /usr1/users/biostat/rgentlem/madman -name ‘*.R’ | xargs grep genefilter • what does this command do? • what does xargs do? • what does grep do?