View source: R/Deseq_analysis2.R
Deseq_analysis2 | R Documentation |
Deseq analysis
Deseq_analysis2(inputframe, condition, cutoff, control_name, paired, subject)
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 |
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 |
Statistics dataframe of all otu/gene/taxa
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
Regulation is judged by cutoff of qvalue(adjust p value).Detail see in DESeq
Set cutoff as 1 is recommened.In case of too few taxa(eg. Phylum level deseq),cutoff can be set to 0.
if control_name is not given, the control group will be set according to ASCII
The function requires the 'DESeq2', 'S4Vectors', and 'tibble' packages.
Wang Ningqi 2434066068@qq.com
DESeqDataSetFromMatrix
, DESeq
, DataFrame
, as_tibble
{
### 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
)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.