Description Usage Arguments Details Value Author(s) See Also Examples
Function demi
is a wrapper for the whole DEMI analysis. First it creates a DEMIExperiment
object, then uses
it to create a DEMIClust
object that contains the list of clustered probes and then performs differential
expression analysis by running the function DEMIDiff
that creates DEMIDiff
object. The latter contains
the results of the differential expression analysis. It also prints out the results to the working directory.
If parameter pathway
is set to TRUE, it also performs gene ontology analysis on the results in DEMIDiff
object to determine statistically significant gene ontology categories (it also prints out those in the working
directory with the file containing the string 'pathway'). It then returns a list containing the DEMIExperiment
object where the results have been attached to and a data.frame
that contains the functional annotation
analysis results. NB! The results will be printed out in the working directory.
1 2 3 4 5 6 | demi(analysis = "transcript", celpath = character(),
experiment = character(), organism = character(), maxtargets = 0,
maxprobes = character(), pmsize = 25, sectionsize = character(),
group = character(), norm.method = norm.rrank, filetag = character(),
cluster = list(), clust.method = function() { }, cutoff.pvalue = 0.05,
pathway = logical())
|
analysis |
A |
celpath |
A |
experiment |
A |
organism |
A |
maxtargets |
A |
maxprobes |
A |
pmsize |
A |
sectionsize |
A |
group |
A |
norm.method |
A |
filetag |
A |
cluster |
A |
clust.method |
A |
cutoff.pvalue |
A |
pathway |
A |
Instead of automatically clustered probes DEMIClust
object can use user defined lists of
probes for later calculation of differential expression. This is done by setting the cluster
parameter. It
overrides the default behaviour and no actual clustering occurs. Instead the list of probes defined
in the cluster
parameter are considered as already clustered probes. The list needs to contain proper names for
probe vectors so that they would be recognizable later. Also instead of using the default clustering method the user can
write his/her own function for clustering probes based on the expression values.
Further specification of the parameters:
maxtargets
When analysis
is set to 'gene' then all probes that match to more genes then allowed by maxtargets
parameter will
not be included in the analysis. For 'transcript' and 'exon' analysis the number is also calculated on a gene
level. For example if maxtargets
is set to one and a probe matches to two transcripts but on the same gene,
then this probe will still be used in the analysis. However if the probe matches two transcripts on different
genes then this probe will not be included in the analysis. For 'genome' analysis the probe in most cases matches
to two genomic sections because adjacent sections overlap by 50
probe will still be used in the analysis.
norm.method
Every user can apply their own normalization method by writing a custom normalization function. The function should
take in raw expression matrix and return the normalized expression matrix where probe ID's are kept as rownames and
column names are CEL file names. The normalized expression matrix will then be stored as part of the DEMIExperiment
object.
sectionsize
The sectionsize
parameter defines the length of the genomic target region. Currenlty sectionsize
can be set
as: 100000, 500000 and 1000000. All adjacent sections, except the ones on chromosome ends, overlap with the
next adjacent section by 50
genomic section. This parameter is required when analysis
is set to 'genome'.
group
All the CEL files used in the analysis need to contain at least one of the names specified in the group
parameter because they determine what groups to compare against each other. It is also a good
practice to name the CEL files to include their common features. However if a situation arises where the
group/feature name occurs in all filenames then the user can set group names with specific filenames
by seperating names in one group with the "|" symbol. For example group = c( "FILENAME1|FILENAME2|FILENAME3",
"FILENAME4|FILENAME5|FILENAME6" )
. These two groups are then used for clustering the probes expression values.
norm.method
The norm.method
defines a function to use for the normalization of raw expression matrix. The user can implement his/her
own function for the normalization procedure. The function should take in raw expression matrix and return the normalized
expression matrix where probe ID's are kept as rownames and column names are CEL file names.
clust.method
The user can write his/her own function for clustering probes according to their expression values. The custom
function should take DEMIClust
object as the only parameter and output a list
. The output list should contain
the name of the clusters and the corresponding probe ID's. For example return( list( cluster1 = c(1:10), cluster2
= c(11:20), cluster3 = c(21:30) )
.
cluster
This parameter allows to calculate differential expression on user defined clusters of probe ID's. It needs to be a
list
of probe ID's where the list
names correspond to the cluster names. For example list( cluster1 = c(1:10),
cluster2(1:10) )
. When using this approach you need to make sure that all the probe ID's given in the clusters are available in
the analysis. Otherwise an error message will be produced and you need to remove those probes that have no alignment
in the analysis. When setting this parameter the default behaviour will be overridden and no default clustering
will be applied.
A list containing the DEMIExperiment
object where differential expression results have been added to and
a data.frame
consisting of the functional annotation analysis results.
Sten Ilmjarv
DEMIExperiment
, DEMIClust
, DEMIPathway
, DEMIDiff
, demi.wilcox.test.fast
, wilcox.test
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 53 54 55 56 57 58 | ## Not run:
# To use the example we need to download a subset of CEL files from
# http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE9819 published
# by Pradervand et al. 2008.
# Set the destination folder where the downloaded files fill be located.
# It can be any folder of your choosing.
destfolder <- "demitest/testdata/"
# Download packed CEL files and change the names according to the feature
# they represent (for example to include UHR or BRAIN in them to denote the
# features).
# It is good practice to name the files according to their features which
# allows easier identification of the files later.
ftpaddress <- "ftp://ftp.ncbi.nlm.nih.gov/geo/samples/GSM247nnn"
download.file( paste( ftpaddress, "GSM247694/suppl/GSM247694.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "UHR01_GSM247694.CEL.gz", sep = "" ) )
download.file( paste( ftpaddress, "GSM247695/suppl/GSM247695.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "UHR02_GSM247695.CEL.gz", sep = "" ) )
download.file( paste( ftpaddress, "GSM247698/suppl/GSM247698.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "UHR03_GSM247698.CEL.gz", sep = "" ) )
download.file( paste( ftpaddress, "GSM247699/suppl/GSM247699.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "UHR04_GSM247699.CEL.gz", sep = "" ) )
download.file( paste( ftpaddress, "GSM247696/suppl/GSM247696.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "BRAIN01_GSM247696.CEL.gz", sep = "" ) )
download.file( paste( ftpaddress, "GSM247697/suppl/GSM247697.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "BRAIN02_GSM247697.CEL.gz", sep = "" ) )
download.file( paste( ftpaddress, "GSM247700/suppl/GSM247700.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "BRAIN03_GSM247700.CEL.gz", sep = "" ) )
download.file( paste( ftpaddress, "GSM247701/suppl/GSM247701.CEL.gz", sep = "/" ),
destfile = paste( destfolder, "BRAIN04_GSM247701.CEL.gz", sep = "" ) )
# We need the gunzip function (located in the R.utils package) to unpack the gz files.
# Also we will remove the original unpacked files for we won't need them.
library( R.utils )
for( i in list.files( destfolder ) ) {
gunzip( paste( destfolder, i, sep = "" ), remove = TRUE )
}
# Now we can continue the example of the function demi
# Do DEMI analysis with functional annotation analysis
demires <- demi(analysis = 'gene', celpath = destfolder, group = c( "BRAIN", "UHR" ),
experiment = 'myexperiment', organism = 'homo_sapiens',
clust.method = demi.wilcox.test.fast, pathway = TRUE)
# Do DEMI analysis without functional annotation analysis
demires <- demi(analysis = 'gene', celpath = destfolder, group = c( "BRAIN", "UHR" ),
experiment = 'myexperiment', organism = 'homo_sapiens',
clust.method = demi.wilcox.test.fast, pathway = FALSE)
# Retrieve results from the created object
head( getResultTable( demires$experiment ) )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.