1 / 60

GBIO0002-1 Genetics and Bioinformatics

GBIO0002-1 Genetics and Bioinformatics. Introduction to DB and R. Instructors. Practical sessions Kyrylo Bessonov (Kirill) Office: B37 1/16 kbessonov@ulg.ac.be Office hours: by appointment. Overview. Intro to basic R Introduction to public databases The submission system.

salban
Download Presentation

GBIO0002-1 Genetics and Bioinformatics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GBIO0002-1 Genetics and Bioinformatics Introduction to DB and R

  2. Instructors • Practical sessions Kyrylo Bessonov (Kirill) • Office: B37 1/16 • kbessonov@ulg.ac.be • Office hours: by appointment

  3. Overview • Intro to basic R • Introduction to public databases • The submission system

  4. Bioinformatics Definition 1: the collection, classification, storage, and analysis of biochemical and biological information using computers especially as applied to molecular genetics and genomics (Merriam-Webster dictionary) Definition 2: a field that works on the problems involving intersection of Biology/Computer Science/Statistics

  5. Practical classes. Why? • “Practical” classes • During these classes will be looking at practical aspects of the topics introduced in theory classes. It is suggested to execute sample R scripts and demonstrations on your PCs. • “Homework assignments” are of 2 types (graded) • Homework assignments result in a “group” report and can be handed in electronically in French or English

  6. Introduction to A basic tutorial

  7. Statistical languages GUIs SAS SPSS

  8. R GUI Less fancy and no frills, but free!

  9. Definition • “R is a free software environment for statistical computing and graphics”1 • R is considered to be one of the most widely used languages amongst statisticians, data miners, bioinformaticians and others. • R is free implementation of S language • Other commercial statistical packages are SPSS, SAS, MatLab 1R Core Team, R: A Language and Environment for Statistical Computing, Vienna, Austria (http://www.R-project.org/)

  10. Why to learn R? • Since it is free and open-source, R is widely used by bioinformaticians and statisticians • It is multiplatform and free • Has wide very wide selection of additional libraries that allow it to use in many domains including bioinformatics • Main library repositories CRAN and BioConductor

  11. Programming? Should I be scared? • R is a scripting language and, as such, is much more easier to learn than other compiled languages as C • R has reasonably well written documentation (vignettes) • Syntax in R is simple and intuitive if one has basic statistics skills • R scripts will be provided and explained in-class

  12. Topics covered in this tutorial • Operators / Variables • Main objects types • Plotting and plot modification functions • Writing and reading data to/from files

  13. Variables/Operators • Variables store one element x <- 25 Here x variable is assigned value 25 • Check value assigned to the variable x >x [1] 25 • Basic mathematical operators that could be applied to variables: (+),(-),(/),(*) • Use parenthesis to obtain desired sequence of mathematical operations

  14. Arithmetic operators • What is the value of small z here? >x <- 25 > y <- 15 > z <- (x + y)*2 > Z <- z*z > z [1] 80

  15. Vectors • Vectors have only 1 dimension and represent enumerated sequence of data. They can also store variables > v1 <- c(1, 2, 3, 4, 5) > mean(v1) [1] 3 The elements of a vector are specified /modified with braces (e.g. [number]) > v1[1] <- 48 > v1 [1] 48 2 3 4 5

  16. Logical operators • These operators mostly work on vectors, matrices and other data types • Type of data is not important, the same operators are used for numeric and character data types

  17. Logical operators • Can be applied to vectors in the following way. The return value is either True or False > v1 [1] 48 2 3 4 5 > v1 <= 3 [1] FALSE TRUE TRUE FALSE FALSE

  18. R workspace • Display all workplace objects (variables, vectors, etc.) via ls(): >ls() [1] "Z" "v1" "x" "y" "z" • Useful tip: to save “workplace” and restore from a file use: >save.image(file = " workplace.rda") >load(file = "workplace.rda")

  19. How to find help info? • Any function in R has help information • To invoke help use ? Sign or help(): ? function_name() ? mean help(mean, try.all.packages=T) • To search in all packages installed in your R installation always use try.all.packages=T in help() • To search for a key word in R documentation use help.search(): help.search("mean")

  20. Basic data types • Data could be of 3 basic data types: • numeric • character • logical • Numeric variable type: > x <- 1 > mode(x) [1] "numeric"

  21. Basic data types • Logical variable type (True/False): > y <- 3<4 > mode(y) [1] "logical" • Character variable type: > z <- "Hello class" > mode(z) [1] "character"

  22. Data structures • The main data objects in R are: • Matrices (single data type) • Data frames (supports various data types) • Lists (contain set of vectors) • Other more complex objects • Matrices are 2D objects (rows/columns) > m <- matrix(0,2,3) > m [,1] [,2] [,3] [1,] 0 0 0 [2,] 0 0 0

  23. Lists • Lists contain various vectors. Each vector in the list can be accessed by double braces [[number]] > x <- c(1, 2, 3, 4) > y <- c(2, 3, 4) > L1 <- list(x, y) > L1 [[1]] [1] 1 2 3 4 [[2]] [1] 2 3 4

  24. Data Frames • Data frames are similar to matrices but can contain various data types > x <- c(1,5,10) > y <- c("A", "B", "C") > z <-data.frame(x,y) x y 1 1 A 2 5 B 3 10 C • To get/change column and row names use colnames() and rownames()

  25. Input/Output • To read data into R from a text file use read.table() • read help(read.table) to learn more • scan() is a more flexible alternative raw_data <-read.table(file="data_file.txt") • To write data into R from a text file use read.table() > write.table(mydata, "data_file.txt")

  26. Conversion between data types One can convert (data coerce) one type of data into another using as.xxx where xxx is a data type

  27. Plots generation in R • R provides very rich set of plotting possibilities • The basic command is plot() • Each library has its own version of plot() function • When R plots graphics it opens “graphical device” that could be either a window or a file

  28. Plotting functions • R offers following array of plotting functions

  29. Plot modification functions • Often R plots are not optimal and one would like to add colors or to correct position of the legend or do other appropriate modifications • R has an array of graphical parameters that are a bit complex to learn at first glance. Here is the full list • Some of the graphical parameters can be specified inside plot() or using other graphical functions such as lines()

  30. Plot modification functions

  31. Installation of new libraries • There are two main R repositories • CRAN • BioConductor • To install package/library from CRAN install.packages("seqinr") To install packages from BioConductor source("http://bioconductor.org/biocLite.R") biocLite("GenomicRanges")

  32. Installation of new libraries • Download and install latest R version on your PC. Go to http://cran.r-project.org/ • Install following libraries by running install.packages(c("seqinr", "ape", "GenABEL")) source("http://bioconductor.org/biocLite.R") biocLite(c("limma","affy","hgu133plus2.db","Biostrings", "muscle"))

  33. What are we looking for? Data & databases

  34. Biologists Collect Lots of Data • Hundreds of thousands of species to explore • Millions of written articles in scientific journals • Detailed genetic information: • gene names • phenotype of mutants • location of genes/mutations on chromosomes • linkage (distances between genes) • High Throughput lab technologies • PCR • Rapid inexpensive DNA sequencing (Illumina HiSeq) • Microarrays (Affymetrix) • Genome-wide SNP chips / SNP arrays (Illumina) • Must store data such that • Minimum data quality is checked • Well annotated according to standards • Made available to wide public to foster research

  35. What is database? • Organized collection of data • Information is stored in "records“, "fields“, “tables” • Fields are categories • Must contain data of the same type (e.g. columns below) • Records contain data that is related to one object (e.g. protein, SNP) (e.g. rows below)

  36. Genome sequencing generates lots of data

  37. Biological Databases The number of databases is constantly growing!-OBRC: Online Bioinformatics Resources Collection currently lists over 2826databases (2013)

  38. Main databases by category • Literature • PubMed: scientific & medical abstracts/citations • Health • OMIM: online mendelian inheritance in man • Nucleotide Sequences • Nucleotide: DNA and RNA sequences • Genomes • Genome: genome sequencing projects by organism • dbSNP: short genetic variations • Genes • Protein: protein sequences • UniProt: protein sequences and related information • Chemicals • PubChem Compound: chemical information with structures, information and links • Pathways • BioSystems: molecular pathways with links to genes, proteins • KEGG Pathway: information on main biological pathways

  39. Growth of UniProtKB database • UniProtKB contains mainly protein sequences (entries). The database growth is exponential • Data management issues? (e.g. storage, search, indexing?) number of entries Source: http://www.ebi.ac.uk/uniprot/TrEMBLstats

  40. Primary and Secondary Databases • Primary databases • REAL EXPERIMENTAL DATA (raw) • Biomolecular sequences or structures and associatedannotationinformation (organism, function, mutation linked to disease,functional/structural patterns, bibliographic etc.) • Secondary databases • DERIVED INFORMATION (analyzed and annotated) • Fruits of analyses of primary data in the primary sources(patterns, blocks, profiles etc. which representthe most conserved features of multiple alignments)

  41. Primary Databases • Sequence Information • DNA: EMBL, Genbank, DDBJ • Protein: SwissProt, TREMBL, PIR, OWL • Genome Information • GDB, MGD, ACeDB • Structure Information • PDB, NDB, CCDB/CSD

  42. Secondary Databases • Sequence-related Information • ProSite, Enzyme, REBase • Genome-related Information • OMIM, TransFac • Structure-related Information • DSSP, HSSP, FSSP, PDBFinder • Pathway Information • KEGG, Pathways

  43. GenBank database • Contains all DNA and protein sequences described in the scientific literature or collected in publicly funded research • One can search by protein name to get DNA/mRNA sequences • The search results could be filtered by species and other parameters

  44. GenBank main fields

  45. NCBI Databases contain more than just DNA & protein sequences NCBI main portal: http://www.ncbi.nlm.nih.gov/

  46. Fasta format to store sequences • The FASTA format is now universal for all databases and software that handles DNA and protein sequences • Specifications: • One header line • starts with > with a ends with [return] • Saccharomyces cerevisiae strain YC81 actin (ACT1) gene • GenBank: JQ288018.1 • >gi|380876362|gb|JQ288018.1| Saccharomyces cerevisiae strain YC81 actin (ACT1) gene, partial cds TGGCATCATACCTTCTACAACGAATTGAGAGTTGCCCCAGAAGAACACCCTGTTCTTTTGACTGAAGCTCCAATGAACCCTAAATCAAACAGAGAAAAGATGACTCAAATTATGTTTGAAACTTTCAACGTTCCAGCCTTCTACGTTTCCATCCAAGCCGTTTTGTCCTTGTACTCTTCCGGTAGAACTACTGGTATTGTTTTGGATTCCGGTGATGGTGTTACTCACGTCGTTCCAATTTACGCTGGTTTCTCTCTACCTCACGCCATTTTGAGAATCGATTTGGCCGGTAGAGATTTGACTGACTACTTGATGAAGATCTTGAGTGAACGTGGTTACTCTTTCTCCACCACTGCTGAAAGAGAAATTGTCCGTGACATCAAGGAAAAACTATGTTACGTCGCCTTGGACTTCGAGCAAGAAATGCAAACCGCTGCTCAATCTTCTTCAATTGAAAAATCCTACGAACTTCCAGATGGTCAAGTCATCACTATTGGTAAC

  47. OMIM database • Online Mendelian Inheritance in Man (OMIM) •  ”information on all known mendelian disorders linked to over 12,000 genes” • “Started at 1960s by Dr. Victor A. McKusick as a catalog of mendelian traits and disorders” • Linked disease data • Links disease phenotypes and causative genes • Used by physicians and geneticists

  48. OMIM – basic search • Online Tutorial: http://www.openhelix.com/OMIM • Each search results entry has *, +, # or % symbol • # entries are the most informative as molecular basis of phenotype – genotype association is known is known • Will do search on: Ankylosing spondylitis (AS) • AS characterized by chronic inflammation of spine

  49. OMIM-search results • Look for the entires that link to the genes. Apply filters if needed Filter results if known SNP is associated to the entry Some of the interesting entries. Try to look for the ones with # sign

  50. OMIM-entries

More Related