Description Usage Arguments Details Value Author(s) See Also Examples
Calculates the pairwise difference between a series of colums. This assumes either differences between individuals, or between a single column for each group (e.g. mean, median, or log there of). This function does not calculate statistical significance, and it is intended only for quick, course-scale analysis and visualization, not for final publication.
1 2 3 4 5 | calcBasicDE(data,
colID = "_mean_FPKM_log2",
whichIndex = "allPairwise",
matchEnd = TRUE,
appendName = "diff")
|
data |
data.frame or matrix with genes as rows and columns containing information, such as counts, FPKM, etc. |
colID |
Which columns should be used for DE analysis, takes a single column per group, so expects either a single column per treatment (e.g. mean), or will report individual differences. Can be a vector for several things either character (to be grepped) or numeric to indicate which cols to analyze. Accepts regexp arguments, so be careful. |
whichIndex |
Which colID (e.g. "Control") should the others be compared against. Can be numeric (which of the colID to use) or characther for grep against the names of the colID columns (can have regexp). whichIndex="allPairwise" (default) calculates all pairwise comparisons. |
matchEnd |
if colID is character, should only the end of the column name be matched. This avoids matching unintended columns. |
appendName |
What string should be added to the end of each output column? Output column names will be "firstColName_minus_secondColName_appendName" |
This function calculates the difference between pairs of columns, but does not report a statistical test. It is a simple wrapper to find the raw numerical differences between several columns, and output sensibly named columns.
Returns a data.frame with one column for each calculated difference. Rows and names match the input data.frame, so can be appended to the original data.frame using either cbind or merge.
Mark Peterson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Only run if DESeq is available
if(require(DESeq)){
## Create sample data
## Could be reads or FPKM from your input
exampleCounts <- counts(makeExampleCountDataSet())
testComb <- calcCombVals(exampleCounts,
groupID=c("A","B","*"),
colID=c("all"))
head(testComb)
basicTest <- calcBasicDE(testComb,"all_mean")
head(basicTest)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.