Deseq_analysis2: Deseq analysis

View source: R/Deseq_analysis2.R

Deseq_analysis2R Documentation

Deseq analysis

Description

Deseq analysis

Usage

Deseq_analysis2(inputframe, condition, cutoff, control_name, paired, subject)

Arguments

inputframe

Otu/gene/taxa table with all integer numeric variables.Rownames must be Otu/gene/taxa names,colnames must be sample names with control in front and treatment behind. Reads table is recommended.

condition

A character string which indicates group of samples

cutoff

threshold of log2(Foldchange).Detail see in DESeq

control_name

A character indicating the control group name

paired

Logical to determine if paired comparision would be used. TRUE or FALSE.

subject

A character string which indicates paired design of samples

Value

Statistics dataframe of all otu/gene/taxa

Note

  1. Inputframe must be all integer numeric variables without NA/NAN/inf! In case your data is not an integer one,a practical method is to multiply them in equal proportion(eg. x 1e6) then round them into integer

  2. Regulation is judged by cutoff of qvalue(adjust p value).Detail see in DESeq

  3. Set cutoff as 1 is recommened.In case of too few taxa(eg. Phylum level deseq),cutoff can be set to 0.

  4. if control_name is not given, the control group will be set according to ASCII

  5. The function requires the 'DESeq2', 'S4Vectors', and 'tibble' packages.

Author(s)

Wang Ningqi 2434066068@qq.com

See Also

DESeqDataSetFromMatrix, DESeq, DataFrame, as_tibble

Examples


{
  ### Data preparation ###
  data(testotu)
  rownames(testotu) <- testotu[, 1]
  inputotu <- testotu[, -c(1, ncol(testotu))]
  head(inputotu)
  group <- c(rep("a", 10), rep("b", 10))

  ### DESeq analysis ###
  if (requireNamespace("DESeq2", quietly = TRUE) &&
    requireNamespace("S4Vectors", quietly = TRUE) &&
    requireNamespace("tibble", quietly = TRUE)) {
    Deseqresult <- Deseq_analysis2(
      inputframe = inputotu,
      condition = group,
      cutoff = 1,
      control_name = "b"
    )

    ### Paired DESeq analysis ###
    subject <- factor(c(1:10, 1:10))
    Deseqresult <- Deseq_analysis2(
      inputframe = inputotu,
      condition = group,
      cutoff = 1,
      control_name = "b",
      paired = TRUE,
      subject = subject
    )
  }
}


LorMe documentation built on Sept. 13, 2024, 9:07 a.m.

Related to Deseq_analysis2 in LorMe...