Entering edit mode
Florence Cavalli
▴
50
@florence-cavalli-4588
Last seen 9.2 years ago
Dear Mousami,
Thanks for your email and interest in the SpeCond package.
You don't need to worry about the above warnings. These warnings are
returned by the mclust package that the SpeCond method uses to fit a
mixture of normal distribution.
I restricted the number of normal (or component) to be tested from 1
to 3.
By default if the best model is found at the min or max number of the
component tested the mclust function will return a warning message.
However
for the SpeCond method testing only 1 to 3 components makes sense,
according to the pattern the method is looking for to identify
specifically
expressed gene/probes. I should probably add in the vignette that one
can
ignore these warnings (which also appear when running the test
example).
I would advice to plot some HTML pages for a few genes (or probes) to
check
if the mixture of normal components does fit your data (and play with
the
parameters if not).
The error returned by "getMatrixFromExpressionSet", probably comes
from the
fact that condition.factor=eset.mas5$sample is not of class factor
(the
factor type is required by the function). You can checkt it by running
class(eset.mas5$sample). Running SpeCond on a ExpressionSet object
makes
sense if you have several samples (replicates) for the same condition
(or
tissue for example) and you have to summarize the gene or probe values
per
condition but if you only have one sample per condition (which seems
to be
your case) you can just extract the expression matrix from the
ExpressionSet
object using the exprs() (which is what you probably have done
before).
In the vignette example there are two replicates per tissue as you can
see
below, that is why it is necessary to run getMatrixFromExpressionSet
to get
a matrix with one value per probe per tissue type.
> class(expSetSpeCondExample$Tissue)
[1] "factor"
> expSetSpeCondExample$Tissue
S_1 S_2 S_3 S_4
S_5
Spinal_cord Spinal_cord Fetal_brain Fetal_brain
Adrenal_cortex
S_6 S_7 S_8 S_9
S_10
Adrenal_cortex Pituitary Pituitary Whole_brain
Whole_brain
S_11 S_12 S_13 S_14
S_15
Lymph_node Lymph_node Liver Liver
Prostate
S_16 S_17 S_18 S_19
S_20
Prostate Uterus Uterus Fetal_lung
Fetal_lung
S_21 S_22 S_23 S_24
S_25
Appendix Appendix Fetal_thyroid Fetal_thyroid
Heart
S_26 S_27 S_28 S_29
S_30
Heart Lung Lung Ovary
Ovary
S_31 S_32 S_33 S_34
S_35
Placenta Placenta Pancreas Pancreas
Skeletal_muscle
S_36 S_37 S_38 S_39
S_40
Skeletal_muscle Smooth_muscle Smooth_muscle Tongue
Tongue
S_41 S_42 S_43 S_44
S_45
Thyroid Thyroid Tonsil Tonsil
Whole_blood
S_46 S_47 S_48 S_49
S_50
Whole_blood Adrenal_gland Adrenal_gland Bone_marrow
Bone_marrow
S_51 S_52 S_53 S_54
S_55
Fetal_liver Fetal_liver Kidney Kidney
Salivary_gland
S_56 S_57 S_58 S_59
S_60
Salivary_gland Skin Skin Testis
Testis
S_61 S_62 S_63 S_64
Thymus Thymus Trachea Trachea
32 Levels: Adrenal_cortex Adrenal_gland Appendix Bone_marrow ...
Whole_brain
Hope this helps.
Please let me know if you have further questions,
Best wishes,
Florence
2013/11/26 Mousami Srivastava <sm.iitbtbi@gmail.com>
> Dear Florence,
>
> Greetings from Mousami, working as a Ph.D Student in Defence
Institute of
> Physiology and Allied Sciences, India.
>
> I have found that your program "specond" most suitable for analysing
my
> data of interest to find their shannon entropy. During this
analysis, i am
> getting the following warning message even after many repeated
attempts,
> please help/advice me (how and where) to rectify the error
>
> Warning messages while running the log transformed file
>
> 1: In summary.mclustBIC(Bic, data, G = G, modelNames = modelNames) :
> best model occurs at the min or max # of components considered
> 2: In Mclust(expressionMatrix[i, ], G = 1:3, modelNames = "V") :
> optimal number of clusters occurs at min choice
>
> Warning messages while running the normalized file
>
> In case of "condition.factor=expSet$sample", I have got the
following
> error:
> "Error in getMatrixFromExpressionSet(expressionMatrix,
condition.factor,
> :
> condition must be of class factor"
>
> The code of the program is:
>
> class(eset.mas5)
>
> [1] "ExpressionSet"
> attr(,"package")
> [1] "Biobase"
>
> > eset.mas5
>
> ExpressionSet (storageMode: lockedEnvironment)
> assayData: 22283 features, 23 samples
> element names: exprs, se.exprs
> protocolData
> sampleNames: GSM286407.CEL.gz GSM286408.CEL.gz ...
GSM286429.CEL.gz
> (23 total)
> varLabels: ScanDate
> varMetadata: labelDescription
> phenoData
> sampleNames: GSM286407.CEL.gz GSM286408.CEL.gz ...
GSM286429.CEL.gz
> (23 total)
> varLabels: sample
> varMetadata: labelDescription
> featureData: none
> experimentData: use 'experimentData(object)'
> Annotation: hgu133a
>
> > class(exprSet_mat)
>
> [1] "matrix"
>
> > dim(exprSet_mat)
>
> [1] 22283 23
>
> > library(SpeCond)
>
> > generalResult=SpeCond(exprSet_mat, param.detection=NULL,
> multitest.correction.method="BY",
> + prefix.file="E", print.hist.pv=TRUE, fit1=NULL, fit2=NULL,
> specificOutlierStep1=NULL)
>
> [1] "Step1"
> [1] "Step1, fitting"
> [1] "start: get null distributions"
> [1] "end: get null distributions"
> [1] "start: specific detection from p-values"
> [1] "end: specific detection from p-values"
> [1] "Step2"
> [1] "Step2, fitting"
> [1] "start: get null distributions"
> [1] "end: get null distributions"
> [1] "start: specific detection from p-values"
> [1] "end: specific detection from p-values"
> There were 50 or more warnings (use warnings() to see the first 50)
>
> > warnings()
>
> Warning messages:
> 1: In summary.mclustBIC(Bic, data, G = G, modelNames = modelNames) :
> best model occurs at the min or max # of components considered
> 2: In Mclust(expressionMatrix[i, ], G = 1:3, modelNames = "V") :
> optimal number of clusters occurs at min choice
> 3: In summary.mclustBIC(Bic, data, G = G, modelNames = modelNames)
:
> best model occurs at the min or max # of components considered
>
> > names(generalResult)
> [1] "prefix.file" "fit1" "fit2"
> "specificOutliersStep1" "specificResult"
> > specificResult=generalResult$specificResult
> > generalResult=SpeCond(eset.mas5, param.detection=NULL,
> multitest.correction.method="BY", prefix.file="E",
print.hist.pv=TRUE,
> fit1=NULL,
> + fit2=NULL, specificOutlierStep1=NULL,
condition.factor=eset.mas5$sample,
> condition.method="mean")
> Error in getMatrixFromExpressionSet(expressionMatrix,
condition.factor, :
> condition must be of class factor
> >
>
>
> Many thanks
> --
> Regards,
> Mousami Srivastava
> Email : sm.iitbtbi@gmail.com
> srvstvmsm@yahoo.com
> Mob. No.: +91-9555896841
> Research Scholar
> DIPAS, DRDO
> Delhi
> India
>
[[alternative HTML version deleted]]