Description Usage Arguments Value Author(s) See Also Examples
View source: R/exactTestInterest.R
Compute genewise exact test between two groups of read counts, using the
edgeR
package.
1 2 3 |
x |
Object of type |
sampleAnnoCol |
Which colummn of |
sampleAnnotation |
A vector of size 2 which cotains values from |
geneIdCol |
Column name (or number of column) in |
silent |
Whether run the function silently, i.e. without printing the top differential expression tags. |
group |
Vector to manually define the sample groups (or annotations). It is ignored if
|
rejection.region |
The |
big.count |
The |
prior.count |
The |
disp |
The type of estimating the dispersion in the data. Available options are:
"tagwise", "trended", "common" and "genewise". It is also possible to assign a
number for manually setting the |
... |
Other parameter settings for the |
table |
Data frame containing columns for the log2 fold-change (logFC), the average of log2 counts-per-million (logCPM), and the two-sided p-value (PValue). |
comparison |
The name of the two compared groups. |
dispersionType |
The name of the type of dispersion used. |
dispersion |
The estimated dispersion values. |
Ali Oghabian
lfc
, glmInterest
, qlfInterest
,
treatInterest
, DEXSeqIntEREst
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | geneId<- paste("gene", c(rep(1,5), rep(2,5), rep(3,5), rep(4,5)),
sep="_")
readCnt1<- sample(1:100, 20)
readCnt2<- sample(1:100, 20)
readCnt3<- sample(1:100, 20)
readCnt4<- sample(1:100, 20)
fpkm1<- readCnt1/(tapply(readCnt1, geneId, sum))[geneId]
fpkm2<- readCnt2/(tapply(readCnt2, geneId, sum))[geneId]
fpkm3<- readCnt3/(tapply(readCnt3, geneId, sum))[geneId]
fpkm4<- readCnt4/(tapply(readCnt4, geneId, sum))[geneId]
# Creating object using test data
interestDat<- data.frame(
int_ex=rep(c(rep(c("exon","intron"),2),"exon"),4),
int_ex_num= rep(c(1,1,2,2,3),4),
gene_id= geneId,
sam1_readCnt=readCnt1,
sam2_readCnt=readCnt2,
sam3_readCnt=readCnt3,
sam4_readCnt=readCnt4,
sam1_fpkm=fpkm1,
sam2_fpkm=fpkm2,
sam3_fpkm=fpkm3,
sam4_fpkm=fpkm4
)
readFreqColIndex<- grep("_readCnt$",colnames(interestDat))
scaledRetentionColIndex<- grep("_fpkm$",colnames(interestDat))
scalRetTmp<- as.matrix(interestDat[ ,scaledRetentionColIndex])
colnames(scalRetTmp)<-gsub("_fpkm$","", colnames(scalRetTmp))
frqTmp<- as.matrix(interestDat[ ,readFreqColIndex])
colnames(frqTmp)<-gsub("_readCnt$","", colnames(frqTmp))
InterestResultObj<- InterestResult(
resultFiles=paste("file",1:4, sep="_"),
rowData= interestDat[ , -c(readFreqColIndex,
scaledRetentionColIndex)],
counts= frqTmp,
scaledRetention= scalRetTmp,
scaleLength=TRUE,
scaleFragment=FALSE,
sampleAnnotation=data.frame(
sampleName=paste("sam",1:4, sep=""),
gender=c("M","M","F","F"), row.names=paste("sam", 1:4, sep="")
)
)
res<- exactTestInterest(InterestResultObj, sampleAnnoCol="gender",
sampleAnnotation=c("F","M"), geneIdCol= "gene_id",
silent=TRUE, disp="common")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.