The analysis of rtpcr data

Similar documents
Analyse RT PCR data with ddct

How to Use pkgdeptools

Image Analysis with beadarray

segmentseq: methods for detecting methylation loci and differential methylation

How To Use GOstats and Category to do Hypergeometric testing with unsupported model organisms

Analysis of two-way cell-based assays

DupChecker: a bioconductor package for checking high-throughput genomic data redundancy in meta-analysis

survsnp: Power and Sample Size Calculations for SNP Association Studies with Censored Time to Event Outcomes

How to use cghmcr. October 30, 2017

segmentseq: methods for detecting methylation loci and differential methylation

Advanced analysis using bayseq; generic distribution definitions

How to use CNTools. Overview. Algorithms. Jianhua Zhang. April 14, 2011

NacoStringQCPro. Dorothee Nickles, Thomas Sandmann, Robert Ziman, Richard Bourgon. Modified: April 10, Compiled: April 24, 2017.

riboseqr Introduction Getting Data Workflow Example Thomas J. Hardcastle, Betty Y.W. Chung October 30, 2017

Bioconductor: Annotation Package Overview

Introduction to the Codelink package

MultipleAlignment Objects

An Overview of the S4Vectors package

Visualisation, transformations and arithmetic operations for grouped genomic intervals

Triform: peak finding in ChIP-Seq enrichment profiles for transcription factors

HowTo: Querying online Data

Analysis of screens with enhancer and suppressor controls

Shrinkage of logarithmic fold changes

MIGSA: Getting pbcmc datasets

Introduction to BatchtoolsParam

Count outlier detection using Cook s distance

CQN (Conditional Quantile Normalization)

Package ddct. August 2, 2013

GxE.scan. October 30, 2018

rhdf5 - HDF5 interface for R

Creating a New Annotation Package using SQLForge

PROPER: PROspective Power Evaluation for RNAseq

Working with aligned nucleotides (WORK- IN-PROGRESS!)

Fitting Baselines to Spectra

An Introduction to the methylumi package

Getting started with flowstats

Creating a New Annotation Package using SQLForge

A complete analysis of peptide microarray binding data using the pepstat framework

Cardinal design and development

An Introduction to ShortRead

An Introduction to Bioconductor s ExpressionSet Class

MMDiff2: Statistical Testing for ChIP-Seq Data Sets

Introduction to R (BaRC Hot Topics)

Creating IGV HTML reports with tracktables

The bumphunter user s guide

Comparing Least Squares Calculations

Analysis of Pairwise Interaction Screens

Design Issues in Matrix package Development

The Command Pattern in R

Simulation of molecular regulatory networks with graphical models

highscreen: High-Throughput Screening for Plate Based Assays

Design Issues in Matrix package Development

INSPEcT - INference of Synthesis, Processing and degradation rates in Time-course analysis

Evaluation of VST algorithm in lumi package

SIBER User Manual. Pan Tong and Kevin R Coombes. May 27, Introduction 1

Sparse Model Matrices

Introduction: microarray quality assessment with arrayqualitymetrics

Comparing methods for differential expression analysis of RNAseq data with the compcoder

Biobase development and the new eset

bayseq: Empirical Bayesian analysis of patterns of differential expression in count data

An introduction to gaucho

RMassBank for XCMS. Erik Müller. January 4, Introduction 2. 2 Input files LC/MS data Additional Workflow-Methods 2

SimBindProfiles: Similar Binding Profiles, identifies common and unique regions in array genome tiling array data

Overview of ensemblvep

RDAVIDWebService: a versatile R interface to DAVID

SCnorm: robust normalization of single-cell RNA-seq data

genefu: a package for breast cancer gene expression analysis

Introduction to the TSSi package: Identification of Transcription Start Sites

Classification of Breast Cancer Clinical Stage with Gene Expression Data

mocluster: Integrative clustering using multiple

INSPEcT - INference of Synthesis, Processing and degradation rates in Time-course analysis

Basic4Cseq: an R/Bioconductor package for the analysis of 4C-seq data

Seminar III: R/Bioconductor

An Introduction to the methylumi package

Overview of ensemblvep

Using metama for differential gene expression analysis from multiple studies

Basic4Cseq: an R/Bioconductor package for the analysis of 4C-seq data

RAPIDR. Kitty Lo. November 20, Intended use of RAPIDR 1. 2 Create binned counts file from BAMs Masking... 1

rbiopaxparser Vignette

ssviz: A small RNA-seq visualizer and analysis toolkit

matter: Rapid prototyping with data on disk

The rtracklayer package

ISA internals. October 18, Speeding up the ISA iteration 2

Introduction: microarray quality assessment with arrayqualitymetrics

An Introduction to GenomeInfoDb

DataAssist v2.0 Software User Instructions

MiChip. Jonathon Blake. October 30, Introduction 1. 5 Plotting Functions 3. 6 Normalization 3. 7 Writing Output Files 3

Error-Bar Charts from Summary Data

Performance assessment of vsn with simulated data

How to use MeSH-related Packages

Differential Expression Analysis at PATRIC

Bioconductor L A T E X Style 2.0

Introduction to GenomicFiles

Vector Xpression 3. Speed Tutorial: III. Creating a Script for Automating Normalization of Data

A wrapper to query DGIdb using R

Raman Spectra of Chondrocytes in Cartilage: hyperspec s chondro data set

The REDseq user s guide

Seminar III: R/Bioconductor

qplexanalyzer Matthew Eldridge, Kamal Kishore, Ashley Sawle January 4, Overview 1 2 Import quantitative dataset 2 3 Quality control 2

The Genominator User Guide

Transcription:

The analysis of rtpcr data Jitao David Zhang, Markus Ruschhaupt October 30, 2017 With the help of this document, an analysis of rtpcr data can be performed. For this, the user has to specify several parameters described below in the.rnw version of this document. After that the software R can be used for the analysis by processing the.rnw version. In the beginning you will find a short description of the calculated values. After that the parameters that have to be specified are explained. 1 The calculated values Several values are calculated during the execution of this document. Some of them are explained here. The values explained here are calculated if no efficiencies are used (see below). 1. The mean or median of the replicates for one gene/sample combination is the Ct value. 2. For a sample A the Ct value of the housekeeping gene (or the median of the Ct values of all housekeeping genes) is subtracted from the corresponding Ct value of a gene Gen1. The result is the dct value for Gen1 and sample A. This value is used for the t-test and the Wilcoxon test. 3. For a gene Gen1 the dct value of the reference sample (or the mean of the dct values of all reference samples) is subtracted from the corresponding dct value of Gen1 and a sample B. This is called the ddct value for Gen1 and sample B. 4. The transformation x 2 x is applied to each ddct value. The resulting value is called level. Additionally, for each value an error is calculated. This is based on the standard error of the mean if the mean is used to summarize the triplets. If the median is used for summarization of the individual Ct values, the MAD divided by the square root of all samples is used as an error estimate. 1

2 Preparation The following programs and packages have to be installed on the system. ˆ R (at least version 2.2.0) ˆ R package Biobase (at least version 1.7) ˆ R package RColorBrewer ˆ R package ddct ˆ R package lattice ˆ R package xtable In case of using this manuscript first time, you have to install the ddct package. This process can be performed semi-automatically by copying the codes of the following section (titled ddctinstall), which will download the current version of ddct (dependent on the version of your R program) and install it. > source("http://www.bioconductor.org/bioclite.r") > bioclite(ddct) To run this document and perform the analysis you need a tab-delimited text file containing the individual Ct values of your experiment. This file can be exported from the software used to measure the Ct values. It is important that you export the individual Ct values (normally the software combines the replicates of the measurements to one value). After you have done this, you can follow this instruction step by step and set the appropriate parameters. 3 Choice of the parameters First you have to specify the directory where your data is stored (load.path) and the directory where the results are supposed to be stored (save.path). You can specify the path relatively to the directory you are in when starting the script in R. > load.path = "." > save.path = "." Then you have to specify the name of the file containing the individual Ct values (Ct.data.file.name). Additionally, you may specify a file containing additional data related to the samples (sample.annotation.file.name). This should be a tab-delimited text file with several columns and one row for each sample. Have a look at the example 2

SampleAnno.txt. The first column has to include the sample names and has to be named Sample. A file with additional information is important if you want to perform a t-test, if you use special colors for groups of samples, or if you want the samples to be grouped according to one column of the sample annotation file that can be specified through the parameter column.for.grouping. If all of this is not important to you, just set all parameters to NULL. This also holds for other parameters described below that may be specifies but do not have to. If you do not want to specify such a parameter, just put NULL there. If you have a sample annotation file and want to include only samples from this file into your final object, you can set the parameter useonlysamplesfromanno. > Ct.data.file.name <- c("") > sample.annotation.file.name <- NULL > column.for.grouping <- NULL > useonlysamplesfromanno <- FALSE In case no input file was specified, a default file will be used for the demonstrative purpose. Change gene names and sample names You may change gene names and sample names, which is important for the final plot of your data. If you change gene/sample names you also change the ordering of the genes/samples in your plot. In this example, Gen1 will become Gene A, Gen4 will become Gene B, and so on. In the final plot, Gene A will be plotted first, then Gene B followed by Gene C, HK1 and HK2. If you want to rename genes, all genes have to be included into this list. You cannot exclude genes that you do not want to be renamed. The sample names may be changed in the same way. > #new.gene.names <- c("gen1"="gene A", > # "Gen4"="Gene B", > # "Gen5"="Gene C", > # "Gen2"="HK1", > # "Gen3"="HK2") > new.gene.names <- NULL > new.sample.names <- NULL Attention: If you rename genes or samples, the new names must be used for the parameters further down below. 3

Housekeeping genes and reference samples Here you have to specify the housekeeping gene(s) and the reference sample(s). In this example, one reference sample and two housekeeping genes are used. If more than one object is specified, the names have to be given as shown in this example. If you specify more than one housekeeping gene, the algorithm will use the mean of the Ct values of the housekeeping genes for normalization. If you use more than one sample, the algorithm uses the mean of the chosen samples as the reference line. > name.referenz.sample <- c("sample2") > name.referenz.gene <- c("gene3") You may set a threshold for the Ct values. All individual Ct values values above this threshold will be treated as undetermined. > Threshold.for.Ct <- 40 Here you have to specify if you want to use the mean or the median for merging the individual Ct values for a gene/sample combination. The median is often more appropriate because it is more robust. > TYPEOFCALCULATION <- "mean" Efficiencies You may include efficiencies for each gene. There is also the possibility to include error estimates for the efficiencies (for example a standard deviation). These estimates will be used for the error calculation. These efficiencies can be specified in the following way. > EFFICIENCIES <- c("gene A"=1.9,"Gene B"=1.8,"HK1"=2,"Gene C"=2,"HK2"=2) > EFFICIENCIES.ERROR <- c("gene A"=0.01,"Gene B"=0.1,"HK1"=0.05,"Gene C"=0.01,"HK2"=0. If you use efficiencies, only the raw Ct value and the final level is calculated. There are no dct or ddct values. Hence no t-test can be performed if efficiencies are used. In this example we do not use efficiencies. > EFFICIENCIES <- NULL > EFFICIENCIES.ERROR <- NULL 4

Plot parameter The following parameters are used to change the final plot. First you have to specify what you want to plot. Here you can specify any or both of the following two choices: ˆ level - For each gene and sample the relative expression to the reference line is plotted ˆ Ct - the raw, unnormalized but merged Ct values are plotted > TheKindOfPlot <- c("level","ct") Sometimes genes and/or samples are not wanted to be included in the final plot. And sometimes you only want to include a small fraction of genes and/or samples. Have a look at the examples. We do not want the NTC sample to appear in the plot: > #REMAIN > names.of.the.genes.remain.in.output <- NULL > names.of.the.samples.remain.in.output <- NULL > #NOT > names.of.the.genes.not.in.output <- NULL > names.of.the.samples.not.in.output <- NULL Now you have to consider the following questions: Do you want the final plot to be drawn in a way such that the samples are plotted next to each other? > GROUPINGBYSAMPLES <- TRUE And would you like each gene or sample to have its own plot? > own.plot.for.each.object <- TRUE This is often useful if you have many genes or samples. Depending on the parameter GROUPINGBYSAMPLES either each gene (GROUPINGBYSAMPLES=TRUE) will have its own plot, or each sample ( GROUPINGBYSAMPLES = FALSE) will have its own plot. If you have a single plot for each individual gene, then you may color the sample bars according to one parameter of your sample annotation file (if you have specified such a file in the beginning of this script). You may also specify the colors. > GroupingForPlot <- NULL > GroupingColor <- c("#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00") You may specify a CUTTOFF for the y axis for all plots. Then all plots have the same scale. 5

> CUTOFF <- NULL With the parameter BREWERCOL you can specify color sets you want to use in order to color the individual bars. For additional information have a look at the description of the RColorBrewer package. > BREWERCOL <- c("set3","set1","accent","dark2","spectral","puor","brbg") Would you like to plot a legend? (TRUE/FALSE). Sometimes the plot will be messed up if a legend is plotted, so please have a try. > LEGENDE <- TRUE t-test and Wilcoxon test specification You may perform a t-test and a Wilcoxon test if you have specified a sample annotation file above. Attention: A t-test and a Wilcoxon test will not work if efficiencies are used for the calculation. > perform.ttest <- FALSE If you want to do a t-test/wilcoxon test, you have to specify the name of the column of your sample information file that includes the group information needed for the tests. If there are more than two groups in this column, tests for each possible pair of groups are performed. > column.for.ttest <- NULL If you want to perform a paired t-test/wilcoxon test, you have to specify a column of your sample information file that contains information describing the pairing of the samples. A pair of samples must have the same number/parameter in that column. Please have a look at the example. > column.for.pairs <- NULL ## ansonsten NULL You can specify whether you want to exclude some samples from the t-test. Here we again want to exclude the NTC sample. > names.of.the.samples.remain.in.ttest <- names.of.the.samples.remain.in.output > names.of.the.samples.not.in.ttest <- names.of.the.samples.not.in.output > 6

Housekeeping gene correlation If two or more housekeeping genes are used, the correlation (Pearson and Spearman) for each pair of housekeeping genes is calculated. Additionally a plot is produced. You may specify some samples that are not supposed to be used for the correlation calculation, for example a no template control. In the default setting those samples are excluded that are also excluded from the plot. > names.of.the.samples.remain.in.cor <- names.of.the.samples.remain.in.output > names.of.the.samples.not.in.cor <- names.of.the.samples.not.in.output Now all parameters have been set. You have to start R, change the directory if you like, and then type the following: Sweave( RT-PCR-Script-ddCt.Rnw ) 7

4 Results Various files are created during the calculation process. The most important files are the following: ˆ A tab-delimited text file containing all calculated values for each gene/sample combination, e.g. Ct+error, dct+error, ddct+error, level+error. Name of the file: allvalues followed by the name of the file containing the individual Ct values and extension. ˆ A.pdf file including the plots, either of the levels or the raw Ct values (depending on your choice) Name of the file: Level or Ct followed by Result, the name of the file containing the individual Ct values and the extension. In this example the name is LevelResultTest.pdf. ˆ A tab-delimited text file containing the level and the error of the level. This file can be used in Excel to create own plots with error bars. Name of the file: LevelPlusError followed by the name of the file containing the individual Ct values and extension. ˆ A tab-delimited text file containing the results from the t-test and the Wilcoxon test (if these tests have been performed). Name of the file: ttest followed by the name of the groups used in the test, followed by the name of the file containing the individual Ct values and extension. In this example we have: ttestg1g2test.txt. ˆ An R object containing all calculated values for each gene/sample combination, e.g. Ct+error, dct+error, ddct+error, level+error. Furthermore the object includes additional sample information. Name of the file: Result followed by the name of the file containing the individual Ct values and extension. There are additional tab-delimited text files and.html files containing Ct, dct, ddct and level information. All this information is also included in the allvalues file, but in a different format. If warnings have been created during the calculation process they appear here: Impressum The following packages have been used for the calculation: > tolatex(sessioninfo()) ˆ R Under development (unstable) (2017-10-20 r73567), x86_64-pc-linux-gnu 8

Correlation: 1 * Gene2 36.0 36.5 37.0 37.5 * 35.8 35.9 36.0 36.1 36.2 Gene3 Figure 1: Correlation of the housekeeping genes 9

ˆ Locale: LC_CTYPE=en_US.UTF-8, LC_NUMERIC=C, LC_TIME=en_US.UTF-8, LC_COLLATE=C, LC_MONETARY=en_US.UTF-8, LC_MESSAGES=en_US.UTF-8, LC_PAPER=en_US.UTF-8, LC_NAME=C, LC_ADDRESS=C, LC_TELEPHONE=C, LC_MEASUREMENT=en_US.UTF-8, LC_IDENTIFICATION=C ˆ Running under: Ubuntu 16.04.3 LTS ˆ Matrix products: default ˆ BLAS: /home/biocbuild/bbs-3.7-bioc/r/lib/librblas.so ˆ LAPACK: /home/biocbuild/bbs-3.7-bioc/r/lib/librlapack.so ˆ Base packages: base, datasets, grdevices, graphics, methods, parallel, stats, utils ˆ Other packages: Biobase 2.39.0, BiocGenerics 0.25.0, RColorBrewer 1.1-2, ddct 1.35.0, lattice 0.20-35 ˆ Loaded via a namespace (and not attached): compiler 3.5.0, grid 3.5.0, tools 3.5.0, xtable 1.8-2 Change Logs Version 4.0 ˆ Add change logs to the end of the file ˆ Add errbarplot for both detector and sample views ˆ Adjust to the new ddct package (developed by Jitao David Zhang and Rudolf Biczok) which was submitted to the Bioconductor community 10