read_rnaseq_counts: Read rnaseq counts/bams

.read_rnaseq_bamsR Documentation

Read rnaseq counts/bams

Description

Read rnaseq counts/bams

Usage

.read_rnaseq_bams(
  dir,
  paired,
  genome,
  nthreads = detectCores(),
  sfile = NULL,
  by.y = NULL,
  ensdb = NULL,
  verbose = TRUE
)

.read_rnaseq_counts(
  file,
  fid_col = 1,
  sfile = NULL,
  by.y = NULL,
  ensdb = NULL,
  verbose = TRUE
)

read_rnaseq_bams(
  dir,
  paired,
  genome,
  nthreads = detectCores(),
  sfile = NULL,
  by.y = NULL,
  block = NULL,
  formula = as.formula("~ subgroup"),
  min_count = 10,
  pseudo = 0.5,
  ensdb = NULL,
  tpm = FALSE,
  cpm = TRUE,
  log2 = TRUE,
  plot = FALSE,
  label = "feature_id",
  pca = plot,
  pls = plot,
  fit = if (plot) "limma" else NULL,
  voom = cpm,
  coefs = NULL,
  contrasts = NULL,
  palette = NULL,
  verbose = TRUE
)

read_rnaseq_counts(
  file,
  fid_col = 1,
  sfile = NULL,
  by.y = NULL,
  formula = as.formula("~ subgroup"),
  block = NULL,
  min_count = 10,
  pseudo = 0.5,
  tpm = FALSE,
  ensdb = NULL,
  cpm = !tpm,
  log2 = TRUE,
  plot = FALSE,
  label = "feature_id",
  pca = plot,
  pls = plot,
  fit = if (plot) "limma" else NULL,
  voom = cpm,
  coefs = NULL,
  contrasts = NULL,
  palette = NULL,
  verbose = TRUE
)

Arguments

dir

read_rnaseq_bams: bam/sam dir

paired

read_rnaseq_bams: TRUE/FALSE : paired end reads ?

genome

read_rnaseq_bams: 'mm10', 'hg38', etc. or GTF file

nthreads

read_rnaseq_bams: nthreads used by Rsubread::featureCounts()

sfile

sample file

by.y

sample file mergeby column

ensdb

EnsDb with genesizes : e.g. AnnotationHub::AnnotationHub[['AH64923']]

verbose

TRUE or FALSE: message?

file

count file

fid_col

featureid column (number or string)

block

model blockvar: string or NULL

formula

model formula

min_count

min feature count required in some samples

pseudo

pseudocount added to prevent -Inf log2 values

tpm

TRUE or FALSE : add tpm to assays ( counts / libsize / genelength ) ?

cpm

TRUE or FALSE: add cpm to assays ( counts / effectivelibsize ) ?

log2

TRUE or FALSE: log2 transform ?

plot

TRUE or FALSE: plot?

label

fvar

pca

TRUE or FALSE: perform and plot pca?

pls

TRUE or FALSE: run pls ?

fit

model engine: 'limma', 'lm', 'lme(r)', 'wilcoxon' or NULL

voom

model weights to be computed? TRUE/FALSE

coefs

model coefficients of interest: string vector or NULL

contrasts

model coefficient contrasts of interest: string vector or NULL

palette

color palette : named string vector

Value

SummarizedExperiment

Author(s)

Aditya Bhagwat, Shahina Hayat

Examples

# read_rnaseq_bams
  if (requireNamespace('Rsubread')){
      dir <- download_data('billing16.bam.zip')
      object <- read_rnaseq_bams(dir, paired = TRUE, genome = 'hg38')  
      object <- read_rnaseq_bams(dir, paired = TRUE, genome = 'hg38', plot = TRUE)  
  }
# read_rnaseq_counts
  file <- system.file('extdata/billing19.rnacounts.txt', package = 'autonomics')
  object <- read_rnaseq_counts(file, fit = 'limma', coefs = 'E15-E00')
  object <- read_rnaseq_counts(file, fit = 'limma', coefs = 'E15-E00', voom = FALSE)
  object <- read_rnaseq_counts(file, fit = 'limma', coefs = 'E15-E00', voom = FALSE, cpm = FALSE)
  object <- read_rnaseq_counts(file, fit = 'limma', coefs = 'E15-E00', voom = FALSE, cpm = FALSE, 
                                    log2 = FALSE)
  object <- read_rnaseq_counts(file, plot = TRUE)
    
# read_rnaseq_counts(tpm = TRUE)
  ## Not run: 
  ah <- AnnotationHub::AnnotationHub()
  ensdb <- ah[['AH64923']]
  object <- read_rnaseq_counts(file, fit = 'limma', coefs = 'E02-E00', tpm = TRUE, ensdb = ensdb)
  
## End(Not run)

bhagwataditya/autonomics documentation built on Dec. 1, 2024, 12:27 a.m.