Computational Biology, Part 12 Spreadsheet Basics I Robert F. Murphy Copyright  1996, 1999-2001. All rights reserved.

Slides:



Advertisements
Similar presentations
TUTORIAL 1 Getting Started with Excel
Advertisements

MS EXCEL is a spreadsheet application Excel covers: Calculation Graphic tools Pivot tables Macro programming language called VBA EXCEL is a part of MS.
With Microsoft ® Excel 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 GO! with Microsoft ® Excel 2010 Chapter 1 Creating a Worksheet and.
FORMULAS & FUNCTIONS EXCEL. Input A collection of information Data typed into the spreadsheet Output Worksheet Results.
 Microsoft Excel is an electronic spreadsheet.  As with a paper spreadsheet, you can use Excel to organize your data into rows and columns and to perform.
Microsoft Office XP Microsoft Excel
Microsoft Excel. Click on “Start,” then “Microsoft Office Excel.”
Basics Of Spreadsheets Chapter Spreadsheet spreadsheet: grid of cells, each of which can contain text data or numeric data.
Introduction to Microsoft Excel 2010 Chapter Extension 3.
Pasewark & Pasewark 1 Excel Lesson 4 Entering Worksheet Formulas Microsoft Office 2007: Introductory.
Excel Using Formulas and Functions Microsoft Office 2010 Fundamentals 1.
Microsoft Excel Computers Week 4.
Microsoft Excel The Basics. spreadsheet A type of application program which manipulates numerical and string data in rows and columns of cells. The value.
7-1 IS 2101 Spring 2010 Chapter 7 Managing Workbooks and Analyzing Data.
3-dimensional formula A formula that refers to cells in other worksheets.
Understanding Microsoft Excel
Using Complex Formulas, Functions, and Tables. Objectives Navigate a workbookNavigate a workbook Enter labels and valuesEnter labels and values Change.
With Microsoft ® Excel e © 2013 Pearson Education, Inc. Publishing as Prentice Hall1 Excel 2010 Chapter 9 Creating a Worksheet and Charting Data.
Spreadsheets With Microsoft Excel ® as an example.
Unit G: Using Complex Formulas, Functions, and Tables Microsoft Office Illustrated Fundamentals.
Introduction to Spreadsheets Presented by Frank H. Osborne, Ph. D. © 2005 Bio 2900 Computer Applications in Biology.
1 Excel Lesson 3 Using Formulas and Functions Microsoft Office 2010 Fundamentals Story / Walls.
Introduction to Microsoft Excel
End Show Introduction to Electronic Spreadsheets Unit 3.
Technology Basics Creating Worksheet Formulas. 2 Understand Formulas Equations used to calculate values in cells are called formulas. Formulas consist.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Mathematical OperatorsMathematical Operators Formula.
Computer Literacy BASICS
Working with Worksheet
Microsoft Excel Diane M. Coyle Spring 2009 CS 105.
Spreadsheets and Microsoft Excel. Introduction n A spreadsheet (called a worksheet in Excel) is a two-dimensional array of cells containing data to be.
Key Applications Module Lesson 16 — Excel Essentials Computer Literacy BASICS.
Microsoft Excel 2003 Illustrated Complete And Editing Worksheets Building.
 Introduction to MS-Excel Introduction to MS-Excel  Entering data in EXCEL Entering data in EXCEL  Formulas & Functions in EXCEL Formulas & Functions.
1 Lesson 19 Creating Formulas and Charting Data Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Learning Microsoft Excel Getting Started  There are three features that you should remember as you work within PowerPoint 2007: the Microsoft Office.
Spreadsheet A spreadsheet is the computer equivalent of a paper ledger sheet. It consists of a grid made from columns and rows. It is an environment that.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. 3-1 Office Excel 2007 Lab 3 Managing and Analyzing a Workbook.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Copyright © 2008 Prentice-Hall. All rights reserved. What Can I Do with a Spreadsheet.
Exploring Office 2003 Vol 1 2/e - Grauer and Barber 1 Committed to Shaping the Next Generation of IT Experts. Chapter 1 – Introduction to Excel: What is.
Unit 5 Seminar HS115 Amber Krasny. Seminar Agenda Unit Four Grading Unit Five Activities Questions.
Chapter 12 Creating a Worksheet.
With Microsoft Excel 2007 Comprehensive 1e© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2007 Comprehensive.
ME 142 Engineering Computation I Excel Basics. Key Concepts Entering Data &Formulas Moving/Copying Data & Formulas Relative & Absolute Addressing Named.
Spreadsheet Basics What is a Spreadsheet? A spreadsheet (or worksheet) is an arrangement of cells in columns and rows used to organize, analyze, calculate,
LOGO Chapter II Entering Excel Formulas and Formatting Data Friday, November 20, 2015.
Chapter 5 Working with Multiple Worksheets and Workbooks
Excel Screen Slide 1 Column Row Cell Formula bar Column heading Row heading Worksheet tab.
INTRODUCTION TO SPREADSHEETS MICROSOFT EXCEL. Spreadsheets Allows users to perform simple and complex sorting Allows users to perform calculations quickly.
XP 1 Microsoft Office Excel 2003 Working With Formulas and Functions.
Spreadsheets: Part I Creating a Worksheet in MS Excel
EXCEL LESSON 1. WHAT IS EXCEL? Excel is a spreadsheet program. A spreadsheet is a grid of rows and columns in which you enter text, numbers, and formulas.
Pages Appendix B: Review of ExcelChapter 3 Market Trends & Analysis IBM 320 CAL POLY POMONA IBM320 Market Trends and Analysis Maha Ghosn.
COMPUTER LITERACY NOTES MS-EXCEL. SPREADSHEETS A spreadsheet is a computer equivalent of a paper ledger sheet. Excel allows you to create spreadsheets.
EXCEL Study Guide #2 Spreadsheet Terms  Input Collection of information – the data to be typed into the spreadsheet.  Output Worksheet results.
XP Practical OpenOffice.org Chapter 5 1 Creating a Worksheet.
Understanding Microsoft Excel
This is only an introduction!!
ME 142 Engineering Computation I
Understanding Microsoft Excel
Understanding Microsoft Excel
CS 106 Computing Fundamentals II Chapter 5 “Excel Basics for Windows”
Lesson 2 Tables and Charts
Microsoft Excel 2003 Illustrated Complete
Understanding Microsoft Excel
EXCEL Study Guide #2.
Understanding Microsoft Excel
Working with Formulas and Functions
Unit G: Using Complex Formulas, Functions, and Tables
Spreadsheets and Data Management
Presentation transcript:

Computational Biology, Part 12 Spreadsheet Basics I Robert F. Murphy Copyright  1996, All rights reserved.

Cells A spreadsheet is a two-dimensional array of cells. Each cell is uniquely identified by the row and column at whose intersection it lies. Most spreadsheets use letters to specify columns and numbers to specify rows. Thus cell C7 is in column C (the 3rd column) and row 7. A spreadsheet is a two-dimensional array of cells. Each cell is uniquely identified by the row and column at whose intersection it lies. Most spreadsheets use letters to specify columns and numbers to specify rows. Thus cell C7 is in column C (the 3rd column) and row 7. Cells can contain values or formulas. Cells can contain values or formulas.

Values A value is a constant entered into a cell. A value may be numeric or textual. A value is a constant entered into a cell. A value may be numeric or textual.  Numeric values include integers, real numbers expressed as decimals, or real numbers expressed in scientific notation.  Examples: “5”, “7.11”, “2e-6”  Textual values normally consist of one or more “printable” characters.  Examples: “Mass”, “Created by R. Stuart”

Labels A label is a textual value used to mark, identify or clarify other cells.A label might be a heading on top of a column of numbers or an identifier beside an important value. A label is a textual value used to mark, identify or clarify other cells.A label might be a heading on top of a column of numbers or an identifier beside an important value.  Examples: “Temperature=”, “Concentration”

Formulas A formula is an entry in a cell that specifies one or more calculations to be done to create a value for that cell. Formulas A formula is an entry in a cell that specifies one or more calculations to be done to create a value for that cell. Formulas  must be identified to the program as distinct from textual values (normally by preceding them with an = or +)  may refer to other cells  may use operators, such as * and ^  may invoke functions provided by the spreadsheet program

Functions A function is something provided by the spreadsheet that is replaced by a value during evaluation of a formula (it “returns a value”). A function is something provided by the spreadsheet that is replaced by a value during evaluation of a formula (it “returns a value”). A function may or may not require arguments. A function may or may not require arguments. Examples: SIN, AVERAGE, DATE Examples: SIN, AVERAGE, DATE

Operator Hierarchy It is important to know the order in which operators are evaluated in spreadsheet formulas. This order is referred to as the operator hierarchy. When parentheses are not present, exponentiation is performed first, followed by multiplication & division, followed by addition and subtraction. When operators of equal hierarchy are present, they are evaluated from left to right. It is important to know the order in which operators are evaluated in spreadsheet formulas. This order is referred to as the operator hierarchy. When parentheses are not present, exponentiation is performed first, followed by multiplication & division, followed by addition and subtraction. When operators of equal hierarchy are present, they are evaluated from left to right.

Operator Hierarchy Examples What is A1 + A2*A3? 11 What is A1 + A2*A3 + A4? 24 What is (A1 + A2)*(A3 + A4)? 54 What is A1*A4/A2*A3? 32.5 What is A1*A4/(A2*A3)? 1.3 What is 10^A2/10^A3? What is 10^(A2/10)^A3? 10 Assume: A1=1, A2=2, A3=5, A4=13

Formats Values (including results of formulas) may be displayed in a variety of formats. For numeric values, the precision controls how many decimals places are displayed. In Excel, the precision is set on the Number tab after selecting Cells... under the Format menu or using the Toolbar or buttons. Values (including results of formulas) may be displayed in a variety of formats. For numeric values, the precision controls how many decimals places are displayed. In Excel, the precision is set on the Number tab after selecting Cells... under the Format menu or using the Toolbar or buttons.

Relative vs. Absolute References A central feature of spreadsheet programs is the ability to automatically change cell references when the contents of a cell are copied to other cells. This allows a formula to be entered once but evaluated for many different cases. A central feature of spreadsheet programs is the ability to automatically change cell references when the contents of a cell are copied to other cells. This allows a formula to be entered once but evaluated for many different cases. To illustrate this, we will generate a model that calculates the fraction of an ionizable group that is charged at various pH values To illustrate this, we will generate a model that calculates the fraction of an ionizable group that is charged at various pH values

Simple model: Acid Dissociation For the dissociation of a weak acid For the dissociation of a weak acid HB  B - + H + HB is referred to as the conjugate acid and B- is referred to as the conjugate base HB is referred to as the conjugate acid and B- is referred to as the conjugate base The equilibrium equations are The equilibrium equations are

Ionization equilibria for amino acids Need to consider which groups on an amino acid can be protonated/unprotonated Need to consider which groups on an amino acid can be protonated/unprotonated The carboxyl and amino groups that are involved in peptide bonds have relatively constant pKs of ~2 and ~9 The carboxyl and amino groups that are involved in peptide bonds have relatively constant pKs of ~2 and ~9 The side chain pKs vary considerably. The side chain pKs vary considerably. Illustrations for Arg and Tyr follow. Illustrations for Arg and Tyr follow.

_ _ _ Arg-HArg H 2 Arg+H 3 Arg++

_ _ Tyr-- _ HTyr- _ + H 2 Tyr + H 3 Tyr+

Task: Given a pK a and a pH calculate fraction of base in unprotonated form Task: Given a pK a and a pH calculate fraction of base in unprotonated form Step 1: Enter pK a and pH as constant values into two cells Step 1: Enter pK a and pH as constant values into two cells Example: An Ionizable Group

Step 2: Enter formula using references to constants Step 2: Enter formula using references to constants Example: An Ionizable Group

Note: The formula was made visible in the spreadsheet by clicking the Formulas box on the View tab after selecting Preferences... under the Tools menu Note: The formula was made visible in the spreadsheet by clicking the Formulas box on the View tab after selecting Preferences... under the Tools menu Example: An Ionizable Group

Step 3: Convert to fraction of B Step 3: Convert to fraction of B Example: An Ionizable Group

Switch to viewing results of formulas rather than the formulas themselves Switch to viewing results of formulas rather than the formulas themselves Example: An Ionizable Group

New Task: Calculate fraction of B for more than one pH value New Task: Calculate fraction of B for more than one pH value Step 4: Rearrange cells so that each row can be devoted to one pH value Step 4: Rearrange cells so that each row can be devoted to one pH value Example: An Ionizable Group

Step 5: Enter a formula to generate a series of increasing pH values Step 5: Enter a formula to generate a series of increasing pH values Example: An Ionizable Group

Step 6: Copy the formula from cell B7 down to cell B8 Step 6: Copy the formula from cell B7 down to cell B8 Example: An Ionizable Group

Note that the reference to the pH value (cell A7) changed to A8 (which we wanted to happen) but that the reference to the pKa (cell B4) changed to B5 (which we didn’t) Note that the reference to the pH value (cell A7) changed to A8 (which we wanted to happen) but that the reference to the pKa (cell B4) changed to B5 (which we didn’t) Example: An Ionizable Group

“Normally” a formula containing the names of cells (called references to those cells) are updated when that formula is copied to another cell “Normally” a formula containing the names of cells (called references to those cells) are updated when that formula is copied to another cell The row number is incremented by the difference in row numbers between the original location of the formula and the new location The row number is incremented by the difference in row numbers between the original location of the formula and the new location The column number is incremented by the difference in column numbers The column number is incremented by the difference in column numbers Relative References

Such a reference is termed a relative reference because the reference is implicitly relative to the current cell Such a reference is termed a relative reference because the reference is implicitly relative to the current cell We may want to “fix” or “hold” a reference so that it doesn’t change during copying a formula We may want to “fix” or “hold” a reference so that it doesn’t change during copying a formula This is termed an absolute reference and in Excel is created by putting a dollar sign ($) in front of the row or column number, or both This is termed an absolute reference and in Excel is created by putting a dollar sign ($) in front of the row or column number, or both Relative vs. Absolute References

Step 7: Change the reference to the pK a to an absolute reference Step 7: Change the reference to the pK a to an absolute reference Example: An Ionizable Group

Step 8: Copy the formula in cell C7 down (note that the reference to B7 updates to B8) Step 8: Copy the formula in cell C7 down (note that the reference to B7 updates to B8) Example: An Ionizable Group

Step 9: Copy the formulas in cells A8:C8 down (note that the references to A7, A8, and B8 increment but $B$4 doesn’t) Step 9: Copy the formulas in cells A8:C8 down (note that the references to A7, A8, and B8 increment but $B$4 doesn’t) Example: An Ionizable Group

Step 10: Switch back to viewing values rather than formulas to see results Step 10: Switch back to viewing values rather than formulas to see results Example: An Ionizable Group

Names To make it easier to read formulas containing many cell references, some spreadsheet programs allow the creation of names for cells (like variable names in programs) To make it easier to read formulas containing many cell references, some spreadsheet programs allow the creation of names for cells (like variable names in programs)

New Task: Define absolute name for cell containing pK a New Task: Define absolute name for cell containing pK a Step 11: Select cell B4 then Define Name Step 11: Select cell B4 then Define Name Example: An Ionizable Group

Note Excel has chosen a name based on the label in the adjacent cell and that the default is for the name to refer to the currently selected cell Note Excel has chosen a name based on the label in the adjacent cell and that the default is for the name to refer to the currently selected cell Example: An Ionizable Group

Step 12: Use Apply Name to replace all references to B4 in the spreadsheet with the new name Step 12: Use Apply Name to replace all references to B4 in the spreadsheet with the new name Example: An Ionizable Group

Note formulas now show the name Note formulas now show the name Example: An Ionizable Group

New Task: Define relative name for pH New Task: Define relative name for pH Step 13: Select cell A7 and Define Name Step 13: Select cell A7 and Define Name Example: An Ionizable Group

Note name now chosen based on label above B7. Change reference from $A$7 (default is absolute for names) to $A7 (row number is allow to be relative) Note name now chosen based on label above B7. Change reference from $A$7 (default is absolute for names) to $A7 (row number is allow to be relative) Example: An Ionizable Group

Step 14: Apply Name Step 14: Apply Name Example: An Ionizable Group

Complex Models and Graphing Before creating complex models, it is important to think about what graphical or tabular output is desired from the model. The organization of the spreadsheet should be optimized for this output. For example, if graphing of [P] vs. t is desired, try to place all values for t and [P] in consecutive cells in adjacent rows or columns. Before creating complex models, it is important to think about what graphical or tabular output is desired from the model. The organization of the spreadsheet should be optimized for this output. For example, if graphing of [P] vs. t is desired, try to place all values for t and [P] in consecutive cells in adjacent rows or columns.

A Model with a Single Output (Demonstration D2) (Demonstration D2)

A Workaround for Graphing A spreadsheet that calculates some desired quantity (e.g., net charge) for a single value of some independent variable (e.g., pH), can be used for graphing by adding cells in which various values of the dependent variable are manually tabulated as the independent variable is changed A spreadsheet that calculates some desired quantity (e.g., net charge) for a single value of some independent variable (e.g., pH), can be used for graphing by adding cells in which various values of the dependent variable are manually tabulated as the independent variable is changed (Demonstration D3) (Demonstration D3)

Expanding a Model for Graphing A better approach to the same problem is to make many copies of the original spreadsheet (using copy and paste) and enter a different value of the independent variable in each copy. The results can be collected for graphing using references. A better approach to the same problem is to make many copies of the original spreadsheet (using copy and paste) and enter a different value of the independent variable in each copy. The results can be collected for graphing using references. (Demonstration D4) (Demonstration D4)

Grouping Constants The best method is to redesign the original sheet so that only one row (or column) is needed for each value of the independent variable. This allows using fill down for the subsequent rows of the sheet. The best method is to redesign the original sheet so that only one row (or column) is needed for each value of the independent variable. This allows using fill down for the subsequent rows of the sheet. (Demonstration D5) (Demonstration D5)

Assigned Reading For Next Class Yeargers Yeargers  Chapter 1  Section 2.1  Chapter 3 through Section 3.4  Chapter 4 through Section 4.2