Bio 271 - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Bio 271

Description:

different students have different backgrounds ... Job control uses pretty much the same mechanism ... generally it works pretty well (but can be hard to repeat ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 29
Provided by: rgen
Category:
Tags: bio

less

Transcript and Presenter's Notes

Title: Bio 271


1
Bio 271
  • Lecture 1

2
Robert Gentleman
  • Office M1B20, Mayer Building at DFCI
  • Phone 617-632-5250
  • Email rgentlem_at_hsph.harvard.edu
  • Office Hours TBA
  • It is easiest to contact me by email

3
TA Jarek Harezlak
  • email jharezla_at_hsph.harvard.edu
  • Office hours TBA
  • Office TBA

4
The course
  • Approximately 14 two hour lectures that will
    introduce various concepts (computational)
  • Homework weekly assignments
  • you should spend approximately 3-4 hours on these
  • if it looks like it will take longer get help
    from either Jarek or me

5
Expectations
  • different students have different backgrounds
  • I dont expect all of you to turn in exactly the
    same thing those that have stronger backgrounds
    may in some cases do more
  • I will try to make sure that the grading is
    handled fairly

6
Evaluation
  • I want you to learn something
  • hopefully the homework assignments will provide
    enough information
  • if not (and if you decide not to come to class)
    then we will have a final exam

7
Main Part of Lecture 1
  • in this lecture we will go over some of the basic
    functional aspects of computers and how they work
  • some of the basic ideas are included in the
    handout (based on The Way Things Work).

8
How do computers work
  • Basic tasks
  • making bits
  • storing bits
  • processing bits
  • sending bits

9
Making bits
  • keyboard input
  • mouse
  • others?

10
Storing bits
  • types of storage
  • ram
  • hard-disk
  • tape/cdrom/dvd
  • memory card

11
Processing bits
  • the processor
  • how does it work?
  • where does the data come from and where does it
    go?
  • whats a bus?

12
Sending bits
  • what happens to the bits after we process them?
  • how do we send email?
  • how do computers communicate?

13
User Interactions
  • the operating system is a layer of abstraction
    that is applied to the basic computer
    architecture
  • users interact with the operating system and it
    handles most of the low level details
  • but, it isnt that smart, so we need to
    understand enough so that we dont tell it to do
    silly things

14
How do computers work?
  • cpu
  • memory
  • RAM
  • other (hard disk, cdrom, floppy)
  • peripheral devices
  • input devices

15
Multiusers/multiprocessors
  • Several users sharing one processor
  • job control
  • One user with multiple processors
  • threads, fork
  • Multiple users multiple processors

16
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?

17
User interfaces
  • on Unix systems (and old Msoft) the primary user
    interface is the shell
  • on Macintosh (and new Msoft) the primary user
    interface is a window system
  • Unix also supports window systems (and there are
    many different ones)

18
Window Systems
  • a window UI is generally intended to be intuitive
    and to allow users to point and click their way
    through complex tasks
  • generally it works pretty well (but can be hard
    to repeat what you just did)

19
The Shell
  • the shell is an interface that interprets a set
    of commands (which ones and what they mean
    depends on the shell being used)
  • modern shells can be programmed and provide a
    rich set of tools for interacting with the
    computer
  • they are not very intuitive for some definition
    of intuitive

20
Unix shells
  • there are many
  • shell-differences
  • you can find out your shell by typing
  • echo SHELL
  • the default on hsph is tcsh
  • you dont seem to be able to change it ?

21
Unix Shells
  • finding out about things
  • man xxx
  • apropos xxx
  • use google or other search engine
  • bash common on Linux and among the younger
    generation
  • you can change shells by typing the name of the
    new shell (not permanent)

22
Some Unix commands
  • Processes on Unix can either run in the
    foreground (you dont 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.

23
Grep
  • grep this searches its input (which may be a
    file) 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
    dont believe there is much in it
  • check out the man page.

24
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 (using a pipe)
  • Use ssh to go to hsph and then use ps and grep to
    find all netscape processes that are running.

25
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.

26
Emacs
  • Locate and start emacs on the PC
  • Try starting emacs on hsphwhat happens
  • create a file called myfirstday.tex
  • What information do you need?

27
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

28
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?
Write a Comment
User Comments (0)
About PowerShow.com