Biol425 2013: Difference between revisions

From QiuLab
Jump to navigation Jump to search
imported>Weigang
mNo edit summary
imported>Weigang
Line 45: Line 45:
*'''Tutorial:''' UNIX Account, Tools, & Emacs [Lecture Slides]
*'''Tutorial:''' UNIX Account, Tools, & Emacs [Lecture Slides]
*'''UNIX Tutorial:''' Please check the new '''[[#Useful Links]]''' section below
*'''UNIX Tutorial:''' Please check the new '''[[#Useful Links]]''' section below
*'''How to connect remotely:''' ([http://qiu.bioweb.hunter.cuny.edu/index.php?option=com_content&view=article&id=110 Windows]) ([http://qiu.bioweb.hunter.cuny.edu/index.php?option=com_content&view=article&id=111 Mac])
*'''How to connect remotely:''' ([http://qiu.bioweb.hunter.cuny.edu/index.php?option=com_content&view=article&id=110 Windows])  
* '''Homework: This homework will *not* be graded. It is for practice purposes ONLY.'''
{| class="collapsible collapsed wikitable"
|- style="background-color:lightsteelblue;"
! Assignment #1
|- style="background-color:powderblue;"
| '''Linux Proficiency'''<br />
#Display the absolute path of your home directory
#List files in your home directory in long format & ordered by their time stamps
#List files in the "/data/yoda/b/student.accounts/bio425_2011/" directory from your home directory
#Copy of the file "/data/yoda/b/student.accounts/bio425_2011/data/GBB.seq" into your home directory
#Count the number of lines in the file "GBB.seq"
#Show the first five lines of the file "GBB.seq" & save it to a file with arbitrary name
#Show your last ten commands using "history"
|-style="background-color:powderblue;"
| '''Read''' Chapter 1
|}


===February 6===
===February 6===
*'''Chapter 1.''' Central Dogma & Wet Lab Tools [[Media:Molecular_Biology_and_Genomics.pdf|Lecture Slides Ch.1-Che]]
*'''Chapter 1.''' Central Dogma & Wet Lab Tools [[Media:Molecular_Biology_and_Genomics.pdf|Lecture Slides Ch.1-Che]]
*'''Beginning Perl''' ([[Media:Bio425_beginning_perl.pdf‎|Beginning Perl, Part 1 Slides]])
*'''Beginning Perl''' ([[Media:Bio425_beginning_perl.pdf‎|Beginning Perl, Part 1 Slides]])
*'''Homework:''' (this assignment *will* be graded.)
{| class="collapsible collapsed wikitable"
|- style="background-color:lightsteelblue;"
! Assignment #2
|- style="background-color:powderblue;"
| '''Before you begin...'''<br />
Do this ONLY ONCE: <pre>echo "source /data/yoda/b/student.accounts/bio425_2011/bio425.profile" >> ~/.bash_profile</pre>
Alternatively, you can open ~/.bash_profile in a text editor (ask me if don't know how) and paste the line: <pre>source /data/yoda/b/student.accounts/bio425_2011/bio425.profile</pre> at the end.
|-style="background-color:powderblue;"
| '''Beginning Perl'''<br />
For the homework, read up to page 221 in Appendix 1. For February 26, read all of Appendix 1.
There are '''two choices''' for the homework. The first is recommended for novices. The second is for those who are either comfortable with Perl, or feel the need for a challenge this early. Only complete ONE of these assignments, as I will only accept one. Please follow the guidelines listed [[#Programming Assignment Expectations|above]].
# Copy the code from page 221 in a new file. (Remember to put the code from the slides in the beginning of the file and to declare all variables on first use!) You must alter the code so that the resulting program accomplishes the following four tasks:
##Instead of taking the average of 10 numbers, ask the user how many numbers to average and use that number instead. (Hint: see how the code asks for each number). This must be stored in a new variable.
##If the number the user gave was 0 or negative, print a message telling the user so, and exit immediately. You can exit using <pre>exit;</pre>
##The code always prints 'Enter another number:'. Change it so that on the '''first time only''' it instead prints 'Enter a number:'.
##Just before printing the average, print a message saying 'The numbers to average are: '. Then print out out all the numbers the user entered.
#More advanced programmers can try this assignment (you may wish to read all of Appendix 1 now): create a script which can take as input one or more DNA sequences from a file and translate directly to the correct amino acid sequence (single-letter format). You may implement this program in Perl however you wish, with as much complexity as you wish, as long as it meets the guidelines above and satisfies the following four criteria:
##The format of the input file it reads must be: one DNA sequence per line, so that each DNA sequence is separated by a new line character. '''Also assume you are given the coding strand.'''
##The name of the input file cannot be hard coded. You may either ask the user for the file location/name or take it as a command line argument.
##It must tolerate all upper-case, lower-case or mixed-case sequences in the input
##For every input DNA sequence, output the DNA sequence, the equivalent RNA, and the peptide sequence. The output '''must''' be informative, ie:
##:Input: atgcgtcgataa
##:Output: augcgucgauaa
##:Peptide: MRR*
#:Additionally, the program cannot use any outside dependencies/modules such as BioPerl (supposing you know how to use it.) Also note that STOP codons are denoted by a '<nowiki>*</nowiki>'
|-style="background-color:powderblue;"
| '''Problems'''<br />
(pg.31-32): 1.2, 1.3, 1.5,1.9, 1.10, 1.11
|}


===February 13===
===February 13===
'''Yozen will not be lecturing'''


*Chapter 6. Gene and Genome Structures [Lecture Slides [[Media:Chapter_6.pdf|Lecture Slides Ch.6-Che]]
*Chapter 6. Gene and Genome Structures [Lecture Slides [[Media:Chapter_6.pdf|Lecture Slides Ch.6-Che]]
*'''Tutorial:''' ORF Prediction using GLIMMER
*'''Tutorial:''' ORF Prediction using GLIMMER
* '''Homework:''' This homework will be graded.
* '''Homework:''' This homework will be graded.
{| class="collapsible collapsed wikitable"
 
|- style="background-color:lightsteelblue;"
! Assignment #3
|- style="background-color:powderblue;"
| '''Bacterial gene identification using Glimmer'''<br />
Remember to first log in to mysql by doing: <pre>ssh mysql</pre>
#Copy the Lyme disease bacterium lp17 plasmid file "/data/yoda/b/student.accounts/bio425_2011/data/lp17.fas" into your home directory.
#Run long-orf, extract, build-icm, and glimmer3.
#Show your commands and "cat" the final output.
#Describe key elements of a prokaryotic gene in addition to the open reading frame.
#Textbook Questions (pg152-153): 6.6, 6.9, 6.15
|-style="background-color:powderblue;"
| '''Read''' All of Appendix 1.
|}


===February 20 (No Class)===
===February 20 (No Class)===
Line 125: Line 63:
===February 27===
===February 27===
*Appendix 1. More PERL ([[Media:Bio425_more_perl.pdf|Lecture Slides]])
*Appendix 1. More PERL ([[Media:Bio425_more_perl.pdf|Lecture Slides]])
*'''Homework'''
{| class="collapsible collapsed wikitable"
|- style="background-color:lightsteelblue;"
! Assignment #4
|-style="background-color:powderblue;"
| '''Beginning Perl'''<br />
This time, both novices and experienced programmers do the same homework, with one small difference in the use of the program.
Recall from the first class where I introduced the FASTA-format. In this format, sequence data is recorded as follows:
<pre>>SequenceID_info1_info2
atgcgtgatg...</pre>
Of course, the ID portion is itself not standardized, and the sequence can also be an amino acid sequence. For simplicity, let's assume that in the ID field, you have a "Strain" name followed by a "protein" name, separated by an underscore (_). You will write a program to read a FASTA file with the ID format described above, and a nucleotide sequence. For both novice-level and experienced level programmers, your program will:
# Pick out the strain name, the protein name, and the nucleotide sequence.
# Calculate he length of each sequence.
# Calculate the GC content (in percent) of each sequence.
# Calculate the percent composition of each nucleotide (base composition).
'''Novice-level task:'''
Your program will just print the above information '''for all sequences''', in a readable form. Sample output could be:
<pre>Strain: B31
Protein: ospA
Seq Length: 819
GC content: 33.58%
Base composition: A 42.98 %, T 23.44 %, C 14.77 %, G 18.80 %</pre>
If your percentages have more than 2 decimal places, '''that's OK.'''
'''Experienced-level task:'''
The only difference from novices is that your program will '''ask the user for the name of a strain and protein, separated by an underscore''' (ie, B31_opsA). Once given that input, it will print the exact same output as above, but only for the sequence described by that input. If the input doesn't exist, it will say so and exit. Your program will '''continue to ask the user for the sequence ID''' until the user types 'quit' or they give an invalid sequence ID. You can do this by using a while loop.
'''Notes'''
Calculating the GC content and the base composition is easy if you make use of the tr (transliterate) function as described at the bottom of page 232, and divide the result by the sequence length. GC content is just the sum of total G and C nucleotides, divided by the sequence length. I do want '''percents''', so remember to multiply the results by 100 and to append a '%' at the end.
Getting the strain name and the protein name separately can be accomplished with the split() function (check new slides or search on the internet).
You will test your program the with the file /data/yoda/b/student.accounts/bio425_2011/data/Borrelia_osp.dna.fasta as input. You don't have to include the file itself with your homework, but I do still want you to copy the program output and submit it with your assignment.
Again, the program cannot use any outside dependencies/modules such as BioPerl (supposing you know how to use it.) Besides that, you can implement it however you like. If you know about references, '''it is possible to do this assignment without using them.'''
|}


===March 6===
===March 6===
Line 173: Line 68:
*Chapter 2. Data Search and Alignments [[Media:Chapter2.pdf|Lecture Slides Ch.2-Che]]
*Chapter 2. Data Search and Alignments [[Media:Chapter2.pdf|Lecture Slides Ch.2-Che]]
*Object-Oriented PERL & BioPerl (Link to [http://www.bioperl.org/wiki/Main_Page Bioperl] site and [http://www.bioperl.org/wiki/HOWTOs HOWTOs])
*Object-Oriented PERL & BioPerl (Link to [http://www.bioperl.org/wiki/Main_Page Bioperl] site and [http://www.bioperl.org/wiki/HOWTOs HOWTOs])
*'''Homework:'''
{| class="collapsible collapsed wikitable"
|- style="background-color:lightsteelblue;"
! Assignment #5
|-style="background-color:powderblue;"
| '''BioPerl Assignment'''
For this assignment, you will use the .predict file you made with glimmer in [[#February_19 | assignment 3]].
If connecting from home: open gedit '''before''' logging on to mysql.
For BioPerl to work, you '''must''' log on to mysql.
'''Complete the assignment by following these steps.''' Make sure each part works '''before''' trying to solve the next part:
# Make a perl script that reads each line from the .predict file that describes a gene (skip the heading line).
# Save each line ('''hint:''' array, anyone?)
# Now, in the same script, use '''Bio::SeqIO''' to read the lp17.fas file '''and get a Bio::Seq object.'''
# Go through each line saved from the .predict file. Remember: these are predicted orfs:
## For each of these, '''extract the start and stop positions and "strand" values''' (the three values following the orf name).
## If the strand starts with a '-', it means the orf is on the reverse complement, so you need to use the Bio::Seq method "revcom".
## Now, extract the orf sequence using the start & stop values using the Bio::Seq method "subseq", paying special attention to sequences on on the '-' strand.
## Print both the DNA sequence AND the protein sequence.
See these sample scripts for how to use revcom and subseq:
<pre>../bio425_2011/sample-perl-scripts/revcom_translate_seq.pl
../bio425_2011/sample-perl-scripts/subseq.pl
</pre>
And I linked to the HOWTO above in case you forgot.
'''Output should be informative:'''
<pre>
ORF: orf00002
DNA: ...
Protein: ...
</pre>
|-style="background-color:powderblue;"
| '''Read'''
'''For next class, read CH 3'''
|}


===March 13===
===March 13===
Line 235: Line 90:
*"Tree Thinking" Puzzles - ([http://diverge.hunter.cuny.edu/~weigang/lab-website/SummerWorkshop/Baum_etal05_sup_part1.pdf Download])
*"Tree Thinking" Puzzles - ([http://diverge.hunter.cuny.edu/~weigang/lab-website/SummerWorkshop/Baum_etal05_sup_part1.pdf Download])
*'''Tutorial:''' PROTDIST and NEIGHBOR using [http://mobyle.pasteur.fr/cgi-bin/portal.py#welcome Mobyle Pasteur]
*'''Tutorial:''' PROTDIST and NEIGHBOR using [http://mobyle.pasteur.fr/cgi-bin/portal.py#welcome Mobyle Pasteur]
{| class="collapsible collapsed wikitable"
|- style="background-color:lightsteelblue;"
! Assignment #6
|-style="background-color:powderblue;"
| '''Chapter 4 ''' Questions & Problems (pg.95-96): 4.1, 4.3, 4.4, 4.7, 4.8
|}


===April 17===
===April 17===
Line 251: Line 100:
*'''Topic:''' Relational Database and SQL
*'''Topic:''' Relational Database and SQL
*'''Tutorial:''' the Borrelia Genome Database
*'''Tutorial:''' the Borrelia Genome Database
*'''Homework:''' SQL-embedded PERL
{| class="collapsible collapsed wikitable"
|- style="background-color:lightsteelblue;"
! Assignment #7
|- style="background-color:powderblue;"
| '''SQL-embedded PERL'''<br />
Continue work on the assignment we began in class. It is reproduced below, with some added functionality.
Your script will:
# Retrieve TEN orfs from the orf table that belong to the strain Pko.
# Find and store the sequences described by those orfs and their lengths.
# Determine if the orf is on the reference or reverse complement strand, and use that information to print the correct sequence.
# Print the orf name, sequence, and the length for each orf.
# '''In addition to printing the above information to the screen,''' write out the sequence information '''(in FASTA format)''' to a file
called "Pko_orfs.fasta". The sequence ID should be of the form:
Pko_orfname
Note that the above will require the use of BioPerl.
For those looking for extra challenges, you can try adding the following:
* Ask the user for the strain and contig *names* that they want orfs from, and only retrieve those rows. This means you must find a way
of obtaining their respective IDs from just their names. Make sure the sequence IDs are informative. They should look like this:
strainname_contigname_orfname
* If asking users for input, fail if they gave a strain or contig name which does not exist in the database.
* Also if asking users for input, the output file's name should be changed to reflect the chosen strain.
* Ask the user the minimum length the orf is allowed to be, and only print orfs as long, or longer, than what the user specifies.
Sample scripts will go up slowly, over time, including example SQL statements.
|-style="background-color:powderblue;"
| '''Questions from Text''' <br /> (pg.115-116): 5.1, 5.3
|}


===May 1===
===May 1===
Line 293: Line 106:
===May 8===
===May 8===
*'''Topic:''' Statistics
*'''Topic:''' Statistics
*'''In-class exercise:''' [https://docs.google.com/document/d/1wq-s8WpqyURVeGiLUxhEyBvHRDrK__Cr7XjkuLicP-c/edit?hl=en&authkey=CJ2g4qsI R basics and short demonstration of a simple boxplot]
*'''In-class exercise:''' [https://docs.google.com/document/d/1wq-s8WpqyURVeGiLUxhEyBvHRDrK__Cr7XjkuLicP-c/edit?hl=en&authkey=CJ2g4qsI R basics  
*'''Tutorial:''' Statistical Visualization using R  [[Media:R-implementations.pdf|Lecture Slides-Che]]
<!--*Assignment #12. '''(To be posted)'''
R Exercises-->


===May 15===
===May 15===
Line 302: Line 112:
*'''Tutorial:''' Array Data Visualization and Analysis ([[Media:Array_Data_Visualization_and_Analysis.pdf| Micro-Array Analysis Slides]])
*'''Tutorial:''' Array Data Visualization and Analysis ([[Media:Array_Data_Visualization_and_Analysis.pdf| Micro-Array Analysis Slides]])
*'''Homework:'''Data Analysis using R
*'''Homework:'''Data Analysis using R
{| class="collapsible collapsed wikitable"
|- style="background-color:lightsteelblue;"
! Assignment #8
|-style="background-color:powderblue;"
| '''Part 1 Data Analysis:'''
For this assignment, you will use sample data to answer the question: '''Do men and women have different body temperatures?'''
The file '''temps.txt''' located in ../bio425_2011/data on eniac, contains body temperature data for a sample of adults.
Use a hypotheses test with α = .05 to answer the above question of interest.
NOTE: For this part of the assignment you will need to turn in your answer to the question with p-values in addition to the R syntax used. '''Indicate your null hypothesis'''.
'''Part 2 Gene Expression Data Analysis:'''
Using the files '''GSM129276_cy3.txt''' & '''GSM129276_cy5.txt''' located in ./bio425_2011/data on eniac, conduct an analysis to produce a histogram of fold changes.
In addition to the histogram, you will need to turn in the R syntax used in every step of the analysis in R, along with an explanation as to why the step was necessary.
|-style="background-color:powderblue;"
| '''Read'''
'''For next class, read CH 7'''
|}


===May 22 (Final Project Due)===
===May 22 (Final Project Due)===

Revision as of 07:00, 27 January 2013

Computational Molecular Biology (BIOL 425/790.49, Spring 2013)
Instructors: Weigang Qiu (Associate Professor of Biology) & Che Martin (Assistant)
Room:1000G HN (10th Floor, North Building, Computer Science Department, Linux Lab)
Hours: Wednesdays 10:10 am-12:40 pm
Office Hours: Room 839 HN; Wednesdays 5-7pm or by appointment
Contacts: Dr Qiu: weigang@genectr.hunter.cuny.edu, 212-772-5296; Che: cmartin@gc.cuny.edu, 917-684-0864

Course Description

  • Background: Biomedical research is becoming a high-throughput science. As a result, information technology plays an increasingly important role in biomedical discovery. Bioinformatics is a new interdisciplinary field formed between molecular biology and computer science.
  • Contents: This course will introduce both bioinformatics theories and practices. Topics include: database searching, sequence alignment, molecular phylogenetics, structure prediction, and microarray analysis. The course is held in a UNIX-based instructional lab specifically configured for bioinformatics applications. Each session consists of a first-half instruction on bioinformatics theories and a second-half session of hands-on exercises.
  • Learning Goals: Students be able to perform most common bioinformatics analysis in a biomedical research setting. Specifically, students will be able to
    • Approach biological questions evolutionarily ("Tree-thinking")
    • Evaluate and interpret computational results statistically ("Statistical-thinking")
    • Formulate informatics questions quantitatively and precisely ("Abstraction")
    • Design efficient procedures to solve problems ("Algorithm-thinking")
    • Manipulate high-volume textual data using UNIX tools, Perl/BioPerl, R, and Relational Database ("Data Visualization")
  • Pre-requisites: This 3-credit course is designed for upper-level undergraduates and graduate students. Prior experiences in the UNIX Operating System and at least one programming language are required. Hunter pre-requisites are CSCI132 (Practical Unix and Perl Programming) and BIOL300 (Biochemistry) or BIOL302 (Molecular Genetics), or permission by the instructor. Warning: This is a programming-based bioinformatics course. Working knowledge of UNIX and Perl is required for successful completion of the course.
  • Textbook: Krane & Raymer (2003). Fundamental Concepts of Bioinformatics. Pearson Education, Inc. (ISBN 0-8053-4633-3)
  • Academic Honesty: Hunter College regards acts of academic dishonesty (e.g., plagiarism, cheating on examinations, obtaining unfair advantage, and falsification of records and official documents) as serious offenses against the values of intellectual honesty. The College is committed to enforcing the CUNY Policy on Academic Integrity and will pursue cases of academic dishonesty according to the Hunter College Academic Integrity Procedures.
  • Grading Policy:
    • Treat assignments as take-home exams. Student performance will be evaluated by weekly assignments and projects. While these are take-home projects and students are allowed to work in groups and answers to some of the questions are provided in the back of the textbook, students are expected to compose the final short answers, computer commands, and code independently. There are virtually an unlimited number of ways to solve a computational problem, as are ways and personal styles to implement an algorithm. Writings and blocks of codes that are virtually exact copies between individual students will be investigated as possible cases of plagiarism (e.g., copies from the Internet, text book, or each other). In such a case, the instructor will hold closed-door exams for involved individuals. Zero credits will be given to ALL involved individuals if the instructor considers there is enough evidence for plagiarism. To avoid being investigated for plagiarism, Do NOT copy from others or let others copy your work.
    • Submit assignments in Printed Hard Copies. Email attachments will NOT be accepted. Each assignment will be graded based on timeliness (10%), completeness (30%), whether executable or having major errors (20%), correctness of the final output (20%), algorithm efficiency (10%), and cleanness and readability in programming styles (10%).
    • The grading scheme
      • Assignments (200 pts): 10 programming-based exercises.
      • Mid-term (50 pts).
      • Final Project (50 pts)
      • Classroom Q & A (30 pts): Active engagement in classroom exercises and discussions
      • Attendance (20 pts): 1-2 unexcused absences = 10; More than 2 = 0.
    • Programming Assignment Expectations:
      • Use a programming editor (e.g., vi or emacs) so you could have features like automatic syntax highlighting, indentation, and matching of quotes and parenthesis.
      • All PERL code must begin with "use strict; and use warnings;" statements. For each assignment, unless otherwise stated, I would like the full text of the source code. Since you cannot print using the text editor in the lab (even if you are connected from home), you must copy and paste the code into a word processor or a local text editor. If you are using a word processor, change the font to a fixed-width/monospace font. On Windows, this is usually Courier.
      • Also, unless otherwise stated, both the input and the output of the program must be submitted as well. This should also be in fixed-width font, and you should label it in such a way so that I know it is the program's input/output. This is so that I know that you've run the program, what data you have used, and what the program produced. If you are working from the lab, one option is to email the code to yourself, change the font, and then print it somewhere else as there is no printer in the lab.

Course Schedule (All Wednesdays)

January 30

  • Course Overview
  • Tutorial: UNIX Account, Tools, & Emacs [Lecture Slides]
  • UNIX Tutorial: Please check the new #Useful Links section below
  • How to connect remotely: (Windows)

February 6

February 13

  • Chapter 6. Gene and Genome Structures [Lecture Slides Lecture Slides Ch.6-Che
  • Tutorial: ORF Prediction using GLIMMER
  • Homework: This homework will be graded.


February 20 (No Class)

  • Monday Schedule

February 27

March 6

March 13

March 20 (Mid-Term Exam)

  • MID-TERM EXAM

March 27 (No Class)

Spring Break

April 3

  • MID-TERM

April 10

April 17

April 24

  • Topic: Relational Database and SQL
  • Tutorial: the Borrelia Genome Database

May 1

NO CLASSES (Spring recess)

May 8

May 15

  • Chapter 6 (Gene Expression) & Chapter 8 (Proteomics)
  • Tutorial: Array Data Visualization and Analysis ( Micro-Array Analysis Slides)
  • Homework:Data Analysis using R

May 22 (Final Project Due)

  • Chapter 7. Protein Structure Prediction
  • Final Project Due (TBA)

Useful Links

Unix Tutorials

Perl Help

  • Professor Stewart Weiss has taught CSCI132, a UNIX and Perl class. His slides go into much greater detail and are an invaluable resource. They can be found on his course page here.
  • Perl documentation at perldoc.perl.org. Besides that, running the perldoc command before either a function (with the -f option ie, perldoc -f substr) or a perl module (ie, perldoc Bio::Seq) can get you similar results without having to leave the terminal.

Bioperl

SQL

R Project

  • Install location and instructions for Windows
  • Install location and instructions for Mac OS X
  • For users of Ubuntu/Debian:
sudo apt-get install r-base-core
  • For users of Fedora/Red Hat:
su -
yum install R

Utilities

Other Resources


© Weigang Qiu, Hunter College, Last Update ~~