Project 1

October 13th, 2009 | Tags: ,

Project 1 is now available in pdf here.  The project data can be found archived here (and in zip format).  You can also get the project and all the project data simply by pulling from the class git repository; the project files are in the c260/2009 subdirectory.  If you’ve already cloned the git repository:

git pull origin master

Or to clone the repository for the first time:

git clone http://www.doe-mbi.ucla.edu/~leec/c260.git

  1. nils
    October 16th, 2009 at 09:41
    Quote | #1

    An example of the contents of the makefile using the example “reader.c” as the source code is:

    gcc -o vfinder reader.c

    For simple programs that do not depend on other libraries it is of the format:

    gcc -o

    If you use the math library, you might need to include the “-lm” flag in the above command.

  2. Shaun Taylor
    October 16th, 2009 at 21:41
    Quote | #2

    Do we have a recommended value for the number of subdivisions in the integration?

  3. nils
    October 16th, 2009 at 21:53
    Quote | #3

    Shaun Taylor:
    Do we have a recommended value for the number of subdivisions in the integration?

    I would recommend at least 100 values. Try a few values (100, 150, 200, 500, …) and see if your results differ significantly (they should converge).

  4. Pengcheng
    October 17th, 2009 at 18:19
    Quote | #4

    Could you please show us how to write the vfinder file if we are using python?(assume the scripts name is “reader.py”)

  5. nils
    October 17th, 2009 at 18:34
    Quote | #5

    Pengcheng:
    Could you please show us how to write the vfinder file if we are using python?(assume the scripts name is “reader.py”)

    the content of vfinder should be:

    python reader.py

  6. Pengcheng
    October 17th, 2009 at 22:04
    Quote | #6

    Should our scrpits read from stdin or from files?

  7. nils
    October 17th, 2009 at 22:31
    Quote | #7

    Pengcheng:
    Should our scrpits read from stdin or from files?

    Read from the standard input stream.

  8. Pengcheng
    October 19th, 2009 at 10:32
    Quote | #8

    Dear nils,

    I guess you will use pipe to push input in our programs.

    Do you know how can we test that on Window python shell?(Is there a pipe?)

  9. nils
    October 19th, 2009 at 10:53
    Quote | #9

    I am not too familiar with the Window shell. Try some googling to figure it out. For example, here’s a link that may be of some use. It looks like piping is possible on the windows shell.

  10. Terence Honles
    October 19th, 2009 at 23:41
    Quote | #10

    Pengcheng:
    Dear nils,
    I guess you will use pipe to push input in our programs.
    Do you know how can we test that on Window python shell?(Is there a pipe?)

    just so you know you can also use

    vfinder < input.txt (instead of piping)

    (and yes the normal pipe works in windows, you just might need a program to pipe it from)

  11. Jeffrey Su
    October 20th, 2009 at 01:36
    Quote | #11

    I’m having some problems with the sample program. I found that DBL_MIN is the smallest absolute value capable of being represented by a double, not the most negative number. I used -HUGE_VAL instead.

  12. Matthew Pham
    October 20th, 2009 at 12:07
    Quote | #12

    Here are the expected values for the scores, as given by the last class’s TA. This can be found in comment 35 in last year’s post for project 1. I’m not sure how much, if anything, has changed from the last project.

    http://c260a.bioinformatics.ucla.edu/2008/10/09/project-1/#comments

    mjanis:
    If it helps, here are the values you should expect to get for the basic and advanced scores for each of the 10 files distributed (where m is set to 100):

    SEQreads_1.txt BASIC_SCORE=12.1358322998553
    SEQreads_1.txt ADV_SCORE=15.9536727709167


    SEQreads_2.txt BASIC_SCORE=2.16622220090319
    SEQreads_2.txt ADV_SCORE=2.81451280518341


    SEQreads_3.txt BASIC_SCORE=-5.66722910933476
    SEQreads_3.txt ADV_SCORE=-0.317186379936889


    SEQreads_4.txt BASIC_SCORE=5.32942768644965
    SEQreads_4.txt ADV_SCORE=7.08327851019736


    SEQreads_5.txt BASIC_SCORE=-4.74930168175192
    SEQreads_5.txt ADV_SCORE=-0.0049914060330476


    SEQreads_6.txt BASIC_SCORE=8.3225200225998
    SEQreads_6.txt ADV_SCORE=10.2860932719544


    SEQreads_7.txt BASIC_SCORE=12.465339751892
    SEQreads_7.txt ADV_SCORE=19.5370678220173


    SEQreads_8.txt BASIC_SCORE=-7.38929469274951
    SEQreads_8.txt ADV_SCORE=-1.47811407746564


    SEQreads_9.txt BASIC_SCORE=-2.73563978968599
    SEQreads_9.txt ADV_SCORE=3.05119518105957


    SEQreads_10.txt BASIC_SCORE=29.923354383088
    SEQreads_10.txt ADV_SCORE=43.2384520941543

  13. Matthew Pham
    October 20th, 2009 at 13:34
    Quote | #13

    Ran into this problem with Python 2.5:
    float(”-inf”) - float(”-inf”) = nan, when it’s expected to be 0.
    This messed up my AVSM scores.

  14. Jeffrey Su
    October 20th, 2009 at 16:30
    Quote | #14

    The spec says to have a file named “make” which is used to compile the program. Is that supposed to say “Makefile” or “make”? If it’s make, does that mean we write a shell script which calls gcc or g++?