performDifferentialExpression {cTRAP} | R Documentation

## Perform differential gene expression based on ENCODE data

### Description

Perform differential gene expression based on ENCODE data

### Usage

    performDifferentialExpression(counts)

### Arguments

`counts` | Data frame: gene expression

### Value

Data frame with differential gene expression results between knockdown and control

### See Also

Other functions related with using ENCODE expression data: `downloadENCODEknockdownMetadata()`, `loadENCODEsamples()`, `prepareENCODEgeneExpression()`

### Examples

    if (interactive()) {
      # Download ENCODE metadata for a specific cell line and gene
      cellLine <- "HepG2"
      gene <- "EIF4G1"
      ENCODEmetadata <- downloadENCODEknockdownMetadata(cellLine, gene)

      # Download samples based on filtered ENCODE metadata
      ENCODEsamples <- loadENCODEsamples(ENCODEmetadata)[[1]]

      counts <- prepareENCODEgeneExpression(ENCODEsamples)

      # Remove low coverage (at least 10 counts shared across two samples)
      minReads   <- 10
      minSamples <- 2
      filter <- rowSums(counts[ , -c(1, 2)] >= minReads) >= minSamples
      counts <- counts[filter, ]

      # Convert ENSEMBL identifier to gene symbol
      counts$gene_id <- convertGeneIdentifiers(counts$gene_id)

      # Perform differential gene expression analysis
      diffExpr <- performDifferentialExpression(counts)
    }

[Package cTRAP version 1.12.0 Index]