Biol425 2013: Difference between revisions

From QiuLab
Jump to navigation Jump to search
imported>Weigang
mNo edit summary
imported>Weigang
 
(192 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
<center>'''Computational Molecular Biology''' (BIOL 425/790.49, Spring 2013)</center>
<center>'''Computational Molecular Biology''' (BIOL 425/790.49, Spring 2013)</center>
<center>'''Instructors:''' Weigang Qiu (Associate Professor of Biology) & Che Martin (Assistant)</center>
<center>'''Instructors:''' Weigang Qiu (Associate Professor of Biology) & Che Martin (Assistant)</center>
<center>'''Room:'''1000G HN (10th Floor, North Building, Computer Science Department, Linux Lab)</center>
<center>'''Room:'''1000G HN (10th Floor, North Building, Computer Science Department, [http://www.geography.hunter.cuny.edu/tbw/CS.Linux.Lab.FAQ/department_of_computer_science.faq.htm Linux Lab FAQ])</center>
<center>'''Hours:''' Wednesdays 10:10 am-12:40 pm </center>
<center>'''Hours:''' Wednesdays 10:10 am-12:40 pm </center>
<center>'''Office Hours:''' Room 839 HN; Wednesdays 5-7pm or by appointment</center>
<center>'''Office Hours:''' Room 839 HN; Wednesdays 5-7pm or by appointment</center>
<center>'''Contacts:''' Dr Qiu: weigang@genectr.hunter.cuny.edu, 212-772-5296; Che: cmartin@gc.cuny.edu, 917-684-0864</center>
<center>'''Contacts:''' Dr Qiu: weigang@genectr.hunter.cuny.edu, 212-772-5296; Che: cmartin@gc.cuny.edu, 917-684-0864</center>
<center><font color="red">'''Attention:''' Fill out your online [http://www.hunter.cuny.edu/te Teacher's Evaluation] for Spring 2013, available April 15-May16</font></center>
----
----
==Course Description==
==General Information==
 
===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.
* '''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.  
* '''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.  
* '''Problem-based Learning (PBL):'''  For each session, students will work in groups to solve a set of bioinformatics problems. Instructor will serve as the facilitator rather than a lecturer. Evaluation of student performance include both active participation in the classroom work as well as quality of assignments (see [[#Grading Policy]]).
 
* '''Learning Goals:''' After competing the course, students should be able to perform most common bioinformatics analysis in a biomedical research setting. Specifically, students will be able to
* '''Learning Goals:''' Students be able to perform most common bioinformatics analysis in a biomedical research setting. Specifically, to be able to
** Approach biological questions evolutionarily ("Tree-thinking")
** Approach biological questions evolutionarily ("Tree-thinking")
** Evaluate and interpret computational results statistically ("Statistical-thinking")
** Evaluate and interpret computational results statistically ("Statistical-thinking")
Line 19: Line 18:
** Design efficient procedures to solve problems ("Algorithm-thinking")
** Design efficient procedures to solve problems ("Algorithm-thinking")
** Manipulate high-volume textual data using UNIX tools, Perl/BioPerl, R, and Relational Database ("Data Visualization")
** 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.'''
* '''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 success completion of the course.'''
 
* '''Textbook:''' Krane & Raymer (2003). ''Fundamental Concepts of Bioinformatics''. Pearson Education, Inc. (ISBN 0-8053-4633-3)
* '''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.


* '''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, <u>Do NOT copy from others or let others copy your work</u>.
* '''Submit assignments in Printed Hard Copies.''' Email attachments will NOT be accepted. Each assignment will be graded based on timeliness (10%), whether executable or having major errors (50%), algorithm efficiency (10%), and readability in programming styles (30%, see [[#Assignment Expectations]]).
* '''The grading scheme'''
** Assignments (100 pts): 10 exercises.
** Mid-term (50 pts).
** Final Project (50 pts)
** Classroom performance (50 pts): Active engagement in classroom exercises and discussions
** Attendance (50 pts): 1 unexcused absences = 40; 2 absences = 30; More than 2 = 0.


* '''Grading Policy:'''
===Assignment Expectations===
** '''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 & Do Not Let Others Copy Your Work.
* 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.
** '''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%).
* 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'''.
** '''The grading scheme'''
* 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.
*** Assignments (200 pts): 10 programming-based exercises.
* <u>[[Media: template-basic.png|Recommended Style]]</u>
*** Mid-term (50 pts).
* <u>[[Media: bad-submission.png| Bad Style]]</u>
*** 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)==
==Course Schedule (All Wednesdays)==


===January 30===
===January 30. Browse Genome & Transcriptome Files with Unix Tools===
*Course Overview
* Course Overview
*'''Tutorial:''' UNIX Account, Tools, & Emacs [Lecture Slides]
* Learning Goal: The power of Unix text filters
*'''UNIX Tutorial:''' Please check the new '''[[#Useful Links]]''' section below
* In-Class Exercises:
*'''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])
# You will need these 2 files for the following questions: <code>/data/biocs/b/bio425/data/GBB.1con, GBB.seq</code>
* '''Homework: This homework will *not* be graded. It is for practice purposes ONLY.'''
## What is a genome? What does a bacterial genome typically consist of? Explain the following terms: chromosome, plasmids, and contig
{| class="collapsible collapsed wikitable"
## Specify the FASTA file format
## What is the size of the ''Borrelia burgdorferi'' (the Lyme disease pathogen) B31 genome in terms of
### Number of replicons: From your home directory, run:<br \> <pre pre style="white-space: pre-wrap;">grep -c "^>" ../../bio425/data/GBB.1con [Answer: N=22 replicons] </pre>
### Number of genes: From your home directory, run:<br \> <pre pre style="white-space: pre-wrap;">grep -c "^>" ../../bio425/data/GBB.seq [Answer: N=1,738 genes] </pre>
### Number of bases: First filter out FASTA headers using "grep -v" and then remove newline characters using "tr -d":<br /><pre pre style="white-space: pre-wrap;">grep -v "^>" ../../bio425/data/GBB.1con | tr -d '\n' | wc -m [Answer: N=1,519,856 bases] </pre>
# Based on the file <code>/data/biocs/b/bio425/data/ge-breast-cancer-cell-lines.dat</code>, answer the following questions:
## What is a transcriptome?
## How many unique genes are represented in this chip? <br \><pre pre style="white-space: pre-wrap;">cut -f1 ../../bio425/data/ge-breast-cancer-cell-lines.dat | grep -vc "^Description" [Answer: N=18,900 genes]</pre>
## How many cell lines in the file? <br \><pre pre style="white-space: pre-wrap;">grep "^Description" ../../bio425/data/ge-breast-cancer-cell-lines.dat| cut -f2- | wc -w [Answer: N=59 cells]</pre>
## Extract gene expression values at 3 breast cancer clinical markers: ERBB2, ESR1, and PGR<br \><pre pre style="white-space: pre-wrap;">grep -wP "ERBB2|ESR1|PGR" ../../bio425/data/ge-breast-cancer-cell-lines.dat [You should see 3 rows of gene expression values]</pre>
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
|- style="background-color:lightsteelblue;"
! Assignment #1
! Assignment #1 (Final Version; Q4 file name corrected)
|- style="background-color:powderblue;"
|- style="background-color:powderblue;"
| '''Linux Proficiency'''<br />
| '''Unix Text Filters'''<br />
#Display the absolute path of your home directory
#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 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
#List files and directories in the "/data/biocs/b/bio425/" 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 plasmids in the ''B. burgdorferi'' genome using the file "/data/biocs/b/bio425/GBB.1con"
#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 the first five lines of the file "GBB.seq" & save it to a file with arbitrary name
#Show your last ten commands using "history"
#Show your last ten commands using "history"
Line 64: Line 72:
|}
|}


===February 6===
----
*'''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]])
===February 6. Central Dogma with PERL (Part 1) ===
*'''Homework:''' (this assignment *will* be graded.)
* Learning goals:
{| class="collapsible collapsed wikitable"
# DNA Replication and Transcription
# String manipulations using BASH & PERL
* In-Class Exercises:
# Find out base composition (%A, %T, %C, and %G) of a DNA sequence
## In the folder <code>/data/biocs/b/bio425/data/GBB.1con-splitted</code>, the whole ''B. burgdorferi'' genome has been splitted into files each of which containing a single replicon. Write a short BASH script to count how many bases in each replicon.<pre pre style="white-space: pre-wrap;">for f in ../../bio425/data/GBB.1con-splitted/*.fas; do echo -ne "$f\t"; grep -v "^>" $f | tr -d "\n" | wc -m; done</pre>
## Write a PERL script to count GC% given a FASTA sequence.<pre style="white-space: pre-wrap;">Script posted at /data/biocs/b/bio425/scripts/gc-counter.pl</pre>
## Run the GC-counter for each replicon using a BASH loop. <pre style="white-space: pre-wrap;">for f in ../../bio425/data/GBB.1con-splitted/*.fas; do perl /data/biocs/b/bio425/scripts/gc-counter.pl $f; done</pre>
# Central Dogma
## Illustrate the Central Dogma using lines representing DNA/RNA/Protein. Indicate directionality of all parts.<pre pre style="white-space: pre-wrap;">DNA replication, Transcription & Translation: all 5' to 3'</pre>
## Define cDNA. What are some of the common uses of cDNA? <pre style="white-space: pre-wrap;">Identify alternative-splicing variants (isoforms); Quantify gene expression levels (RNA-SEQ)</pre>
# DNA replication
## What is the implied directionality of a DNA sequence if none is specified?<pre>5' to 3'</pre>
## What is the complement strand of this DNA sequence <code>gatactaatgaagtat </code> in 5' to 3' direction? <pre>atacttcattagtatc</pre>
## Write a PERL script to output the complementary strand of the ospC gene <code>/data/biocs/b/bio425/data/ospC.seq</code> in 5' to 3' direction. Save the result in a FASTA file <code>ospC.revcom.fas</code> <pre style="white-space: pre-wrap;">Script posted at /data/biocs/b/bio425/scripts/revcom.pl</pre>
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
|- style="background-color:lightsteelblue;"
! Assignment #2
! Assignment #2 (Final)
|- style="background-color:powderblue;"
|- 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>
# Modify the gc-counter code ''/data/biocs/b/bio425/scripts/gc-counter.pl'' to (1) count only a,t,c,g's (not other letters, e.g., amino acids); <code>see below</code> (2) count bases in both upper-case AND lower-case letters; <code>if ($base =~ /[ATCG]/i) { $base =~ tr/atcg/ATCG/; $count{$base}++; $total_valid++}</code> (3) output GC% (i.e., percentage of G+C among the total bases; formated to no more than 2 decimal points, by using the printf function). <code>my $gc_percent=($count{"G"}+$count{"C"})/$total_valid; printf "%.2f\n", $gc_percent;</code>Show results for the file ''/data/biocs/b/bio425/data/cp9.seq''. <code>23.69%</code>
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.
# Add comments to the revcom script ''/data/biocs/b/bio425/scripts/revcom.pl'' to explain what each statement does.
|-style="background-color:powderblue;"
# Chapter 1. Problems (pg.31-32):
| '''Beginning Perl'''<br />
## 1.4. Would you expect the amino acids containing hydroxyl groups (-OH) hydrophobic or hydrophilic? Why? <code>Hydrophilic, because it forms hydrogen bond with the water molecule</code>
For the homework, read up to page 221 in Appendix 1. For February 26, read all of Appendix 1.
## 1.6. How does a cDNA library differ from a genomic library? <code>cDNA library does not contain intronic sequences while genomic DNA does.</code>
 
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===
----
'''Yozen will not be lecturing'''


*Chapter 6. Gene and Genome Structures [Lecture Slides [[Media:Chapter_6.pdf|Lecture Slides Ch.6-Che]]
===February 13. Central Dogma with PERL (Part 2)===
*'''Tutorial:''' ORF Prediction using GLIMMER
* Learning goals: DNA translation & ORF Identification
* '''Homework:''' This homework will be graded.
* In-Class Exercises:
{| class="collapsible collapsed wikitable"
# Six-frame translation
## Define ORF and reading frame. How many possible reading frames are there for a given sequence?<pre style="white-space: pre-wrap;">ORF: Hypothetical, computer-predicted protein-coding sequences. An ORF needs experimental data (e.g., mRNA) to be verified as a true gene. There are six possible reading frames for a given DNA sequence: three (+1, +2, +3) on one strand and another three (-1, -2, -3) on the reverse-complement strand. </pre>
## How does a cell normally choose only one reading frame out of other possibilities for any given parts of a genome? <pre style="white-space: pre-wrap;">In a prokaryotic cell, transcription factors (TFs) bind to a particular sequence (called "promoters") at the 5'-upstream of an ORF.  TFs recruits RNA polymerase to initiative the transcription of a gene. After the transcription, ribosomes bind to another particular 5'-upstream sequence (SD sequence, normally "AGGAG") to start the translation of a protein.</pre>
## Using [http://en.wikipedia.org/wiki/DNA_codon_table a DNA genetic code table] to manually translate the following sequence in '''all''' possible reading frames: <code> gatactaatgaagtat </code>. Which reading frame do you think is the most likely one? <pre style="white-space: pre-wrap;">+1: DTNEV; +2: ILMKY; +3:Y**S; -1:ILH*Y; -2:YFISI; -3:TSLV. Frames +3 and -1 could be eliminated.</pre>
# ORF identification in a bacterial genome
## Pick a plasmid sequence from <code>/data/biocs/b/bio425/data/GBB.1con-splitted</code><pre style="white-space: pre-wrap;">Run ls -lh ../../bio425/data/GBB.1con-splitted/ and choose a small plasmid file, e.g., Borrelia_burgdorferi_4041_cp9_plasmid_C.fas</pre>
## Identify ORFs on the plasmid by running the program <code>/data/biocs/b/bio425/bin/long-orfs </code><pre style="white-space: pre-wrap;">/data/biocs/b/bio425/bin/long-orfs /data/biocs/b/bio425/data/GBB.1con-splitted/Borrelia_burgdorferi_4041_cp9_plasmid_C.fas cp9.coord</pre>
## Extract ORF sequences using the program <code>/data/biocs/b/bio425/bin/extract </code><pre style="white-space: pre-wrap;">/data/biocs/b/bio425/bin/extract /data/biocs/b/bio425/data/GBB.1con-splitted/Borrelia_burgdorferi_4041_cp9_plasmid_C.fas cp9.coord</pre>
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
|- style="background-color:lightsteelblue;"
! Assignment #3
! Assignment #3 (Final Version)
|- style="background-color:powderblue;"
|- style="background-color:powderblue;"
| '''Bacterial gene identification using Glimmer'''<br />
|
Remember to first log in to mysql by doing: <pre>ssh mysql</pre>
# (10 pts) Write a PERL program to perform 6-frame translation given a FASTA sequence (output: a FASTA file with 6 protein sequences; single-letter amino acid code; * for stop codon). <code>Code posted as /data/biocs/b/bio425/scripts/6-frame.pl.</code> Show results for the input file ''/data/biocs/b/bio425/data/mystery_seq1.fas''. How many long (>=200 bases) ORFs do you see? What are their reading frames? <code>Two long ORFs: one in the "+1" frame (L=107 aa) and another in the "-3" frame (L=177 aa).</code>
#Copy the Lyme disease bacterium lp17 plasmid file "/data/yoda/b/student.accounts/bio425_2011/data/lp17.fas" into your home directory.
# (5 pts) Run the "long-orf" program on the above mystery sequence using the following 2 options: "ATG" as start codon and a minimum ORF length of 200 bases. Save the coordinate file as "mystery_seq1.coord". <code>../../bio425/bin/long-orfs -A ATG -g 200 ../../bio425/data/mystery_seq1.fas mystery_seq1.coord</code>
#Run long-orf, extract, build-icm, and glimmer3.
# (10 pts) Write a PERL program that does exactly the same as the program ''/data/biocs/b/bio425/bin/extract''. Input files: (1) "mystery_seq1.fas" (2) "mystery_seq1.coord". Output: A single FASTA file with multiple ORF sequences. <code>Code posted as /data/biocs/b/bio425/scripts/extract.pl.</code>
#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)===
* Monday Schedule
* Monday Schedule
----


===February 27===
===February 27. Genomics with BioPerl (Part 1)===
*Appendix 1. More PERL ([[Media:Bio425_more_perl.pdf|Lecture Slides]])
* Learning goals: Introduction to Objects
*'''Homework'''
* In-Class Exercises:
{| class="collapsible collapsed wikitable"
# Construct a sequence object with a hash
## Select and write down at least five features (e.g., strain, gene) associated with a DNA sequence based on [http://www.ncbi.nlm.nih.gov/nuccore/EF537432.1 this GenBank record]. Include a sequence label and the sequence itself as two of the features.
## Write a PERL program named "seq_object.pl", which captures these five features with a hash by using feature names as keys and features as values. Example: <code>my %seq_obj=("strain"=>"SD91, "gene"=>"ospC"); </code> Print the hash with Data::Dumper.<pre style="white-space: pre-wrap;">my $seq_hash=("id"=>"SD1_ospC", "seq"=>"tgtaataattcaggaaaaga", "organism"=>"Borrelia burgdorferi", "strain"=>"SD1", "gene"=>"ospC"); print Dumper(\%seq_hash)</pre>
## Create a scalar variable called "$ref_seq_obj", which is a reference to the hash %seq_obj. Print the hash reference with Data::Dumper. <pre style="white-space: pre-wrap;">my $ref_seq_obj=\%seq_obj; print Dumper($ref_seq_obj)</pre>
## Name some of the differences between a sequence and a sequence '''object'''.<pre style="white-space: pre-wrap;">Sequence refers to a string of nucleotides or amino acids. A sequence is usually represented by a string variable. A sequence object includes biological features associated with a sequence besides the sequence itself. A sequence object is commonly represented by a hash reference in Perl.</pre>
# Construct a sequence object with Bio::Seq
## Modify your program by calling the Bioperl Bio::Seq module: <pre style="white-space: pre-wrap;">use lib '/data/biocs/b/bio425/bioperl-live'; use Bio::Seq;</pre>
## Convert your hash-based sequence object into a Bio::Seq object: <pre style="white-space: pre-wrap;">my $seqobj = Bio::Seq->new( -display_id => "SD1_ospC", -seq =>"tgtaataattcaggaaaaga" );</pre>
## Print the Bio::Seq object with Data::Dumper <pre style="white-space: pre-wrap;">print Dumper($seqobj);</pre>
# Apply Bio::Seq methods
## Find the names of methods for the following operations on the Bio::Seq object: reverse complement, length, id, seq, translate, sub-sequence by running <pre>perldoc /data/biocs/b/bio425/bioperl-live/Bio/Seq.pm</pre>
## Add the above methods into your script & print all results<pre style="white-space: pre-wrap;">my $seq_rev=$seqobj->revcom()->seq(); my $eq_length=$seqobj->length(); my $seq_id=$seqobj->display_id(); my $seq_string=$seq_obj->seq(); my $seq_translate=$seqobj->translate()->seq(); my $subseq = $seqobj->subseq(1,10)</pre>
# Discussion Questions
## What is Object-oriented Programming?
## What is an Object and what is a Method? <pre style="white-space: pre-wrap;">A Perl object is a "blessed" (strictly defined) reference to a hash. A method is a subroutine or function associated with an object. An object and its associated methods together make a class (e.g., the Bio::Seq class).</pre>
## What are the advantages and disadvantages of Object-Oriented programming in comparison with traditional programming based on subroutines and functions? <pre style="white-space: pre-wrap;">Advantages: Simpler and more readable code. Easier maintenance. Disadvantages: Code dependent on installation of external libraries (e.g., BioPerl). An extra layer of abstraction, e.g.,  the concept of objects and methods.</pre>
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
|- style="background-color:lightsteelblue;"
! Assignment #4
! Assignment #4 (Final version)
|-style="background-color:powderblue;"
|- 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.
* (10 pts) Write a Bio::Seq-based PERL program to perform 6-frame translation of this sequence "/data/biocs/b/bio425/data/mystery_seq1.fas". [Hints: Reuse the file-reading code from your original script (or copy from the 6-frame.pl code). You need to construct two Bio::Seq objects: one for the original sequence, the other for its reverse complement. You may either use the following methods: revcom(), trunc(), seq(), translate(), or (a simpler but more advanced way) call the translate() method with a "-frame=>" argument. For each method, read the documents on usage. Pay particular attention to the input object (which has to be a Bio::Seq object here), arguments (if any), and the return value (whether a number, a string, or a reference). <code>Code posted as /data/biocs/b/bio425/scripts/6-frame-bioperl.pl.</code>
 
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: Genomics with BioPerl (Part 2)===
 
* Learning goal: File I/O with BioPerl
*Chapter 2. Data Search and Alignments [[Media:Chapter2.pdf|Lecture Slides Ch.2-Che]]
* In-Class Exercises:
*Object-Oriented PERL & BioPerl (Link to [http://www.bioperl.org/wiki/Main_Page Bioperl] site and [http://www.bioperl.org/wiki/HOWTOs HOWTOs])
# Read a FASTA file with Bio::SeqIO
*'''Homework:'''
## Find out how to read a FASTA file using Bio::SeqIO by running <pre style="white-space: pre-wrap;">perldoc /data/biocs/b/bio425/bioperl-live/Bio/SeqIO.pm</pre>
{| class="collapsible collapsed wikitable"
## Write a PERL script <code>fasta-io.pl</code>, which uses Bio::SeqIO to read a multi-FASTA file (input) and print the name and length of each sequence (output). Test your script on this file <code>../../bio425/data/Borrelia_osp.dna.fasta</code>
# Output a FASTA file with Bio::SeqIO
## Find out how to output a FASTA file using Bio::SeqIO by (again) running <pre style="white-space: pre-wrap;">perldoc /data/biocs/b/bio425/bioperl-live/Bio/SeqIO.pm</pre>
## Modify the PERL script <code>fasta-io.pl</code> to read a multi-FASTA file (input) and print a translation of each sequence (output). Test your script on this file <code>../../bio425/data/Borrelia_osp.dna.fasta</code>
# Start working on assignment 5 (see below) if you have time.
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
|- style="background-color:lightsteelblue;"
! Assignment #5
! Assignment #5 (Final Version)
|-style="background-color:powderblue;"
|- style="background-color:powderblue;"
| '''BioPerl Assignment'''
|
 
* (10 pts) Write a BioPerl version of extract.pl by using the Bio::SeqIO (for both reading and outputing FASTA files) and Bio::Seq modules. Input files: (1) "mystery_seq1.fas" (2) "mystery_seq1.coord". Output: A single FASTA file with translated protein sequences. [Hints: Use regular "open" function to read the COORD file (you may copy code from "/data/biocs/b/bio425/scripts/extract.pl" for this part).] <code>Code posted as /data/biocs/b/bio425/scripts/extract-bioperl-version.pl</code>
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: Mid-Term Review===
*Chapter 3. Molecular Evolution [[Media:CH3.pdf|Lecture Slides Ch.3-Che]]
* In-class Exercise: Write a BASH script named as "get-long-orfs.bash" to output long ORFs and their translated protein sequences given a genome sequence. Your script will combine commands and scripts you have previously composed into a single-command utility.
* '''Homework:''' (TBA)
**Input file: Locate whole plasmid sequences in the "/data/biocs/b/bio425/data/GBB.1con-splitted/" folder:
***Group 1: use "Borrelia_burgdorferi_4075_lp54_plasmid_A.fas"
***Group 2: use "Borrelia_burgdorferi_4091_cp26_plasmid_B.fas"
***Group 3: use "Borrelia_burgdorferi_4041_cp9_plasmid_C.fas"
***Group 4: use "Borrelia_burgdorferi_4076_lp17_plasmid_D.fas"
***Group 5: use "Borrelia_burgdorferi_4005_lp25_plasmid_E.fas"
**Output files: two files (2 bonus points if your output file names are generated dynamically, not hard-coded)
***"plasmid_X.nuc": ORF sequences in FASTA
***"plasmid_X.pep": Protein sequences in FASTA
<pre style="white-space: pre-wrap;">filename=$1; base=$(basename $filename ".fas"); coordfile=$base.coord; nucfile=$base.nuc; pepfile=$base.pep; /data/biocs/b/bio425/bin/long-orfs -A ATG -g 200 $filename $coordfile; perl extract.pl $filename $coordfile > $nucfile; perl extract-bioperl-version.pl $filename $coordfile > $pepfile</pre>
* Sample Questions:
# Define elements of a prokaryotic gene: ORF, promoter, RBS-binding sites
# Construct a single "for" loop to translate a sequence in six frames
# Print the reverse-complement sequence given a Bio::Seq object
* Mid-term will cover the following contents (Review '''all''' in-class exercises and assignments)
** Biology: genome, transcriptome, 6-frame translation, gene structure
** Linux file system & text tools: ls [-lart]; less; grep [-ivcwP]; cat; cut [-fd]; head; tail; bash script (for loop); tr; wc [-lwm]
** Gene-finding using GLIMMER: long-orfs, extract
** Basic Perl: file I/O; loops (for; foreach; while); regex; using hash for counts and translation
** Object-oriented BioPerl: the use Bio::SeqIO & Bio::Seq
----


===March 20 (Mid-Term Exam)===
===March 20. Midterm Practicum===
*MID-TERM EXAM
----
<!--*Assignment #7. '''(To be posted)'''
Questions & Problems (pg.54-55): 2.1, 2.2, 2.3, 2.4-->


===March 27 (No Class)===
===March 27 (No Class)===
'''Spring Break'''
'''See assignments above'''
----


===April 3===
===April 3: Transcriptome with R (Part 1)===
*MID-TERM
* Learning goal: Introduction to R
<!--*Assignment #8. '''(To be posted)'''
* R resources
Questions & Problems (pg.75-76): 3.1, 3.2, 3.3 (use first ten codons), 3.4, 3.5, 3.7-->
# ''Forget about Excel!'' Instead, use R for '''statistical analysis and visualization of large data sets'''.
# Download and install R to your own computer from: [http://r-project.org R website]
# Download and install R studio to your own computer from: [http://rstudio.org R Studio website]
# A nice tutorial: [http://www.math.csi.cuny.edu/Statistics/R/simpleR/index.html SimpleR]
* In-Class Exercises: Part 1.
# Set a working directory
## Using a Linux terminal, make a directory called <code>R-work</code>
## Start [http://146.95.2.176:8787/ R-Studio] ('''Note: This link works only if you use computers in the 1000G lab. Install and use your own R Studio for homework assignments''')
## Find working directory with <code>getwd()</code>
## Change working directory with <code>setwd("~/R-work")</code>
# The basic R data structure: Vector
## Construct a character vector with <code>c.vect=c("red", "blue", "green", "orange", "yellow", "cyan")</code>
## Construct a numerical vector with <code>n.vect=c(2, 3, 6, 10, 1, 0, 1, 1, 10, 30)</code>
## Construct vectors using functions
###<code>n.seq1=1:20</code>
###<code>n.seq2=seq(from=1, to=20, by=2)</code>
###<code>n.rep1=rep(1:4, times=2)</code>
###<code>n.rep2=rep(1:4, times=2, each=2)</code>
## Use '''built-in help''' of R functions: <code>?seq</code> or <code>help(seq)</code>
## Find out data class using the '''class''' function: <code>class(c.vect)</code>
# Access vector elements
## A single value: <code>n.vect[2]</code>
## A subset: <code>n.vect[3:6]</code>
## An arbitrary subset: <code>n.vect[c(3,7)]</code>
## Exclusion: <code>n.vect[-8]</code>
## Conditional: <code>n.vect[n.vect>5]</code>
# Apply functions
## Length: <code>length(n.vect)</code>
## Range: <code>range(n.vect); min(n.vect); max(n.vect)</code>
## Descriptive statistics: <code>sum(n.vect); var(n.vect); sd(n.vect)</code>
## Sort: <code>order(n.vect)</code>. How would you get an ordered vector of n.vect? [Hint: use <code>?order</code> to find the return values]
## Arithmetics: <code>n.vect +10; n.vect *10; n.vect / 10</code>
# Quit an R session
## Click on the "History" tab to review all your commands
## Save your commands into a file by opening a new "R Script" and save it as <code>vector.R</code>
## Save all your data to a default file '''.RData''' and all your commands to a default file ".Rhistory" with <code>save.image()</code>
## Quit R-Studio with <code>q()</code>
----
* In-Class Exercises: Part 2
# Start a new R studio session and set working directory to <code>~/R-work</code>
# Generate a vector of 100 normal deviates using <code>x.ran=rnorm(100)</code>
# Visualize the data distribution using <code>hist(x.ran)</code>
# Explore help file using <code>?help; example(hist)</code>
# How to break into smaller bins? How to add color? How to change x- and y-axis labels? Change the main title?
# Test if the data points are normally distributed.[Hints: use qqnorm() and qqline()]
# Save a copy of your plot using "Export"->"Save Plot as PDF"
----
* In-Class Exercises: Part 3
# Using a Linux terminal, make a copy of breast-cancer transcriptome file <code>/data/biocs/b/bio425/data/ge.dat</code> in your R working directory
# Start a new R studio session and set working directory to <code>~/R-work</code>
# Read the transcriptome file using <code>ge=read.table("ge.dat", header=T, row.names=1, sep="\t")</code>
## What is the data class of <code>ge</code>?
## Access data frame. What do the following commands return? <code>ge[1,]; ge[1:5,]; ge[,1]; ge[,1:5]; ge[1:5, 1:5]</code>
## Apply functions: <code>head(ge); tail(ge); dim(ge)</code>
# Save a copy of an object: <code>ge.df=ge</code>.
# Transform the transcriptome into a numerical matrix for subsequent operations: <code>ge=as.matrix(ge)</code>
#  Test if the expression values are normally distributed.
# Save and quit the R session
----
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
! Assignment #6 (Final Version)
|- style="background-color:powderblue;"
|
* (0 pts) Install R and R Studio to your home/laptop computer
* (5 pts) Make a histogram of the "ge.dat". Are the data points normally distributed? Show all R commands and the final plot. ['''Notes:''' You need to download a copy of the <code>ge.dat</code> onto your own computer. On Mac, you could run this command: <code>scp your_user_name@eniac.geo.hunter.cuny.edu:ge.dat  ge.dat</code>. On Windows, download and install <code>sftp</code> or<code> WinSCP</code> for file transfer from/to your eniac account.]
* (5 pts) Formulate one question the <code>ge.dat</code> transcriptome data set may be useful for understanding breast cancers. [Examples (feel free to re-use and refine): Are all breast cancer cells similar or different in gene-expression levels? What genes are associated with early or late clinical stages? What genes are associated with drug/treatment resistance? Could gene expression be used for early diagnosis? For predicting drug responses (as in personalized medicine)?
|}
----


===April 10===
===April 10: Transcriptome with R (Part 2)===
*'''Chapter 4.''' Phylogenetics I. Distance Methods  [[Media:CH4.pdf|Lecture Slides Ch.4-Che]]
* Learning goal: Classification of breast-cancer subtypes
*"Tree Thinking" Puzzles - ([http://diverge.hunter.cuny.edu/~weigang/lab-website/SummerWorkshop/Baum_etal05_sup_part1.pdf Download])
* In-Class Exercises: Part 1. Gene filtering
*'''Tutorial:''' PROTDIST and NEIGHBOR using [http://mobyle.pasteur.fr/cgi-bin/portal.py#welcome Mobyle Pasteur]
# Open a new R Studio session and set working directory to R-work
{| class="collapsible collapsed wikitable"
# Load the default workspace and plot a histogram of the gene expression using <code>hist(ge, br=100)</code>. Answer the following questions:
## Make sure <code>ge</code> is a matrix class. If not, review the last session on how to make one
## What is the range of gene expression values? Minimum? Maximum? <pre style="white-space: pre-wrap;">range(ge); min(ge); max(ge)</pre>
## Are these values normally distributed? Test using <code>qqnorm</code> and <code>qqline</code>.
## If not, which data range is over-represented? Why? <pre style="white-space: pre-wrap;">Low gene expression values are over-represented, because most genes are NOT expressed in a particular cell type/tissue.</pre>
# '''Discussion Questions:'''
## What does each number represent? <pre style="white-space: pre-wrap;">log2(mRNA/cDNA_amount)</pre>
## Why is there an over-representation of genes with low expression values? <pre style="white-space: pre-wrap;">Because most genes are not expressed in these cancer cells</pre>
## How to filter out these genes? <pre style="white-space: pre-wrap;">Remove genes that are expressed in low amount in these cells, by using the function pOverA (see below)</pre>
## How to test if the filtering is successful or not? <pre style="white-space: pre-wrap;">Run qqnorm() and qqline()</pre>
# Remove genes that do not vary significantly among breast-cancer cells
## Download the genefilter library from [http://bioconductor.org BioConductor] using the following code <pre style="white-space: pre-wrap;">source("http://bioconductor.org/biocLite.R"); biocLite("genefilter")</pre>
## Load the genefilter library with <code>library(genefilter)</code>
## Create a gene-filter function: <code>f1=pOverA(p=0.5, A=log2(100))</code>. What is the <code>pOverA</code> function? <pre style="white-space: pre-wrap;">Remove genes expressed with lower than log2(100) amount in half of the cells</pre>
## Obtain indices of genes significantly vary among the cells: <code>index.retained=genefilter(ge, f1)</code>
## Get filtered expression matrix: <code>ge.filtered=ge[index.retained, ]</code>. How many genes are left? <pre style="white-space: pre-wrap;">dim(ge.filtered)</pre>
# Test the normality of the filtered data set
## Plot with <code>hist(); qqnorm(); and qqline()</code>. Are the filtered data normally distributed?
## Plot with <code>boxplot(ge.filtered)</code>. Are expression levels distributed similarly among the cells?
* In-Class Exercise: Part 2. Select genes vary the most in gene expression
# Explore the function <code>mad</code>. What are the input and output? <pre style="white-space: pre-wrap;">Input: a numerical array. Output: median deviation</pre>
# Calculate mad for each gene: <code>mad.ge=apply(ge.filtered, MARGIN=1, FUN=mad)</code>
# Obtain indices of the top 100 most variable genes: <code>mad.top=order(mad.ge, decreasing=T)[1:100]</code>
# Obtain a matrix of most variable genes: <code>ge.var=ge.filter[mad.top,]</code>
* In-Class Exercise: Part 3. Classify cancer subtypes based on gene expression levels
# '''Discussion Questions:'''
## How would you measure the difference between a one-dimensional variable? <pre style="white-space: pre-wrap;">d=|x1-x2|</pre>
## How would you measure the difference between a two-dimensional variable? <pre style="white-space: pre-wrap;">d=|x1-x2|+|y1-y2|</pre>
## How would you measure the Euclidean difference between a three-dimensional variable? <pre style="white-space: pre-wrap;">d=|x1-x2|+|y1-y2|+|z1-z2|</pre>
## How would you measure the Euclidean difference between a multi-dimensional variable? <pre style="white-space: pre-wrap;">d=SQRT(sum([xi-xj]^2))</pre>
## To measure similarities between cells based on their gene expression values, is it better to use Euclidean or correlation distances? <pre style="white-space: pre-wrap;">Correlational distance measures similarity in trends regardless of magnitude.</pre>
# Calculate correlation matrix between cells: <code>cor.cell=cor(ge.var)</code>
# Calculate correlation matrix between genes: <code>cor.gene=cor(t(ge.var))</code> What does the t() function do? <pre style="white-space: pre-wrap;">transposition (turn rows into columns and columns into rows)</pre>
# Obtain correlational distances between cells: <code>dg.cell=as.dendrogram(hclust(as.dist(1-cor.cell)))</code>
# Obtain correlational distances between genes: <code>dg.gene=as.dendrogram(hclust(as.dist(1-cor.gene)))</code>
# Plot a heat map: <code>heatmap(ge.var, Colv=dg.cell, Rowv=dg.gene)</code>
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
|- style="background-color:lightsteelblue;"
! Assignment #6
! Assignment #7 (Final)
|-style="background-color:powderblue;"
|- style="background-color:powderblue;"
| '''Chapter 4 ''' Questions & Problems (pg.95-96): 4.1, 4.3, 4.4, 4.7, 4.8
|
* (5 pts). Obtain a heat map of gene expression values of top-variable 50 genes among the 49 cells using the <code>ge.dat</code> data set. Show your R commands and the final heat map.
* (5 pts) '''Guided Reading.''' Read [[media: Barretina_etal_2012.pdf | this paper]] and answer the following questions
# Describe the main purpose of the study
# List at least 3 genomic features of cancer cells the study generated
# What microarray platform did the study use? How was the transcriptome data set used for predicting drug effects?
|}
|}
----


===April 17===
===April 17: Transcriptome with R (Part 3)===
*'''Chapter 5.''' Phylogenetics II. Character-Based Methods  [[Media:CH4.pdf|Lecture Slides Ch.5-Che]]
* Learning goal: Biomarker Discovery of Cancer Drugs
*'''Tutorial:''' DNAML and bootstrap analysis using [http://mobyle.pasteur.fr/cgi-bin/portal.py#welcome Mobyle Pasteur]
* Discussion Questions
<!--*Assignment #10. '''(To be posted)'''
# What is the main goal of study? What is a bio-marker? Why biomarkers are useful? <pre style="white-space: pre-wrap;">The main goal is to identify genes correlated with anti-cancer compounds. A bio-marker is a set of genes associated with a disease or disease treatment. Bio-markers allow, e.g., prediction of drug effectiveness.</pre>
Questions & Problems (pg.115-116): 5.1, 5.2, 5.3, 5.4-->
# How many molecular features of cancer cells were assayed? <pre>The study profiled the transcriptome, whole-genome SNPs, cancer-related mutations, and drug sensitivity of cancer cell lines.</pre>
# What is IC50? What statistical tests would you use to identify genes associated with drug sensitivity? <pre style="white-space: pre-wrap;">IC50 is the 50% inhibitory concentration of a compound. It measures drug sensitivity of cells. T-tests or correlation analysis are used to identify genes associated with drug sensitivity.</pre>
* In-Class Exercise 1. Pre-processing a drug-sensitivity data set
# Copy the panobinostat IC50 data file <code>/data/biocs/b/bio425/data/pano-ic50.dat</code>into your <code>R-Work</code> directory
# Start a new R Studio session and read the file and save to a variable: <code>ic=read.table("pano-ic50.dat", header=F, row.names=1, sep="\t")</code>
# Use <code>hist(), qqnorm(), qqline()</code> to examine IC50 distribution. Is the distribution normal?
# Perform proper data transformation to obtain a normally-distributed data set. <pre style="white-space: pre-wrap;">The IC50 are not normally distributed. The logarithm of IC50 values are normally distributed.</pre>
# Data visualization and presentation by replicating the FIG.2(e) in the paper
## Use <code>boxplot</code> with color to show distribution of transformed IC50 values <pre>boxplot(log10(ic[,1]))</pre>
## Add points to the boxplot using these two functions: <code>points() and jitter()</code> <pre>points(jitter(rep(1,28), factor=5), log10(ic[,1]))</pre>
# Order the cells by their IC50 value and save the ordered list as <code>ic.ordered</code> <pre>ic.ordered=ic[order(ic[,1]), ]</pre>
# Separate the cells into 2 groups: one sensitive to the drug (low IC50) and another resistant to the drug (high IC50) <pre>ic.sensitive=ic.ordered[1:14]; ic.resistant=ic.ordered[15:28]</pre>
* In-Class Exercise 2. Pre-processing the GE data
# Assign names to ic.ordered: <code>names(ic.ordered)=rownames(ic)[order(ic)]</code>
# Get column indices of cells with IC50 values from the filtered data set: <code>ind=match(names(ic.ordered), colnames(ge.filter), nomatch=0)</code>
# Get subset using <code>ge.sub=ge.filter[,ind]</code>
# Show column names of <code>ge.sub</code> and make sure they are ordered by IC50
* In-Class Exercise 3. Identify bio-markers
# Assign first 17 as "sensitive" group and the last 11 as the "resistant" group: <code>groups=factor(c(rep(1,17), rep(2,11)))</code>
# Load the library <code>library(genefilter)</code>
# Run t-tests for each gene and save results: <code>t.out=rowttests(ge.sub,groups)</code>
# Select the top significant genes using the cutoff of p=0.001: <code>t.sig=t.out[which(t.out[,3]<1e-3),]</code>
# Obtain the GE profile with identified biomarkers: <code>ge.markers=ge.sub[rownames(t.sig),]</code>
# Visualize the <code>ge.markers</code> with a heat map. Calculate and display correlation clusters of genes, but not for cells. Instead, display a color strip of IC50 of cells with the heatmap option <code>ColSideColors=cm.colors(28) or ColSideColors=rainbow(28, start=0, end=0.3)</code> <pre style="white-space: pre-wrap;">cor.gene=cor(t(ge.markers)); dg.gene=as.dendrogram(hclust(as.dist(1-cor.gene))); heatmap(ge.markers, Colv=NA, Rowv=dg.gene, ColSideColors=rainbow(28, start=0, end=0.3))</pre>
# Answer the following questions with the heat map
## How many genes are more highly expressed in sensitive cells? How many in more resistant cells?
## How would you use these genes (bio-markers) to predict sensitivity of cancer cells with unknown IC50?
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
! Assignment #8 (Final)
|- style="background-color:powderblue;"
|
* (10 pts) Show boxplot (with points) and heatmap. Include your R commands. How many genes ("gene-group-1") with expression levels significantly high in the resistant group relative to the sensitive group? How many genes ("gene-group-2") having the opposite pattern? Indicate on your heatmap which are the resistant cells, which are the sensitive cells, and the two gene groups.
|}
----


===April 24===
===April 24: Molecular Phylogenetics (Part 1)===
*'''Topic:''' Relational Database and SQL
* Learning goals:
*'''Tutorial:''' the Borrelia Genome Database
# Homology search using BLAST
*'''Homework:''' SQL-embedded PERL
# Multiple alignment using clustalw
{| class="collapsible collapsed wikitable"
# Distance-based phylogeny
* In-Class Exercises: Part 1. Homology searching with BLAST
# Construct a sequence database
## Make a directory called "phylo-work"
## Copy a four-genome protein file into this directory. The file is located at <code>/data/biocs/b/bio425/data/Four-Borrelia-Genomes.pep</code>
## Find out how to make a sequence database by reading help file: <code>makeblastdb -help</code>. <pre style="white-space: pre-wrap;">(You need to log in to the "mysql" host first by running: ssh -X mysql) makeblastdb -in Four-Borrelia-Genomes.pep -dbtype 'prot'</pre>
# Search for homologs of OspA
## Copy the OspA protein sequence into your "phylo-work" directory. The file is at <code>/data/biocs/b/bio425/data/ospA.pep</code>
## Read the [http://www.ncbi.nlm.nih.gov/books/NBK1763/ Stand-alone BLAST+ documentation] to find out which blast program you should use
## Run blastp using the following parameters: query: ospA.pep; database: Four-Borrelia-Genomes.pep; e-value: 1e-5 <pre style="white-space: pre-wrap;">blastp -query ospA.pep -db Four-Genomes.pep -evalue 1e-5</pre>
## Change the output format to tabular view <pre style="white-space: pre-wrap;">blastp -query ospA.pep -db Four-Genomes.pep -evalue 1e-5 -outfmt 6</pre>
# Discussion Questions
## What is homology? <pre>Sharing of a common ancestor</pre>
## What is a homolog? <pre>Homologous sequences</pre>
## Define the following BLAST terms: Query, Subject, Identity, Gap, E-value, and Score <pre>E-value is the number of hits by chance. The smaller the number, the more statistically significant the results are.</pre>
* In-Class Exercises: Part 2. Run multiple sequence alignment with CLUSTAL-W
# Select and copy all homologs into a single FASTA file and name it <code>ospA-homologs.fas</code> <pre>grep -A1 "BBA15" Four-Borrelia-Genomes.pep > ospAB.fas. Append with 7 other hits.</pre>
# Run CLUSTAL-W using commands. The software is installed on host <code>"mysql"</code>. [Note: You may need to ssh into the mysql host, before you could run the command <code>clustalw2</code>]<pre style="white-space: pre-wrap;">clustalw2 -infile=ospAB.fas -output=phylip</pre>
# Set the output format as <code>PHYLIP</code>
# Discussion Question: What is the biological meaning of alignment gaps? <pre>Hypothetical insertions or deletions</pre>
* In-Class Exercises: Part 3. Construct distance-based phylogeny with PHYLIP
# Get pair-wise evolutionary distances using the program <code>protdist</code>. Again, since the programs are installed on the "mysql" server, you may need to first ssh into the mysql host. <pre style="white-space: pre-wrap;">Run "protdist". Type in "ospAB.phy" (the output file from clustalw2) as input file. Save output as: mv outfile ospAB.protdist</pre>
# Obtain a neighbor-joining tree using the program <code>neighbor</code>. Save the output tree as <code>ospAB.dnd</code> <pre style="white-space: pre-wrap;">Run "neighbor". Type in "ospAB.protdist". Rename output: mv outtree ospAB.dnd</pre>
# Visualize tree using the APE package in R
## Start a new R Studio session<pre>ssh -X mysql</pre>
## Load the ape package: <code>library("ape")</code>
## Read tree with the function <code>tr=read.tree("ospAB.dnd")</code>
## Plot tree with the function <code>plot(tr). To get help on tree plotting: help(plot.phylo)</code>
## Explore different visualization styles ("phenogram", "unrooted", "circular") and colors for nodes and branches
# Discussion Questions
## What is the unit of '''evolutionary distance''' between two sequences? <pre>Number of amino-acid substitutions</pre>
## What are the biological meanings of leaf nodes, internal nodes, root node, and branch lengths? <pre style="white-space: pre-wrap;">Leaf nodes represent input sequences. Internal nodes represents hypothetical ancestors. Root node represents the hypothetical most recent common ancestor of all sequences. Branch lengths are proportional to the number of substitutions.</pre>
## How would you measure '''evolutionary relatedness'''? <pre>By the position of common ancestors</pre>
## How would you measure evolutionary similarity? <pre>By the tree distance between two nodes</pre>
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
|- style="background-color:lightsteelblue;"
! Assignment #7
! Assignment #9 (Final version)
|- style="background-color:powderblue;"
|- style="background-color:powderblue;"
| '''SQL-embedded PERL'''<br />
|
* (10 pts) Show your final tree in at least two styles. List the R commands. Using your '''own words''' to
# Define homology and homologs
# Define BLAST e-value
# Define evolutionary distances
# Define tree nodes and branch lengths
|}
----


Continue work on the assignment we began in class. It is reproduced below, with some added functionality.
===May 1: Molecular  Phylogenetics (Part 2)===
* Learning goals:
# Learn to read a phylogenetic tree
# Phylogenomics: identification of orthologous and paralogous genes
* In-Class Exercise 1.
{| class="wikitable"
| [[File:Baum.jpg|thumb|Is Frog more related to Fish or to Human?]] || [[File:Coelacanth-phylogeny.jpg|thumb|Which is the closest relative of tetrapods? Is the Lungfish more related to Human or to Coelacanth?]] || [[File:Phylo-Quizz.pdf|thumb|Answer the 10 questions]]
|}


Your script will:
* In-Class Exercise 2. Edit FASTA file to assign informative sequence IDs
# Open the ospA homolog file <code>ospAB.pep</code> using <code>vi, emacs, or gedit</code>
# Rename each sequence with shortened (< 10 chars), informative names:
## "BBA15" => "B31_ospA"
## "BBA16" => "B31_ospB"
## Other six sequences in the same "Strain_gene" format: e.g., N40_J57, PBi_BGA14, PKo_2016, PBi_BGA15, PKo_2017, N40_J56
# Save the file and quit
# Rerun <code>clustalw2, protdist, and neighbor</code> (see last session). Rename your final <code>outtree</code> file as <code>ospAB.nj</code>
# Show the final tree using <code>cat ospAB.nj</code>. What is the NEWICK file format?
* In-Class Exercise 3. Give the tree a proper root
# SSH into the "mysql" server with the "-X" option: <code>ssh -X mysql</code>
# Load the library: <code>library(ape)</code>
# Load another library: <code>library(phangorn)</code>
# Read the tree file and save the tree as an object: <code>tr=read.tree("ospAB.nj")</code>
# Root the tree at mid-point: <code>tr.mid=midpoint(tr)</code>
# Plot the rooted tree: <code>plot(tr.mid)</code>
# Answer the following questions based on the rooted tree:
## Identify how many homologous sequences of OspA in each genome?
## For each genome, which sequence is most likely to be OspA? Which is OspB?
## According to the midpoint-rooted tree, which node represents the ancestor of OspA, which node the ancestor of OspB?
## Why are homologous sequences within a genome (e.g., OspA and OspB in B31) ''less'' similar to homolgous sequences in different genomes (e.g., OspA in B31 and N40)? Identify the biological processes.
## Define and distinguish two types of homology: '''orthology''' and '''paralogy'''
## Which groups are more likely to share the same biological function, orthologs or paralogs?
## Describe steps for predicting gene functions by building a phylogenetic tree of homologous sequences
{| class="wikitable sortable mw-collapsible"
|- style="background-color:lightsteelblue;"
! Assignment #10 (Last assignment. Final version)
|- style="background-color:powderblue;"
|
* (9 pts) Plot the midpoint rooted tree & answer the following questions:
# Indicate an orthologous group of sequences. Explain why.
# Indicate two paralogous sequences. Explain why.
# List and describe steps of using a phylogenetic tree to predict the functions of an unknown protein sequence.
|}
----


# Retrieve TEN orfs from the orf table that belong to the strain Pko.
===May 8: Final Project (Session I)===
# Find and store the sequences described by those orfs and their lengths.
* Goals:
# Determine if the orf is on the reference or reverse complement strand, and use that information to print the correct sequence.
# Claim your individual project
# Print the orf name, sequence, and the length for each orf.
# Formulate an outline of the final project report
# '''In addition to printing the above information to the screen,''' write out the sequence information '''(in FASTA format)''' to a file
# Set milestones to be completed in a week
called "Pko_orfs.fasta". The sequence ID should be of the form:
{| class="wikitable"
Pko_orfname
! Project
! Biological Concepts
! Computational inputs
! Computational outputs
! Statistical analysis
|-
| Codon Usage I
| genetic code, codon degeneracy, codon usage, GC%
| CUTG table
| Frequencies of codons, grouped by amino acid; GC%
| Are synonymous codons uniformly used? (Hint: use chisq.test in R.  
|-
| Codon Usage II
| genetic code, codon degeneracy, codon usage, GC%
| GBB.seq, which is a FASTA file of n=1738 ORF sequences of B. burgdorferi B31. Use Bio::SeqIO to read the file and Bio::Tools::CodonUsage to translate codons
| Frequencies of codons, grouped by amino acid; GC%
| What are the possible factors causing biased codon usages? Compare the codon usage of virulence-related genes with others. Do you expect the usage more or less biased?
|-
| Splicing Signal
| intron, exon, splicing, donor site, acceptor site, information
| mdm2 gene sequence and a coordinate file of introns
| (1) Extract donor and acceptor sequences, (2) Calculate information content (in bits) at each site
| Plot a WebLogo


Note that the above will require the use of BioPerl.
|-
| Protein sequence evolution
| homology, orthology, paralogy, neufunctionalization of duplicated genes, homology modeling
| A FASTA file of OspA and OspB sequences from 8 Borrelia species; OspA structure from PDB
| (1) alignment, (2) midpoint-rooted phylogeny, (3) a homology model of OspB.
| What sites vary between species? What between OspA and OspB? Where are these sites located on the OspA structure?


|-
| DataMonkey pipeline
| Positive natural selection
| A FASTA file of ospB coding sequences from 8 Borrelia species
| What sites are under positive natural selection, based on MEME-Hyphy analysis?
| Build a LWP-based pipeline for automated analysis using DataMonkey


For those looking for extra challenges, you can try adding the following:
|-
| Phylogenetics Pipeline
| BLAST, alignment, phylogeny
| OspA sequence & Four Genome protein database
| (1) "fetch-seq.pl" to extract FASTA sequences of BLAST hits. (2) A phylogenetic tree in PDF
| How to root a phylogenetic tree? How to test the statistical significance of a tree?


* 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:
| Transcriptomes of cancer subtypes I
strainname_contigname_orfname
| microarray, transcriptome, gene expression, fold change
* If asking users for input, fail if they gave a strain or contig name which does not exist in the database.
| leukemiasEset dataset
* Also if asking users for input, the output file's name should be changed to reflect the chosen strain.
| (1) a heat map after gene filtering; (2) A list of genes ordered by their significance in expression profile between the four subtypes, using rowftest().
* 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.
| Pathway analysis of significantly expression


|-
| Transcriptomes of cancer subtypes II
| microarray, transcriptome, gene expression, fold change
| CCLE expression matrix of breast-cancer cells
| (1) a heat map; (2) classify into subtypes and use cutree to separate into two groups; (3) A list of genes ordered by their significance in expression profile between the two subtypes
| Pathway analysis of significantly expressed genes


Sample scripts will go up slowly, over time, including example SQL statements.
|-
|-style="background-color:powderblue;"
| CpG depletion in human genome
| '''Questions from Text''' <br /> (pg.115-116): 5.1, 5.3
| role of CpG islands in gene regulation
|}
| GBB.1con; a partial Human genome sequence
| dinucleotide frequencies
| test significance of over and under-representation of CpG


===May 1===
|-
'''NO CLASSES''' (Spring recess)
| Ancestral sequence changes
| phylogenetic reconstruction; phylogenetic inference
| OspAB.fas
| (1) extract ancestral sequences in the proml outfile; (2) identify changes on each tree branch
| Test of significance of reconstructed sequences


===May 8===
|-
*'''Topic:''' Statistics
| Identify variable sites
*'''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]
| alignment, sequence variation
*'''Tutorial:''' Statistical Visualization using R  [[Media:R-implementations.pdf|Lecture Slides-Che]]
| OspAB.phy
<!--*Assignment #12. '''(To be posted)'''
| (1) read alignment with Bio::AlignIO; (2) Identify constant and variable sites
R Exercises-->
| Test which sites vary between species, between orthologs, and between paralogs


===May 15===
|-
*'''Chapter 6''' (Gene Expression) & '''Chapter 8''' (Proteomics)
| MLST of Pseudomonas aeruginosa
*'''Tutorial:''' Array Data Visualization and Analysis ([[Media:Array_Data_Visualization_and_Analysis.pdf| Micro-Array Analysis Slides]])
| MLST of bacterial strains, ortholog, phylogeny
*'''Homework:'''Data Analysis using R
| 10 genome files; ortholog table
{| class="collapsible collapsed wikitable"
| (1) ortholog sequences (nucleotides, not protein); (2) concatenated alignments; (3) a combined phylogeny of genomes (using FastTree)
|- style="background-color:lightsteelblue;"
| Display/Root tree using R packages
! 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.
|-
| Shuffled IGS alignments in Borrelia
| IGS, gene regulation, promoter
| IGS alignments from cp26 and lp54 plasmids
| (1) shuffled alignments; (2) counts of conserved blocks; (3) a plot of counts
| Test the significance of observed blocks


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'''.
|-
| RNA-SEQ analysis
| transcriptome, RNA-SEQ
| RNA-SEQ data from 5 mosquito development stages
| (1) mapped sequence reads; (2) genes significantly differentially expressed; (3) R plots
| Test the significance of differentially expressed genes


'''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 15: Final Project (Session 2)===
*'''Chapter 7.''' Protein Structure Prediction
* Goals:
<!--*Assignment #14 (Final Comprehensive Project). '''(To be posted)'''-->
# Help debug your Perl/R scripts
# Check your report outline
# Set specific expectations for your final report
* A suggested template for the final report
# Title Page
## One page
## Title: One-line summary of methods and conclusion
## Name & Date
## Table of Contents
# Background & Introduction
## One page, 1.5 line-spaced, size 12 font; '''worth 15 pts'''
## 1st paragraph: Describe biological questions and objectives of your project
## 2nd paragraph: Define and explain any biological terminologies you will use (e.g., ORF, codon, transcription, intron, genome, etc)
## 3rd paragraph: Summarize your approach
## Unless it is your own opinion, use citations to indicate your information source and back up each of your statements and claims, e.g., (Caserta et al. 2012)
# Materials & Methods
## One page; '''worth 10 pts'''
## List the source of your input data (GenBank, etc)
## Describe your computational algorithm (preferably with a flow chart)
## Explain statistical methods
# Results and Conclusion
## One page; '''worth 10 pts'''
## Show your program output as well as results of statistical analysis (e.g. with an R figure with legends)
## Describe results
## Draw your conclusions
# Literature Cited
## '''Worth 5 pts'''
## Include Author, Year, Journal/Link URL, e.g., Caserta E, Haemig HAH,Manias DA, Tomsic J, Grundy FJ, HenkinTM, DunnyGM. 2012. In vivo and in vitro analyses of regulation of the pheromone-responsive prgQ promoter by the PrgX pheromone receptor protein. J. Bacteriol. 194:3386 –3394.
# Appendix
## '''Worth 10 pts'''
## Attach your Perl/R scripts
## Use the Carrier font and proper indentation
----


*Final Project Due (TBA)
===May 22: Final Project Due (<font color="red">5pm in my office @HN839</font>)===
* Sample Projects
# <font color="blue">[Claimed]</font>(Genomics) Explore codon usage I: Write a PERL script to parse the [http://www.kazusa.or.jp/codon/cgi-bin/showcodon.cgi?species=224326 codon usage table of Borrelia burgdorferi B31]. Test if the synonymous codons are equally used or there are statistically significant biases.
# (Genomics) Explore codon usage II: Write a BioPerl-based script to calculate codon usages for individual genes. Test which genes have the most codon biases using the codon-adaptation index.
# <font color="blue">[Claimed]</font>(Transcriptomics) Tissue-specific gene expressions: Download a set of GE profile of lung cancer cells and another set for lymphoma cells. Identify genes significantly differentially expressed in the two cell types
# <font color="blue">[Claimed]</font>(Transcriptomics) Identify cancer subtypes and biomarkers of subtypes using R/Bioconductor
# (Transcriptomics) Identify genes associated with drug responses
# <font color="blue">[Claimed]</font>(Phylogenetics) Write a bash pipeline to construct a molecular phylogenetic tree of a protein family
# <font color="blue">[Claimed]</font>(Phylogenetics) Write a BioPerl script to identify all variable sites given an alignment
# <font color="blue">[Claimed]</font>(Phylogenetics) Reconstruct ancetral sequences based on a phylogenetic tree. Identify evolutionary changes at each codon position and on each branch.
# <font color="blue">[Claimed]</font>(informatics) Compose a Perl script to calculate information content as intron-exon junctions
* Project Ideas
# Construct bioinformatics workflow using BASH/Perl/BioPerl
# Cancer gene expression analysis using R/Bioconductor
# Phylogenomics genomics using APE
# Build a genome database with Perl/SQL
* Course/Project Assessment (You project will have ALL 3 of these components)
** One Learning Goal in '''biological computation (20 pts)''': string manipulations using Linux/Perl/BioPerl/SQL/R
** One Learning Goal in '''biological theory (15 pts)''': Central Dogma/Genome Variation/Gene Expression/Phylogenetics
** One Learning Goal in '''biological data analysis (15 pts)''': Data transformation/normal distribution/t-test/visualization using heatmap/cluster analysis
* Summer Internship opportunities
# '''Hunter College''': Comparative genomics of ''Borrelia burgdorferi'', the Lyme bacteria
# '''Einstein Medical College''': Gene expression analysis of ''Toxoplasma gondi'' development
# '''Memorial Sloan-Kettering Cancer Center''': Comparative genomics of infectious and environmental isolates of ''Pseudomonas aeruginosa''


==Useful Links==
==Useful Links==
Line 356: Line 664:
* Install location and instructions for [http://lib.stat.cmu.edu/R/CRAN/bin/windows/base/ Windows]
* Install location and instructions for [http://lib.stat.cmu.edu/R/CRAN/bin/windows/base/ Windows]
* Install location and instructions for [http://lib.stat.cmu.edu/R/CRAN/ Mac OS X]
* Install location and instructions for [http://lib.stat.cmu.edu/R/CRAN/ Mac OS X]
* Install R-Studio
* For users of Ubuntu/Debian:
* For users of Ubuntu/Debian:
  sudo apt-get install r-base-core
  sudo apt-get install r-base-core
* For users of Fedora/Red Hat:
su -
yum install R


===Utilities===
===Utilities===
Line 368: Line 674:
===Other Resources===
===Other Resources===
* [http://www.ccrnp.ncifcrf.gov/~toms/papers/primer/primer.pdf Information Theory Primer] by Thomas D. Schneider. Useful in understanding sequence logo maps.
* [http://www.ccrnp.ncifcrf.gov/~toms/papers/primer/primer.pdf Information Theory Primer] by Thomas D. Schneider. Useful in understanding sequence logo maps.


© Weigang Qiu, Hunter College, Last Update ~~
© Weigang Qiu, Hunter College, Last Update ~~

Latest revision as of 19:54, 8 March 2014

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 FAQ)
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
Attention: Fill out your online Teacher's Evaluation for Spring 2013, available April 15-May16

General Information

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.
  • Problem-based Learning (PBL): For each session, students will work in groups to solve a set of bioinformatics problems. Instructor will serve as the facilitator rather than a lecturer. Evaluation of student performance include both active participation in the classroom work as well as quality of assignments (see #Grading Policy).
  • Learning Goals: After competing the course, students should 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%), whether executable or having major errors (50%), algorithm efficiency (10%), and readability in programming styles (30%, see #Assignment Expectations).
  • The grading scheme
    • Assignments (100 pts): 10 exercises.
    • Mid-term (50 pts).
    • Final Project (50 pts)
    • Classroom performance (50 pts): Active engagement in classroom exercises and discussions
    • Attendance (50 pts): 1 unexcused absences = 40; 2 absences = 30; More than 2 = 0.

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.
  • Recommended Style
  • Bad Style

Course Schedule (All Wednesdays)

January 30. Browse Genome & Transcriptome Files with Unix Tools

  • Course Overview
  • Learning Goal: The power of Unix text filters
  • In-Class Exercises:
  1. You will need these 2 files for the following questions: /data/biocs/b/bio425/data/GBB.1con, GBB.seq
    1. What is a genome? What does a bacterial genome typically consist of? Explain the following terms: chromosome, plasmids, and contig
    2. Specify the FASTA file format
    3. What is the size of the Borrelia burgdorferi (the Lyme disease pathogen) B31 genome in terms of
      1. Number of replicons: From your home directory, run:
        grep -c "^>" ../../bio425/data/GBB.1con [Answer: N=22 replicons] 
      2. Number of genes: From your home directory, run:
        grep -c "^>" ../../bio425/data/GBB.seq [Answer: N=1,738 genes] 
      3. Number of bases: First filter out FASTA headers using "grep -v" and then remove newline characters using "tr -d":
        grep -v "^>" ../../bio425/data/GBB.1con | tr -d '\n' | wc -m [Answer: N=1,519,856 bases] 
  2. Based on the file /data/biocs/b/bio425/data/ge-breast-cancer-cell-lines.dat, answer the following questions:
    1. What is a transcriptome?
    2. How many unique genes are represented in this chip?
      cut -f1 ../../bio425/data/ge-breast-cancer-cell-lines.dat | grep -vc "^Description" [Answer: N=18,900 genes]
    3. How many cell lines in the file?
      grep "^Description" ../../bio425/data/ge-breast-cancer-cell-lines.dat| cut -f2- | wc -w [Answer: N=59 cells]
    4. Extract gene expression values at 3 breast cancer clinical markers: ERBB2, ESR1, and PGR
      grep -wP "ERBB2|ESR1|PGR" ../../bio425/data/ge-breast-cancer-cell-lines.dat [You should see 3 rows of gene expression values]
Assignment #1 (Final Version; Q4 file name corrected)
Unix Text Filters
  1. Display the absolute path of your home directory
  2. List files in your home directory in long format & ordered by their time stamps
  3. List files and directories in the "/data/biocs/b/bio425/" directory from your home directory
  4. Count the number of plasmids in the B. burgdorferi genome using the file "/data/biocs/b/bio425/GBB.1con"
  5. Show the first five lines of the file "GBB.seq" & save it to a file with arbitrary name
  6. Show your last ten commands using "history"
Read Chapter 1

February 6. Central Dogma with PERL (Part 1)

  • Learning goals:
  1. DNA Replication and Transcription
  2. String manipulations using BASH & PERL
  • In-Class Exercises:
  1. Find out base composition (%A, %T, %C, and %G) of a DNA sequence
    1. In the folder /data/biocs/b/bio425/data/GBB.1con-splitted, the whole B. burgdorferi genome has been splitted into files each of which containing a single replicon. Write a short BASH script to count how many bases in each replicon.
      for f in ../../bio425/data/GBB.1con-splitted/*.fas; do echo -ne "$f\t"; grep -v "^>" $f | tr -d "\n" | wc -m; done
    2. Write a PERL script to count GC% given a FASTA sequence.
      Script posted at /data/biocs/b/bio425/scripts/gc-counter.pl
    3. Run the GC-counter for each replicon using a BASH loop.
      for f in ../../bio425/data/GBB.1con-splitted/*.fas; do perl /data/biocs/b/bio425/scripts/gc-counter.pl $f; done
  2. Central Dogma
    1. Illustrate the Central Dogma using lines representing DNA/RNA/Protein. Indicate directionality of all parts.
      DNA replication, Transcription & Translation: all 5' to 3'
    2. Define cDNA. What are some of the common uses of cDNA?
      Identify alternative-splicing variants (isoforms); Quantify gene expression levels (RNA-SEQ)
  3. DNA replication
    1. What is the implied directionality of a DNA sequence if none is specified?
      5' to 3'
    2. What is the complement strand of this DNA sequence gatactaatgaagtat in 5' to 3' direction?
      atacttcattagtatc
    3. Write a PERL script to output the complementary strand of the ospC gene /data/biocs/b/bio425/data/ospC.seq in 5' to 3' direction. Save the result in a FASTA file ospC.revcom.fas
      Script posted at /data/biocs/b/bio425/scripts/revcom.pl
Assignment #2 (Final)
  1. Modify the gc-counter code /data/biocs/b/bio425/scripts/gc-counter.pl to (1) count only a,t,c,g's (not other letters, e.g., amino acids); see below (2) count bases in both upper-case AND lower-case letters; if ($base =~ /[ATCG]/i) { $base =~ tr/atcg/ATCG/; $count{$base}++; $total_valid++} (3) output GC% (i.e., percentage of G+C among the total bases; formated to no more than 2 decimal points, by using the printf function). my $gc_percent=($count{"G"}+$count{"C"})/$total_valid; printf "%.2f\n", $gc_percent;Show results for the file /data/biocs/b/bio425/data/cp9.seq. 23.69%
  2. Add comments to the revcom script /data/biocs/b/bio425/scripts/revcom.pl to explain what each statement does.
  3. Chapter 1. Problems (pg.31-32):
    1. 1.4. Would you expect the amino acids containing hydroxyl groups (-OH) hydrophobic or hydrophilic? Why? Hydrophilic, because it forms hydrogen bond with the water molecule
    2. 1.6. How does a cDNA library differ from a genomic library? cDNA library does not contain intronic sequences while genomic DNA does.

February 13. Central Dogma with PERL (Part 2)

  • Learning goals: DNA translation & ORF Identification
  • In-Class Exercises:
  1. Six-frame translation
    1. Define ORF and reading frame. How many possible reading frames are there for a given sequence?
      ORF: Hypothetical, computer-predicted protein-coding sequences. An ORF needs experimental data (e.g., mRNA) to be verified as a true gene. There are six possible reading frames for a given DNA sequence: three (+1, +2, +3) on one strand and another three (-1, -2, -3) on the reverse-complement strand. 
    2. How does a cell normally choose only one reading frame out of other possibilities for any given parts of a genome?
      In a prokaryotic cell, transcription factors (TFs) bind to a particular sequence (called "promoters") at the 5'-upstream of an ORF.  TFs recruits RNA polymerase to initiative the transcription of a gene. After the transcription, ribosomes bind to another particular 5'-upstream sequence (SD sequence, normally "AGGAG") to start the translation of a protein.
    3. Using a DNA genetic code table to manually translate the following sequence in all possible reading frames: gatactaatgaagtat . Which reading frame do you think is the most likely one?
      +1: DTNEV; +2: ILMKY; +3:Y**S; -1:ILH*Y; -2:YFISI; -3:TSLV. Frames +3 and -1 could be eliminated.
  2. ORF identification in a bacterial genome
    1. Pick a plasmid sequence from /data/biocs/b/bio425/data/GBB.1con-splitted
      Run ls -lh ../../bio425/data/GBB.1con-splitted/ and choose a small plasmid file, e.g., Borrelia_burgdorferi_4041_cp9_plasmid_C.fas
    2. Identify ORFs on the plasmid by running the program /data/biocs/b/bio425/bin/long-orfs
      /data/biocs/b/bio425/bin/long-orfs /data/biocs/b/bio425/data/GBB.1con-splitted/Borrelia_burgdorferi_4041_cp9_plasmid_C.fas cp9.coord
    3. Extract ORF sequences using the program /data/biocs/b/bio425/bin/extract
      /data/biocs/b/bio425/bin/extract /data/biocs/b/bio425/data/GBB.1con-splitted/Borrelia_burgdorferi_4041_cp9_plasmid_C.fas cp9.coord
Assignment #3 (Final Version)
  1. (10 pts) Write a PERL program to perform 6-frame translation given a FASTA sequence (output: a FASTA file with 6 protein sequences; single-letter amino acid code; * for stop codon). Code posted as /data/biocs/b/bio425/scripts/6-frame.pl. Show results for the input file /data/biocs/b/bio425/data/mystery_seq1.fas. How many long (>=200 bases) ORFs do you see? What are their reading frames? Two long ORFs: one in the "+1" frame (L=107 aa) and another in the "-3" frame (L=177 aa).
  2. (5 pts) Run the "long-orf" program on the above mystery sequence using the following 2 options: "ATG" as start codon and a minimum ORF length of 200 bases. Save the coordinate file as "mystery_seq1.coord". ../../bio425/bin/long-orfs -A ATG -g 200 ../../bio425/data/mystery_seq1.fas mystery_seq1.coord
  3. (10 pts) Write a PERL program that does exactly the same as the program /data/biocs/b/bio425/bin/extract. Input files: (1) "mystery_seq1.fas" (2) "mystery_seq1.coord". Output: A single FASTA file with multiple ORF sequences. Code posted as /data/biocs/b/bio425/scripts/extract.pl.

February 20 (No Class)

  • Monday Schedule

February 27. Genomics with BioPerl (Part 1)

  • Learning goals: Introduction to Objects
  • In-Class Exercises:
  1. Construct a sequence object with a hash
    1. Select and write down at least five features (e.g., strain, gene) associated with a DNA sequence based on this GenBank record. Include a sequence label and the sequence itself as two of the features.
    2. Write a PERL program named "seq_object.pl", which captures these five features with a hash by using feature names as keys and features as values. Example: my %seq_obj=("strain"=>"SD91, "gene"=>"ospC"); Print the hash with Data::Dumper.
      my $seq_hash=("id"=>"SD1_ospC", "seq"=>"tgtaataattcaggaaaaga", "organism"=>"Borrelia burgdorferi", "strain"=>"SD1", "gene"=>"ospC"); print Dumper(\%seq_hash)
    3. Create a scalar variable called "$ref_seq_obj", which is a reference to the hash %seq_obj. Print the hash reference with Data::Dumper.
      my $ref_seq_obj=\%seq_obj; print Dumper($ref_seq_obj)
    4. Name some of the differences between a sequence and a sequence object.
      Sequence refers to a string of nucleotides or amino acids. A sequence is usually represented by a string variable. A sequence object includes biological features associated with a sequence besides the sequence itself. A sequence object is commonly represented by a hash reference in Perl.
  2. Construct a sequence object with Bio::Seq
    1. Modify your program by calling the Bioperl Bio::Seq module:
      use lib '/data/biocs/b/bio425/bioperl-live'; use Bio::Seq;
    2. Convert your hash-based sequence object into a Bio::Seq object:
      my $seqobj = Bio::Seq->new( -display_id => "SD1_ospC", -seq =>"tgtaataattcaggaaaaga" );
    3. Print the Bio::Seq object with Data::Dumper
      print Dumper($seqobj);
  3. Apply Bio::Seq methods
    1. Find the names of methods for the following operations on the Bio::Seq object: reverse complement, length, id, seq, translate, sub-sequence by running
      perldoc /data/biocs/b/bio425/bioperl-live/Bio/Seq.pm
    2. Add the above methods into your script & print all results
      my $seq_rev=$seqobj->revcom()->seq(); my $eq_length=$seqobj->length(); my $seq_id=$seqobj->display_id(); my $seq_string=$seq_obj->seq(); my $seq_translate=$seqobj->translate()->seq(); my $subseq = $seqobj->subseq(1,10)
  4. Discussion Questions
    1. What is Object-oriented Programming?
    2. What is an Object and what is a Method?
      A Perl object is a "blessed" (strictly defined) reference to a hash. A method is a subroutine or function associated with an object. An object and its associated methods together make a class (e.g., the Bio::Seq class).
    3. What are the advantages and disadvantages of Object-Oriented programming in comparison with traditional programming based on subroutines and functions?
      Advantages: Simpler and more readable code. Easier maintenance. Disadvantages: Code dependent on installation of external libraries (e.g., BioPerl). An extra layer of abstraction, e.g.,  the concept of objects and methods.
Assignment #4 (Final version)
  • (10 pts) Write a Bio::Seq-based PERL program to perform 6-frame translation of this sequence "/data/biocs/b/bio425/data/mystery_seq1.fas". [Hints: Reuse the file-reading code from your original script (or copy from the 6-frame.pl code). You need to construct two Bio::Seq objects: one for the original sequence, the other for its reverse complement. You may either use the following methods: revcom(), trunc(), seq(), translate(), or (a simpler but more advanced way) call the translate() method with a "-frame=>" argument. For each method, read the documents on usage. Pay particular attention to the input object (which has to be a Bio::Seq object here), arguments (if any), and the return value (whether a number, a string, or a reference). Code posted as /data/biocs/b/bio425/scripts/6-frame-bioperl.pl.

March 6: Genomics with BioPerl (Part 2)

  • Learning goal: File I/O with BioPerl
  • In-Class Exercises:
  1. Read a FASTA file with Bio::SeqIO
    1. Find out how to read a FASTA file using Bio::SeqIO by running
      perldoc /data/biocs/b/bio425/bioperl-live/Bio/SeqIO.pm
    2. Write a PERL script fasta-io.pl, which uses Bio::SeqIO to read a multi-FASTA file (input) and print the name and length of each sequence (output). Test your script on this file ../../bio425/data/Borrelia_osp.dna.fasta
  2. Output a FASTA file with Bio::SeqIO
    1. Find out how to output a FASTA file using Bio::SeqIO by (again) running
      perldoc /data/biocs/b/bio425/bioperl-live/Bio/SeqIO.pm
    2. Modify the PERL script fasta-io.pl to read a multi-FASTA file (input) and print a translation of each sequence (output). Test your script on this file ../../bio425/data/Borrelia_osp.dna.fasta
  3. Start working on assignment 5 (see below) if you have time.
Assignment #5 (Final Version)
  • (10 pts) Write a BioPerl version of extract.pl by using the Bio::SeqIO (for both reading and outputing FASTA files) and Bio::Seq modules. Input files: (1) "mystery_seq1.fas" (2) "mystery_seq1.coord". Output: A single FASTA file with translated protein sequences. [Hints: Use regular "open" function to read the COORD file (you may copy code from "/data/biocs/b/bio425/scripts/extract.pl" for this part).] Code posted as /data/biocs/b/bio425/scripts/extract-bioperl-version.pl

March 13: Mid-Term Review

  • In-class Exercise: Write a BASH script named as "get-long-orfs.bash" to output long ORFs and their translated protein sequences given a genome sequence. Your script will combine commands and scripts you have previously composed into a single-command utility.
    • Input file: Locate whole plasmid sequences in the "/data/biocs/b/bio425/data/GBB.1con-splitted/" folder:
      • Group 1: use "Borrelia_burgdorferi_4075_lp54_plasmid_A.fas"
      • Group 2: use "Borrelia_burgdorferi_4091_cp26_plasmid_B.fas"
      • Group 3: use "Borrelia_burgdorferi_4041_cp9_plasmid_C.fas"
      • Group 4: use "Borrelia_burgdorferi_4076_lp17_plasmid_D.fas"
      • Group 5: use "Borrelia_burgdorferi_4005_lp25_plasmid_E.fas"
    • Output files: two files (2 bonus points if your output file names are generated dynamically, not hard-coded)
      • "plasmid_X.nuc": ORF sequences in FASTA
      • "plasmid_X.pep": Protein sequences in FASTA
filename=$1; base=$(basename $filename ".fas"); coordfile=$base.coord; nucfile=$base.nuc; pepfile=$base.pep; /data/biocs/b/bio425/bin/long-orfs -A ATG -g 200 $filename $coordfile; perl extract.pl $filename $coordfile > $nucfile; perl extract-bioperl-version.pl $filename $coordfile > $pepfile
  • Sample Questions:
  1. Define elements of a prokaryotic gene: ORF, promoter, RBS-binding sites
  2. Construct a single "for" loop to translate a sequence in six frames
  3. Print the reverse-complement sequence given a Bio::Seq object
  • Mid-term will cover the following contents (Review all in-class exercises and assignments)
    • Biology: genome, transcriptome, 6-frame translation, gene structure
    • Linux file system & text tools: ls [-lart]; less; grep [-ivcwP]; cat; cut [-fd]; head; tail; bash script (for loop); tr; wc [-lwm]
    • Gene-finding using GLIMMER: long-orfs, extract
    • Basic Perl: file I/O; loops (for; foreach; while); regex; using hash for counts and translation
    • Object-oriented BioPerl: the use Bio::SeqIO & Bio::Seq

March 20. Midterm Practicum


March 27 (No Class)

See assignments above


April 3: Transcriptome with R (Part 1)

  • Learning goal: Introduction to R
  • R resources
  1. Forget about Excel! Instead, use R for statistical analysis and visualization of large data sets.
  2. Download and install R to your own computer from: R website
  3. Download and install R studio to your own computer from: R Studio website
  4. A nice tutorial: SimpleR
  • In-Class Exercises: Part 1.
  1. Set a working directory
    1. Using a Linux terminal, make a directory called R-work
    2. Start R-Studio (Note: This link works only if you use computers in the 1000G lab. Install and use your own R Studio for homework assignments)
    3. Find working directory with getwd()
    4. Change working directory with setwd("~/R-work")
  2. The basic R data structure: Vector
    1. Construct a character vector with c.vect=c("red", "blue", "green", "orange", "yellow", "cyan")
    2. Construct a numerical vector with n.vect=c(2, 3, 6, 10, 1, 0, 1, 1, 10, 30)
    3. Construct vectors using functions
      1. n.seq1=1:20
      2. n.seq2=seq(from=1, to=20, by=2)
      3. n.rep1=rep(1:4, times=2)
      4. n.rep2=rep(1:4, times=2, each=2)
    4. Use built-in help of R functions: ?seq or help(seq)
    5. Find out data class using the class function: class(c.vect)
  3. Access vector elements
    1. A single value: n.vect[2]
    2. A subset: n.vect[3:6]
    3. An arbitrary subset: n.vect[c(3,7)]
    4. Exclusion: n.vect[-8]
    5. Conditional: n.vect[n.vect>5]
  4. Apply functions
    1. Length: length(n.vect)
    2. Range: range(n.vect); min(n.vect); max(n.vect)
    3. Descriptive statistics: sum(n.vect); var(n.vect); sd(n.vect)
    4. Sort: order(n.vect). How would you get an ordered vector of n.vect? [Hint: use ?order to find the return values]
    5. Arithmetics: n.vect +10; n.vect *10; n.vect / 10
  5. Quit an R session
    1. Click on the "History" tab to review all your commands
    2. Save your commands into a file by opening a new "R Script" and save it as vector.R
    3. Save all your data to a default file .RData and all your commands to a default file ".Rhistory" with save.image()
    4. Quit R-Studio with q()

  • In-Class Exercises: Part 2
  1. Start a new R studio session and set working directory to ~/R-work
  2. Generate a vector of 100 normal deviates using x.ran=rnorm(100)
  3. Visualize the data distribution using hist(x.ran)
  4. Explore help file using ?help; example(hist)
  5. How to break into smaller bins? How to add color? How to change x- and y-axis labels? Change the main title?
  6. Test if the data points are normally distributed.[Hints: use qqnorm() and qqline()]
  7. Save a copy of your plot using "Export"->"Save Plot as PDF"

  • In-Class Exercises: Part 3
  1. Using a Linux terminal, make a copy of breast-cancer transcriptome file /data/biocs/b/bio425/data/ge.dat in your R working directory
  2. Start a new R studio session and set working directory to ~/R-work
  3. Read the transcriptome file using ge=read.table("ge.dat", header=T, row.names=1, sep="\t")
    1. What is the data class of ge?
    2. Access data frame. What do the following commands return? ge[1,]; ge[1:5,]; ge[,1]; ge[,1:5]; ge[1:5, 1:5]
    3. Apply functions: head(ge); tail(ge); dim(ge)
  4. Save a copy of an object: ge.df=ge.
  5. Transform the transcriptome into a numerical matrix for subsequent operations: ge=as.matrix(ge)
  6. Test if the expression values are normally distributed.
  7. Save and quit the R session

Assignment #6 (Final Version)
  • (0 pts) Install R and R Studio to your home/laptop computer
  • (5 pts) Make a histogram of the "ge.dat". Are the data points normally distributed? Show all R commands and the final plot. [Notes: You need to download a copy of the ge.dat onto your own computer. On Mac, you could run this command: scp your_user_name@eniac.geo.hunter.cuny.edu:ge.dat ge.dat. On Windows, download and install sftp or WinSCP for file transfer from/to your eniac account.]
  • (5 pts) Formulate one question the ge.dat transcriptome data set may be useful for understanding breast cancers. [Examples (feel free to re-use and refine): Are all breast cancer cells similar or different in gene-expression levels? What genes are associated with early or late clinical stages? What genes are associated with drug/treatment resistance? Could gene expression be used for early diagnosis? For predicting drug responses (as in personalized medicine)?

April 10: Transcriptome with R (Part 2)

  • Learning goal: Classification of breast-cancer subtypes
  • In-Class Exercises: Part 1. Gene filtering
  1. Open a new R Studio session and set working directory to R-work
  2. Load the default workspace and plot a histogram of the gene expression using hist(ge, br=100). Answer the following questions:
    1. Make sure ge is a matrix class. If not, review the last session on how to make one
    2. What is the range of gene expression values? Minimum? Maximum?
      range(ge); min(ge); max(ge)
    3. Are these values normally distributed? Test using qqnorm and qqline.
    4. If not, which data range is over-represented? Why?
      Low gene expression values are over-represented, because most genes are NOT expressed in a particular cell type/tissue.
  3. Discussion Questions:
    1. What does each number represent?
      log2(mRNA/cDNA_amount)
    2. Why is there an over-representation of genes with low expression values?
      Because most genes are not expressed in these cancer cells
    3. How to filter out these genes?
      Remove genes that are expressed in low amount in these cells, by using the function pOverA (see below)
    4. How to test if the filtering is successful or not?
      Run qqnorm() and qqline()
  4. Remove genes that do not vary significantly among breast-cancer cells
    1. Download the genefilter library from BioConductor using the following code
      source("http://bioconductor.org/biocLite.R"); biocLite("genefilter")
    2. Load the genefilter library with library(genefilter)
    3. Create a gene-filter function: f1=pOverA(p=0.5, A=log2(100)). What is the pOverA function?
      Remove genes expressed with lower than log2(100) amount in half of the cells
    4. Obtain indices of genes significantly vary among the cells: index.retained=genefilter(ge, f1)
    5. Get filtered expression matrix: ge.filtered=ge[index.retained, ]. How many genes are left?
      dim(ge.filtered)
  5. Test the normality of the filtered data set
    1. Plot with hist(); qqnorm(); and qqline(). Are the filtered data normally distributed?
    2. Plot with boxplot(ge.filtered). Are expression levels distributed similarly among the cells?
  • In-Class Exercise: Part 2. Select genes vary the most in gene expression
  1. Explore the function mad. What are the input and output?
    Input: a numerical array. Output: median deviation
  2. Calculate mad for each gene: mad.ge=apply(ge.filtered, MARGIN=1, FUN=mad)
  3. Obtain indices of the top 100 most variable genes: mad.top=order(mad.ge, decreasing=T)[1:100]
  4. Obtain a matrix of most variable genes: ge.var=ge.filter[mad.top,]
  • In-Class Exercise: Part 3. Classify cancer subtypes based on gene expression levels
  1. Discussion Questions:
    1. How would you measure the difference between a one-dimensional variable?
      d=|x1-x2|
    2. How would you measure the difference between a two-dimensional variable?
      d=|x1-x2|+|y1-y2|
    3. How would you measure the Euclidean difference between a three-dimensional variable?
      d=|x1-x2|+|y1-y2|+|z1-z2|
    4. How would you measure the Euclidean difference between a multi-dimensional variable?
      d=SQRT(sum([xi-xj]^2))
    5. To measure similarities between cells based on their gene expression values, is it better to use Euclidean or correlation distances?
      Correlational distance measures similarity in trends regardless of magnitude.
  2. Calculate correlation matrix between cells: cor.cell=cor(ge.var)
  3. Calculate correlation matrix between genes: cor.gene=cor(t(ge.var)) What does the t() function do?
    transposition (turn rows into columns and columns into rows)
  4. Obtain correlational distances between cells: dg.cell=as.dendrogram(hclust(as.dist(1-cor.cell)))
  5. Obtain correlational distances between genes: dg.gene=as.dendrogram(hclust(as.dist(1-cor.gene)))
  6. Plot a heat map: heatmap(ge.var, Colv=dg.cell, Rowv=dg.gene)
Assignment #7 (Final)
  • (5 pts). Obtain a heat map of gene expression values of top-variable 50 genes among the 49 cells using the ge.dat data set. Show your R commands and the final heat map.
  • (5 pts) Guided Reading. Read this paper and answer the following questions
  1. Describe the main purpose of the study
  2. List at least 3 genomic features of cancer cells the study generated
  3. What microarray platform did the study use? How was the transcriptome data set used for predicting drug effects?

April 17: Transcriptome with R (Part 3)

  • Learning goal: Biomarker Discovery of Cancer Drugs
  • Discussion Questions
  1. What is the main goal of study? What is a bio-marker? Why biomarkers are useful?
    The main goal is to identify genes correlated with anti-cancer compounds. A bio-marker is a set of genes associated with a disease or disease treatment. Bio-markers allow, e.g., prediction of drug effectiveness.
  2. How many molecular features of cancer cells were assayed?
    The study profiled the transcriptome, whole-genome SNPs, cancer-related mutations, and drug sensitivity of cancer cell lines.
  3. What is IC50? What statistical tests would you use to identify genes associated with drug sensitivity?
    IC50 is the 50% inhibitory concentration of a compound. It measures drug sensitivity of cells. T-tests or correlation analysis are used to identify genes associated with drug sensitivity.
  • In-Class Exercise 1. Pre-processing a drug-sensitivity data set
  1. Copy the panobinostat IC50 data file /data/biocs/b/bio425/data/pano-ic50.datinto your R-Work directory
  2. Start a new R Studio session and read the file and save to a variable: ic=read.table("pano-ic50.dat", header=F, row.names=1, sep="\t")
  3. Use hist(), qqnorm(), qqline() to examine IC50 distribution. Is the distribution normal?
  4. Perform proper data transformation to obtain a normally-distributed data set.
    The IC50 are not normally distributed. The logarithm of IC50 values are normally distributed.
  5. Data visualization and presentation by replicating the FIG.2(e) in the paper
    1. Use boxplot with color to show distribution of transformed IC50 values
      boxplot(log10(ic[,1]))
    2. Add points to the boxplot using these two functions: points() and jitter()
      points(jitter(rep(1,28), factor=5), log10(ic[,1]))
  6. Order the cells by their IC50 value and save the ordered list as ic.ordered
    ic.ordered=ic[order(ic[,1]), ]
  7. Separate the cells into 2 groups: one sensitive to the drug (low IC50) and another resistant to the drug (high IC50)
    ic.sensitive=ic.ordered[1:14]; ic.resistant=ic.ordered[15:28]
  • In-Class Exercise 2. Pre-processing the GE data
  1. Assign names to ic.ordered: names(ic.ordered)=rownames(ic)[order(ic)]
  2. Get column indices of cells with IC50 values from the filtered data set: ind=match(names(ic.ordered), colnames(ge.filter), nomatch=0)
  3. Get subset using ge.sub=ge.filter[,ind]
  4. Show column names of ge.sub and make sure they are ordered by IC50
  • In-Class Exercise 3. Identify bio-markers
  1. Assign first 17 as "sensitive" group and the last 11 as the "resistant" group: groups=factor(c(rep(1,17), rep(2,11)))
  2. Load the library library(genefilter)
  3. Run t-tests for each gene and save results: t.out=rowttests(ge.sub,groups)
  4. Select the top significant genes using the cutoff of p=0.001: t.sig=t.out[which(t.out[,3]<1e-3),]
  5. Obtain the GE profile with identified biomarkers: ge.markers=ge.sub[rownames(t.sig),]
  6. Visualize the ge.markers with a heat map. Calculate and display correlation clusters of genes, but not for cells. Instead, display a color strip of IC50 of cells with the heatmap option ColSideColors=cm.colors(28) or ColSideColors=rainbow(28, start=0, end=0.3)
    cor.gene=cor(t(ge.markers)); dg.gene=as.dendrogram(hclust(as.dist(1-cor.gene))); heatmap(ge.markers, Colv=NA, Rowv=dg.gene, ColSideColors=rainbow(28, start=0, end=0.3))
  7. Answer the following questions with the heat map
    1. How many genes are more highly expressed in sensitive cells? How many in more resistant cells?
    2. How would you use these genes (bio-markers) to predict sensitivity of cancer cells with unknown IC50?
Assignment #8 (Final)
  • (10 pts) Show boxplot (with points) and heatmap. Include your R commands. How many genes ("gene-group-1") with expression levels significantly high in the resistant group relative to the sensitive group? How many genes ("gene-group-2") having the opposite pattern? Indicate on your heatmap which are the resistant cells, which are the sensitive cells, and the two gene groups.

April 24: Molecular Phylogenetics (Part 1)

  • Learning goals:
  1. Homology search using BLAST
  2. Multiple alignment using clustalw
  3. Distance-based phylogeny
  • In-Class Exercises: Part 1. Homology searching with BLAST
  1. Construct a sequence database
    1. Make a directory called "phylo-work"
    2. Copy a four-genome protein file into this directory. The file is located at /data/biocs/b/bio425/data/Four-Borrelia-Genomes.pep
    3. Find out how to make a sequence database by reading help file: makeblastdb -help.
      (You need to log in to the "mysql" host first by running: ssh -X mysql) makeblastdb -in Four-Borrelia-Genomes.pep -dbtype 'prot'
  2. Search for homologs of OspA
    1. Copy the OspA protein sequence into your "phylo-work" directory. The file is at /data/biocs/b/bio425/data/ospA.pep
    2. Read the Stand-alone BLAST+ documentation to find out which blast program you should use
    3. Run blastp using the following parameters: query: ospA.pep; database: Four-Borrelia-Genomes.pep; e-value: 1e-5
      blastp -query ospA.pep -db Four-Genomes.pep -evalue 1e-5
    4. Change the output format to tabular view
      blastp -query ospA.pep -db Four-Genomes.pep -evalue 1e-5 -outfmt 6
  3. Discussion Questions
    1. What is homology?
      Sharing of a common ancestor
    2. What is a homolog?
      Homologous sequences
    3. Define the following BLAST terms: Query, Subject, Identity, Gap, E-value, and Score
      E-value is the number of hits by chance. The smaller the number, the more statistically significant the results are.
  • In-Class Exercises: Part 2. Run multiple sequence alignment with CLUSTAL-W
  1. Select and copy all homologs into a single FASTA file and name it ospA-homologs.fas
    grep -A1 "BBA15" Four-Borrelia-Genomes.pep > ospAB.fas. Append with 7 other hits.
  2. Run CLUSTAL-W using commands. The software is installed on host "mysql". [Note: You may need to ssh into the mysql host, before you could run the command clustalw2]
    clustalw2 -infile=ospAB.fas -output=phylip
  3. Set the output format as PHYLIP
  4. Discussion Question: What is the biological meaning of alignment gaps?
    Hypothetical insertions or deletions
  • In-Class Exercises: Part 3. Construct distance-based phylogeny with PHYLIP
  1. Get pair-wise evolutionary distances using the program protdist. Again, since the programs are installed on the "mysql" server, you may need to first ssh into the mysql host.
    Run "protdist". Type in "ospAB.phy" (the output file from clustalw2) as input file. Save output as: mv outfile ospAB.protdist
  2. Obtain a neighbor-joining tree using the program neighbor. Save the output tree as ospAB.dnd
    Run "neighbor". Type in "ospAB.protdist". Rename output: mv outtree ospAB.dnd
  3. Visualize tree using the APE package in R
    1. Start a new R Studio session
      ssh -X mysql
    2. Load the ape package: library("ape")
    3. Read tree with the function tr=read.tree("ospAB.dnd")
    4. Plot tree with the function plot(tr). To get help on tree plotting: help(plot.phylo)
    5. Explore different visualization styles ("phenogram", "unrooted", "circular") and colors for nodes and branches
  4. Discussion Questions
    1. What is the unit of evolutionary distance between two sequences?
      Number of amino-acid substitutions
    2. What are the biological meanings of leaf nodes, internal nodes, root node, and branch lengths?
      Leaf nodes represent input sequences. Internal nodes represents hypothetical ancestors. Root node represents the hypothetical most recent common ancestor of all sequences. Branch lengths are proportional to the number of substitutions.
    3. How would you measure evolutionary relatedness?
      By the position of common ancestors
    4. How would you measure evolutionary similarity?
      By the tree distance between two nodes
Assignment #9 (Final version)
  • (10 pts) Show your final tree in at least two styles. List the R commands. Using your own words to
  1. Define homology and homologs
  2. Define BLAST e-value
  3. Define evolutionary distances
  4. Define tree nodes and branch lengths

May 1: Molecular Phylogenetics (Part 2)

  • Learning goals:
  1. Learn to read a phylogenetic tree
  2. Phylogenomics: identification of orthologous and paralogous genes
  • In-Class Exercise 1.
Is Frog more related to Fish or to Human?
Which is the closest relative of tetrapods? Is the Lungfish more related to Human or to Coelacanth?
File:Phylo-Quizz.pdf
Answer the 10 questions
  • In-Class Exercise 2. Edit FASTA file to assign informative sequence IDs
  1. Open the ospA homolog file ospAB.pep using vi, emacs, or gedit
  2. Rename each sequence with shortened (< 10 chars), informative names:
    1. "BBA15" => "B31_ospA"
    2. "BBA16" => "B31_ospB"
    3. Other six sequences in the same "Strain_gene" format: e.g., N40_J57, PBi_BGA14, PKo_2016, PBi_BGA15, PKo_2017, N40_J56
  3. Save the file and quit
  4. Rerun clustalw2, protdist, and neighbor (see last session). Rename your final outtree file as ospAB.nj
  5. Show the final tree using cat ospAB.nj. What is the NEWICK file format?
  • In-Class Exercise 3. Give the tree a proper root
  1. SSH into the "mysql" server with the "-X" option: ssh -X mysql
  2. Load the library: library(ape)
  3. Load another library: library(phangorn)
  4. Read the tree file and save the tree as an object: tr=read.tree("ospAB.nj")
  5. Root the tree at mid-point: tr.mid=midpoint(tr)
  6. Plot the rooted tree: plot(tr.mid)
  7. Answer the following questions based on the rooted tree:
    1. Identify how many homologous sequences of OspA in each genome?
    2. For each genome, which sequence is most likely to be OspA? Which is OspB?
    3. According to the midpoint-rooted tree, which node represents the ancestor of OspA, which node the ancestor of OspB?
    4. Why are homologous sequences within a genome (e.g., OspA and OspB in B31) less similar to homolgous sequences in different genomes (e.g., OspA in B31 and N40)? Identify the biological processes.
    5. Define and distinguish two types of homology: orthology and paralogy
    6. Which groups are more likely to share the same biological function, orthologs or paralogs?
    7. Describe steps for predicting gene functions by building a phylogenetic tree of homologous sequences
Assignment #10 (Last assignment. Final version)
  • (9 pts) Plot the midpoint rooted tree & answer the following questions:
  1. Indicate an orthologous group of sequences. Explain why.
  2. Indicate two paralogous sequences. Explain why.
  3. List and describe steps of using a phylogenetic tree to predict the functions of an unknown protein sequence.

May 8: Final Project (Session I)

  • Goals:
  1. Claim your individual project
  2. Formulate an outline of the final project report
  3. Set milestones to be completed in a week
Project Biological Concepts Computational inputs Computational outputs Statistical analysis
Codon Usage I genetic code, codon degeneracy, codon usage, GC% CUTG table Frequencies of codons, grouped by amino acid; GC% Are synonymous codons uniformly used? (Hint: use chisq.test in R.
Codon Usage II genetic code, codon degeneracy, codon usage, GC% GBB.seq, which is a FASTA file of n=1738 ORF sequences of B. burgdorferi B31. Use Bio::SeqIO to read the file and Bio::Tools::CodonUsage to translate codons Frequencies of codons, grouped by amino acid; GC% What are the possible factors causing biased codon usages? Compare the codon usage of virulence-related genes with others. Do you expect the usage more or less biased?
Splicing Signal intron, exon, splicing, donor site, acceptor site, information mdm2 gene sequence and a coordinate file of introns (1) Extract donor and acceptor sequences, (2) Calculate information content (in bits) at each site Plot a WebLogo
Protein sequence evolution homology, orthology, paralogy, neufunctionalization of duplicated genes, homology modeling A FASTA file of OspA and OspB sequences from 8 Borrelia species; OspA structure from PDB (1) alignment, (2) midpoint-rooted phylogeny, (3) a homology model of OspB. What sites vary between species? What between OspA and OspB? Where are these sites located on the OspA structure?
DataMonkey pipeline Positive natural selection A FASTA file of ospB coding sequences from 8 Borrelia species What sites are under positive natural selection, based on MEME-Hyphy analysis? Build a LWP-based pipeline for automated analysis using DataMonkey
Phylogenetics Pipeline BLAST, alignment, phylogeny OspA sequence & Four Genome protein database (1) "fetch-seq.pl" to extract FASTA sequences of BLAST hits. (2) A phylogenetic tree in PDF How to root a phylogenetic tree? How to test the statistical significance of a tree?
Transcriptomes of cancer subtypes I microarray, transcriptome, gene expression, fold change leukemiasEset dataset (1) a heat map after gene filtering; (2) A list of genes ordered by their significance in expression profile between the four subtypes, using rowftest(). Pathway analysis of significantly expression
Transcriptomes of cancer subtypes II microarray, transcriptome, gene expression, fold change CCLE expression matrix of breast-cancer cells (1) a heat map; (2) classify into subtypes and use cutree to separate into two groups; (3) A list of genes ordered by their significance in expression profile between the two subtypes Pathway analysis of significantly expressed genes
CpG depletion in human genome role of CpG islands in gene regulation GBB.1con; a partial Human genome sequence dinucleotide frequencies test significance of over and under-representation of CpG
Ancestral sequence changes phylogenetic reconstruction; phylogenetic inference OspAB.fas (1) extract ancestral sequences in the proml outfile; (2) identify changes on each tree branch Test of significance of reconstructed sequences
Identify variable sites alignment, sequence variation OspAB.phy (1) read alignment with Bio::AlignIO; (2) Identify constant and variable sites Test which sites vary between species, between orthologs, and between paralogs
MLST of Pseudomonas aeruginosa MLST of bacterial strains, ortholog, phylogeny 10 genome files; ortholog table (1) ortholog sequences (nucleotides, not protein); (2) concatenated alignments; (3) a combined phylogeny of genomes (using FastTree) Display/Root tree using R packages
Shuffled IGS alignments in Borrelia IGS, gene regulation, promoter IGS alignments from cp26 and lp54 plasmids (1) shuffled alignments; (2) counts of conserved blocks; (3) a plot of counts Test the significance of observed blocks


RNA-SEQ analysis transcriptome, RNA-SEQ RNA-SEQ data from 5 mosquito development stages (1) mapped sequence reads; (2) genes significantly differentially expressed; (3) R plots Test the significance of differentially expressed genes

May 15: Final Project (Session 2)

  • Goals:
  1. Help debug your Perl/R scripts
  2. Check your report outline
  3. Set specific expectations for your final report
  • A suggested template for the final report
  1. Title Page
    1. One page
    2. Title: One-line summary of methods and conclusion
    3. Name & Date
    4. Table of Contents
  2. Background & Introduction
    1. One page, 1.5 line-spaced, size 12 font; worth 15 pts
    2. 1st paragraph: Describe biological questions and objectives of your project
    3. 2nd paragraph: Define and explain any biological terminologies you will use (e.g., ORF, codon, transcription, intron, genome, etc)
    4. 3rd paragraph: Summarize your approach
    5. Unless it is your own opinion, use citations to indicate your information source and back up each of your statements and claims, e.g., (Caserta et al. 2012)
  3. Materials & Methods
    1. One page; worth 10 pts
    2. List the source of your input data (GenBank, etc)
    3. Describe your computational algorithm (preferably with a flow chart)
    4. Explain statistical methods
  4. Results and Conclusion
    1. One page; worth 10 pts
    2. Show your program output as well as results of statistical analysis (e.g. with an R figure with legends)
    3. Describe results
    4. Draw your conclusions
  5. Literature Cited
    1. Worth 5 pts
    2. Include Author, Year, Journal/Link URL, e.g., Caserta E, Haemig HAH,Manias DA, Tomsic J, Grundy FJ, HenkinTM, DunnyGM. 2012. In vivo and in vitro analyses of regulation of the pheromone-responsive prgQ promoter by the PrgX pheromone receptor protein. J. Bacteriol. 194:3386 –3394.
  6. Appendix
    1. Worth 10 pts
    2. Attach your Perl/R scripts
    3. Use the Carrier font and proper indentation

May 22: Final Project Due (5pm in my office @HN839)

  • Sample Projects
  1. [Claimed](Genomics) Explore codon usage I: Write a PERL script to parse the codon usage table of Borrelia burgdorferi B31. Test if the synonymous codons are equally used or there are statistically significant biases.
  2. (Genomics) Explore codon usage II: Write a BioPerl-based script to calculate codon usages for individual genes. Test which genes have the most codon biases using the codon-adaptation index.
  3. [Claimed](Transcriptomics) Tissue-specific gene expressions: Download a set of GE profile of lung cancer cells and another set for lymphoma cells. Identify genes significantly differentially expressed in the two cell types
  4. [Claimed](Transcriptomics) Identify cancer subtypes and biomarkers of subtypes using R/Bioconductor
  5. (Transcriptomics) Identify genes associated with drug responses
  6. [Claimed](Phylogenetics) Write a bash pipeline to construct a molecular phylogenetic tree of a protein family
  7. [Claimed](Phylogenetics) Write a BioPerl script to identify all variable sites given an alignment
  8. [Claimed](Phylogenetics) Reconstruct ancetral sequences based on a phylogenetic tree. Identify evolutionary changes at each codon position and on each branch.
  9. [Claimed](informatics) Compose a Perl script to calculate information content as intron-exon junctions
  • Project Ideas
  1. Construct bioinformatics workflow using BASH/Perl/BioPerl
  2. Cancer gene expression analysis using R/Bioconductor
  3. Phylogenomics genomics using APE
  4. Build a genome database with Perl/SQL
  • Course/Project Assessment (You project will have ALL 3 of these components)
    • One Learning Goal in biological computation (20 pts): string manipulations using Linux/Perl/BioPerl/SQL/R
    • One Learning Goal in biological theory (15 pts): Central Dogma/Genome Variation/Gene Expression/Phylogenetics
    • One Learning Goal in biological data analysis (15 pts): Data transformation/normal distribution/t-test/visualization using heatmap/cluster analysis
  • Summer Internship opportunities
  1. Hunter College: Comparative genomics of Borrelia burgdorferi, the Lyme bacteria
  2. Einstein Medical College: Gene expression analysis of Toxoplasma gondi development
  3. Memorial Sloan-Kettering Cancer Center: Comparative genomics of infectious and environmental isolates of Pseudomonas aeruginosa

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
  • Install R-Studio
  • For users of Ubuntu/Debian:
sudo apt-get install r-base-core

Utilities

Other Resources

© Weigang Qiu, Hunter College, Last Update ~~