Biol425 2014: Difference between revisions

From QiuLab
Jump to navigation Jump to search
imported>Weigang
imported>Weigang
Line 90: Line 90:


===February 19. Genomics (2): BioPerl===
===February 19. Genomics (2): BioPerl===
Lecture Slides: [[File:Session-3-small.pdf|thumbnail|Session 3]]
* Lecture Slides: [[File:Session-3-small.pdf|thumbnail|Session 3]]
* Learning goal: (1) Object-Oriented Perl; (2) BioPerl
* Learning goal: (1) Object-Oriented Perl; (2) BioPerl
* In-Class Exercises
* In-Class Exercises
Line 123: Line 123:
# Rewrite the "extract.pl" using BioPerl, including the use of Bio::SeqIO to read the genome FASTA file and the use of Bio::Seq for obtaining coding sequences and translating sequences. Your output of protein sequences should not contain stop codons except as the last codon.
# Rewrite the "extract.pl" using BioPerl, including the use of Bio::SeqIO to read the genome FASTA file and the use of Bio::Seq for obtaining coding sequences and translating sequences. Your output of protein sequences should not contain stop codons except as the last codon.
|-style="background-color:powderblue;"
|-style="background-color:powderblue;"
| '''Read & Respond''' BLAST
| '''Read & Respond'''
# Box 2.2. Searching sequence databases using BLAST (p.96-97)
# Exercise 2.3. Perform a BLAST search online
# Define (with your own words) the following BLAST terms: Query, BLAST database, e-value, identity
|}
|}



Revision as of 05:20, 19 February 2014

Computational Molecular Biology (BIOL 425/790.49, Spring 2014)
Instructors: Weigang Qiu (Associate Professor of Biology; weigang at genectr.hunter.cuny.edu, 212-772-5296) & Slav Kendall (Assistant; sviatoslav.kendall at gmail.com)
Room:1000G HN (10th Floor, North Building, Computer Science Department, Linux Lab FAQ)
Class Hours: Wednesdays 10:10 am-12:40 pm
Office Hours: Room 839 HN; Wednesdays 5-7pm or by appointment

Course Schedule (All Wednesdays)

January 29. Course overview & Unix tools

  • Course Overview:
  • Learning Goals: (1) Understand the "Omics" files; (2) Review/Learn Unix tools
  • In-Class Tutorial: Unix file filters
  1. Without changing directory, long-list genome, transcriptome, and proteome files using ls
  2. Without changing directory, view genome, transcriptome, and proteome files using less -S
  3. Using grep, find out the size of Borrelia burgdorferi B31 genome in terms of the number of replicons ("GBB.1con" file)
  4. Using sort, sort the replicons by (a) contig id (3rd field, numerically); and (b) replicon type (4th field)
  5. Using cut, show only the (a) contig id (3rd field); (b) replicon type (4th field)
  6. Using tr, (a) replace "_" with "|"; (b) remove ">"
  7. Using sed, (a) replace "Borrelia" with abbreviation "B."; (b) remove "plasmid" from all lines
  8. Using paste -s, extract all contig ids and concatenate them with ";"
  9. Using a combination of cut and uniq, count how many circular plasmids ("cp") and how many linear plasmids ("lp")
  • In-Class Challenges
  1. Using the "GBB.seq" file, find out the number of genes on each plasmid
 grep ">" ../../bio425/data/GBB.seq | cut -c1-4| sort | uniq -c
  1. Using the "ge.dat" file, find out (a) the number of genes; (b) the number of cell lines; (c) the expression values of three genes: ERBB2, ESR1, and PGR
 (a)grep -v "Description" ../../bio425/data/ge.dat | wc -l; or:  grep -vc "Description" ../../bio425/data/ge.dat (b) grep "Description" ../../bio425/data/ge.dat | tr '\t' '\n'| grep -v "Desc" | wc -l (c) grep -Pw "ERBB2|PGR|ESR1" ../../bio425/data/ge.dat
Assignment #1
Unix Text Filters (5 pts) Show both commands and outputs for the following questions:
  1. Without changing directory (i.e., remain in your home directory), locate and long-list the genbank file named "GBB.gb" in the course data directory
  2. Count the total number of lines, show the first and last 10 lines of the file. Using a combination of head and tail commands, show only the lines containing the translated protein sequence of the first gene
  3. Count the total number of replicans by extracting lines containing "LOCUS" (case sensitive); sort them by the total number of bases ("bp")
  4. Remove the string "(plasmid" from the above output
  5. Extract the second column (replicon names) from the above output. [Hint: these fields are delimited by an unequal number of spaces, not by tabs. Use tr -s to first squeeze to single space]
Read & Respond (5 pts)

Genome sequencing technologies: textbook, pg. 79-83

  1. Briefly list and describe three new sequencing technologies
  2. Contrast the "hierarchical" and "shotgun" strategies of whole-genome sequencing
  3. Explain the following sequencing terms: "reads", "contigs", "scaffolds", "assemblies"

February 5. Genomics (1): Gene-Finding

  • Lecture Slides:
  • Learning goals: (1) Running UNIX programs; (2) Parse text with Perl anonymous hash
  • In-Class Tutorials
  1. Identify ORFs in a prokaryote genome
    1. Go to NCBI ORF Finder page
    2. Paste in the GenBank Accession: AE000791.1 and click "orfFind"
    3. Change minimum length for ORFs to "300" and click "Redraw". How many genes are predicted? What is the reading frame for each ORF? Coordinates? Coding direction?
    4. Click "Six Frames" to show positions of stop codons (magenta) and start codons (cyan)
  2. Gene finder using GLIMMER
    1. Locate the GLIMMER executables: ls /data/biocs/b/bio425/bin/
    2. Locate Borrelia genome files: ls /data/biocs/b/bio425/data/GBB.1con-splitted/
    3. Predict ORFs: ../../bio425/bin/long-orfs ../../bio425/data/GBB.1con-splitted/Borrelia_burgdorferi_4041_cp9_plasmid_C.fas cp9.coord [Note the two arguments: one input file and the other output filename]
    4. Open output file with cat cp9.coord. Compare results with those from NCBI ORF Finder.
    5. Extract sequences into a FASTA file: ../../bio425/bin/extract ../../bio425/data/GBB.1con-splitted/Borrelia_burgdorferi_4041_cp9_plasmid_C.fas cp9.coord > cp9.fas [Note two input files and standard output, which is then redirected (i.e., saved) into a new file]
  3. Complex data structure with references
    1. Type the code from slides and save it as a file "read-coord.pl".
    2. Check syntax with perl -c read-coord.pl
    3. Make it executable: chmod +x read-coord.pl
    4. Run the code: ./read-coord.pl cp9.coord
  • In-Class Challenge
  1. Use NCBI ORF Finder & GLIMMER to predict ORFs in ../../bio425/data/mystery_seq1.fas
Assignment #2 (Finalized on: Sat 2/8 4pm)
UNIX & Perl Exercise (5 pts)
  1. Use GLIMMER to predict ORFs in ../../bio425/data/mystery_seq1.fas. Save resulting coord file as "mystery_seq1.coord".
  2. Write a PERL program (named "extract.pl") that does exactly the same as the program /data/biocs/b/bio425/bin/extract. Two input files: (1) "mystery_seq1.fas" (2) "mystery_seq1.coord". One output: standard out (screen output) of a single FASTA file with multiple ORF sequences. Bonus points for outputting sequences beginning with a start codon and ending with a stop codon, which requires reverse complement for ORFs encoded on the opposite strand.

Note: Show the code itself, the command to run the code, and the output.

Read, Watch, & Respond (5 pts)
  1. Read Box 1.2 GenBank Files (pg 26-27) and answer the following questions:
    1. What is the accession, gene, and source of this sequence
    2. Why is "gene" longer than "CDS"? Define these two terms
  2. To prepare for the next session on BioPerl (which is based on the object orientation paradigm), watch this short video and define a "class" and an "object". In designing a "biological_sequence" class, what would be your choices of "properties" and "behavior/methods"? (list three or more properties AND methods).

{{#ev:youtube|SS-9y0H3Si8|200|left|An introduction to Object-Oriented Programming}}


February 12 (No Class)

  • Lincoln's Birthday

February 19. Genomics (2): BioPerl

  • Lecture Slides:
  • Learning goal: (1) Object-Oriented Perl; (2) BioPerl
  • In-Class Exercises

Construct and dump a Bio::Seq object

#!/usr/bin/perl -w
use strict;
use lib '/data/biocs/b/bio425/bioperl-live'; 
use Bio::Seq;
use Data::Dumper;
my $seq_obj = Bio::Seq->new( -id => "ospC", -seq =>"tgtaataattcaggaaaaga" );
print Dumper($seq_obj);
exit;

Apply Bio::Seq methods:

my $seq_rev=$seq_obj->revcom()->seq(); # reverse-complement & get sequence string
my $eq_length=$seq_obj->length(); 
my $seq_id=$seq_obj->display_id(); 
my $seq_string=$seq_obj->seq(); # get sequence string
my $seq_translate=$seq_obj->translate()->seq(); # translate & get sequence string
my $subseq1 = $seq_obj->subseq(1,10); # subseq() returns a string
my $subseq2= $seq_obj->trunc(1,10)->seq(); # trunc() returns a truncated Bio::Seq object
  • Challenge 1: Write a BioPerl-based script called "bioperl-exercise.pl". Start by constructing a Bio::Seq object using the "mystery_seq1.fas" sequence. Apply the trunc() method to obtain a coding segment from base #308 to #751. Reverse-complement and then translate the segment. Output the translated protein sequence.
  • Challenge 2. Re-write the above sequence using Bio::SeqIO to read the "mystery_seq1.fas" sequence and output the protein sequence.
Assignment #3 (Tentative)
BioPerl exercises
  1. Rewrite the "extract.pl" using BioPerl, including the use of Bio::SeqIO to read the genome FASTA file and the use of Bio::Seq for obtaining coding sequences and translating sequences. Your output of protein sequences should not contain stop codons except as the last codon.
Read & Respond
  1. Box 2.2. Searching sequence databases using BLAST (p.96-97)
  2. Exercise 2.3. Perform a BLAST search online
  3. Define (with your own words) the following BLAST terms: Query, BLAST database, e-value, identity

February 26. Genomics (3). Homology searching with BLAST

  • Learning goals: Alignments
  • In-Class Exercises:
  1. BLAST
  2. MUSCLE
  3. Bio::SimpleAlign & Bio::AlignIO
  4. bioaln
Assignment #3 (Tentative)
Unix Text Filters
  1. Display
Read & Respond SILAC technology

March 5: Genomics (4). Molecular phylogenetics

  • Learning goal: File I/O with BioPerl
  • In-Class Exercises:
  1. Phylip
  2. FastTree

March 12: 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

March 19. Midterm Practicum


March 26

Spring Break


April 2: Transcriptome with R (Part 1)

  • Learning goal: Introduction to R
  • R resources


April 9: Transcriptome with R (Part 2)

  • Learning goal: Classification of breast-cancer subtypes
  • In-Class Exercises: Part 1. Gene filtering

April 16 (No Class)

  • Spring Break

April 23: Transcriptome with R (Part 3)

  • Learning goal: Biomarker Discovery of Cancer Drugs
  • Discussion Questions

April 30: Molecular Phylogenetics (Part 1)

  • Learning goals:
  1. Homology search using BLAST
  2. Multiple alignment using clustalw
  3. Distance-based phylogeny

May 7: 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.

May 14: Final Project (Session I)

  • Goals:
  1. Claim your individual project

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

  • Sample Projects

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: Gibson & Muse (2009). A Primer of Genome Science (Third Edition). Sinauer Associates, Inc.
  • 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


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 ~~