Using Bioconductor To Analyse Beadarray Data: Difference between revisions

mNo edit summary
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category: R]]
[[Category: R]]
[[Category: Bioinformatics]]
[[Category: Bioinformatics]]
[[Category: Bioconductor]]


==Software Requirements==
==Software Requirements==
*R, get from [[http://cran.r-project.org/ CRAN]]
*R, get from [http://cran.r-project.org/ CRAN]
*Bioconductor, get from [[http://www.bioconductor.org/download Bioconductor]]
*Bioconductor, get from [http://www.bioconductor.org/download Bioconductor]
*Bioconductor packages.  Install as needed:
*Bioconductor packages.  Install as needed:
**beadarray
**beadarray
**limma
**limma
**annotation data for the array (normally illuminaMousev2BeadID.db)
**annotation data for the array (normally illuminaMousev2BeadID.db)
*To install bioconductor packages use:
<pre>
<pre>
source("http://www.bioconductor.org/biocLite.R")
source("http://www.bioconductor.org/biocLite.R")
Line 48: Line 50:
*First define groups for each treatment.  If a samplesheet was provided correctly and had this information:
*First define groups for each treatment.  If a samplesheet was provided correctly and had this information:
<pre>samples = pData(BSData)$Sample_Group</pre>
<pre>samples = pData(BSData)$Sample_Group</pre>
*Otherwise define these groups manually in the order that they were entered (check by looking at pData(BSData)
*Otherwise define these groups manually in the order that they were entered, check by looking at pData(BSData)
<pre>samples = c("Control", "Control", "Treatment1", "Treatment1, "Treatment2"...)</pre>
<pre>samples = c("Control", "Control", "Treatment1", "Treatment1, "Treatment2"...)</pre>
*Next the groups are used to set up a statistical design:
*Next the groups are used to set up a statistical design:
Line 89: Line 91:
anno = cbind(GeneSymbol = as.character(symbol), GeneName = as.character(GeneName))
anno = cbind(GeneSymbol = as.character(symbol), GeneName = as.character(GeneName))
</pre>
</pre>
*To add this annotation to the data analysis file:
<pre>
ebFit$genes = anno
write.fit = (ebFit, file = "Filename.csv", adjust="BH")
</pre>
*This example includes a false discovery rate ("BH") adjusted p.value.
*This function writes a tab-delimited text file containing for each gene (1) the average log-intensity, (2) the log-ratios, (3) moderated t-statistics, (4) t-statistic P-values, (5) F-statistic if available, (6) F-statistic P-values if available, (7) classification if available.
*To add this annotation data to the expression set:
<pre>
data = exprs(BSData.quantile)
data = cbind(anno,data)
write.csv = (data, file = "Filename.csv")
</pre>
*Remember that the expression set is Log2 adjusted, so to look at absolute expression levels use 2^value.