96 A Practical Guide to Cancer Systems Biology
samrData<-list(x=mergedData,
- y=classLabel,
- genenames=rownames(mergedData),
- logged2=T)
where you designate BCR/ABL samples as class label 1 and ALL1/AF4
samples as class label 2. Now, you can perform SAM using the two class
unpaired standardt-test with 1000 permutations:
samrObj<- samr(samrData,
- resp.type=“Two class unpaired”,
- testStatistic=“standard”,
- nperms=1000,
- assay.type=“array”)
Note that you can do other adjustments to the input arguments for your
SAM test using help(samr) for more details. The returned object is a list
of several values and stored as samrObj. Next, you can use the function
samr.compute.delta.table() to compute the delta values and false discovery
rates (FDRs):
samrDeltaTable<- samr.compute.delta.table(samrObj)
You can then select a minimum delta value with median FDR < 0. 01
according to samrDeltaTable:
myDelta <- min(samrDeltaTable[which(samrDeltaTable[,“median FDR”]
<0.01), “delta”])
Now, you can draw a Q−Q plot according to this delta value, showing only
DE genes with fold change greater than or equal to two (red point for DE
upregulation when class label 1 is used as the reference group; green for
downregulation, Fig. 1):
samr.plot(samrObj, del=myDelta, min.foldchange=2)
Then you can compute a table of significant genes using the function
samr.compute.siggenes.table() taking: samrObj, myDelta, samrData, and
samrDeltaTable as arguments:
samrSummTable <- samr.compute.siggenes.table(samrObj, del=myDelta,
samrData, samrDeltaTable)
You can show the number of DE upregulated genes in class label 2
(i.e., ALL1/AF4 samples) compared to class label 1 (i.e., BCR/ABL
samples):
samrSummTable$ngenes.up
[1] 156