isglobal-brge / rexposome

Bioconductor package to characterize, analyze and integrate exposome with omic and disease data
MIT License
11 stars 1 forks source link

Can't check normality in my exp object #1

Closed camilafarias112 closed 3 years ago

camilafarias112 commented 3 years ago

Hello developers,

First I'd like to let you know that the idea of this workflow is just perfect for what I work with and I look forward to be able to use it in regular basis!

I started to follow the workflow, but I faced an error message when checking normality in this data. Would you guys help me with that?

`> head(sampleNames(exp)) [1] "CL29085" "CL29118" "CL29137" "CL29150" "CL29151" "CL29159"

head(exposureNames(exp)) [1] "ACKR1" "ACKR2" "ACKR3" "ACKR4" "B cell" "B cell memory" familyNames(exp) [1] "receptor" "cell" "chemokine" phenotypeNames(exp) [1] "sex" "age" "healing_time_days" "treatment_outcome" "lymphadenopathy" "n_lesions" "DTH_mm2"
head(fData(exp), n = 3) Family .fct .trn .std .imp .type ACKR1 receptor numeric ACKR2 receptor numeric ACKR3 receptor numeric head(pData(exp), n = 3) sex age healing_time_days treatment_outcome lymphadenopathy n_lesions DTH_mm2 CL29085 female 32 90 cure no 1 110 CL29118 male 33 305 failure no 1 120 CL29137 male 35 120 failure no 1 99 head(tableMissings(exp, set = "exposures", output = "n")) # I don't have missing info here ACKR1 ACKR2 ACKR3 ACKR4 B cell B cell memory 0 0 0 0 0 0 tableMissings(exp, set = "phenotypes", output = "n") sex age treatment_outcome lymphadenopathy n_lesions DTH_mm2 healing_time_days 0 0 0 0 0 0 2 nm <- normalityTest(exp) Error in if (type[ii] == "numeric") { : missing value where TRUE/FALSE needed exp <- imputation(exp) Error in if (type[ii] == "numeric") { : missing value where TRUE/FALSE needed`

Since my exposure object is a matrix, numeric, why the normality processing is not running? Thank you so much,

Camila

Screen Shot 2021-03-08 at 2 48 06 PM
ESCRI11 commented 3 years ago

Hello Camila!

Can you please share the whole fData(exp) table? The problem I suspect is that the column .type contains one or more NA's.

Another thing that I need to debug this is to know if your description file contains a column named type.

Thank you, Xavier.

camilafarias112 commented 3 years ago

Hello Xavier,

Here you go my fData(exp):

> fData(exp)
                                    Family .fct .trn .std .imp   .type
ACKR1                             receptor                     numeric
ACKR2                             receptor                     numeric
ACKR3                             receptor                     numeric
ACKR4                             receptor                     numeric
B cell                                cell                     numeric
B cell memory                         cell                     numeric
B cell naive                          cell                     numeric
B cell plasma                         cell                     numeric
Cancer associated fibroblast          cell                     numeric
CCL1                             chemokine                     numeric
CCL11                            chemokine                     numeric
CCL13                            chemokine                     numeric
CCL14                            chemokine                     numeric
CCL15                            chemokine                     numeric
CCL16                            chemokine                     numeric
CCL17                            chemokine                     numeric
CCL18                            chemokine                     numeric
CCL19                            chemokine                     numeric
CCL2                             chemokine                     numeric
CCL20                            chemokine                     numeric
CCL21                            chemokine                     numeric
CCL22                            chemokine                     numeric
CCL23                            chemokine                     numeric
CCL24                            chemokine                     numeric
CCL25                            chemokine                     numeric
CCL26                            chemokine                     numeric
CCL27                            chemokine                     numeric
CCL28                            chemokine                     numeric
CCL3                             chemokine                     numeric
CCL3L1                           chemokine                     numeric
CCL3L3                           chemokine                     numeric
CCL4                             chemokine                     numeric
CCL4L2                           chemokine                     numeric
CCL5                             chemokine                     numeric
CCL7                             chemokine                     numeric
CCL8                             chemokine                     numeric
CCR1                              receptor                     numeric
CCR10                             receptor                     numeric
CCR2                              receptor                     numeric
CCR3                              receptor                     numeric
CCR4                              receptor                     numeric
CCR5                              receptor                     numeric
CCR6                              receptor                     numeric
CCR7                              receptor                     numeric
CCR8                              receptor                     numeric
CCR9                              receptor                     numeric
CCRL2                             receptor                     numeric
Class-switched memory B cell          cell                     numeric
Common lymphoid progenitor            cell                     numeric
Common myeloid progenitor             cell                     numeric
CX3CL1                           chemokine                     numeric
CX3CR1                            receptor                     numeric
CXCL1                            chemokine                     numeric
CXCL10                           chemokine                     numeric
CXCL11                           chemokine                     numeric
CXCL12                           chemokine                     numeric
CXCL13                           chemokine                     numeric
CXCL14                           chemokine                     numeric
CXCL16                           chemokine                     numeric
CXCL17                           chemokine                     numeric
CXCL2                            chemokine                     numeric
CXCL3                            chemokine                     numeric
CXCL5                            chemokine                     numeric
CXCL6                            chemokine                     numeric
CXCL8                            chemokine                     numeric
CXCL9                            chemokine                     numeric
CXCR1                             receptor                     numeric
CXCR2                             receptor                     numeric
CXCR3                             receptor                     numeric
CXCR4                             receptor                     numeric
CXCR5                             receptor                     numeric
CXCR6                             receptor                     numeric
Endothelial cell                      cell                     numeric
Eosinophil                            cell                     numeric
FPR1                              receptor                     numeric
GPR75                             receptor                     numeric
Granulocyte-monocyte progenitor       cell                     numeric
Hematopoietic stem cell               cell                     numeric
HRH4                              receptor                     numeric
immune score                          cell                     numeric
Macrophage                            cell                     numeric
Macrophage M1                         cell                     numeric
Macrophage M2                         cell                     numeric
Mast cell                             cell                     numeric
microenvironment score                cell                     numeric
Monocyte                              cell                     numeric
Myeloid dendritic cell                cell                     numeric
Myeloid dendritic cell activated      cell                     numeric
Neutrophil                            cell                     numeric
NK cell                               cell                     numeric
PF4                              chemokine                     numeric
PF4V1                            chemokine                     numeric
PITPNM3                           receptor                     numeric
Plasmacytoid dendritic cell           cell                     numeric
PPBP                             chemokine                     numeric
stroma score                          cell                     numeric
T cell CD4+ (non-regulatory)          cell                     numeric
T cell CD4+ central memory            cell                     numeric
T cell CD4+ effector memory           cell                     numeric
T cell CD4+ memory                    cell                     numeric
T cell CD4+ naive                     cell                     numeric
T cell CD4+ Th1                       cell                     numeric
T cell CD4+ Th2                       cell                     numeric
T cell CD8+                           cell                     numeric
T cell CD8+ central memory            cell                     numeric
T cell CD8+ effector memory           cell                     numeric
T cell CD8+ naive                     cell                     numeric
T cell gamma delta                    cell                     numeric
T cell NK                             cell                     numeric
T cell regulatory (Tregs)             cell                     numeric
XCL1                             chemokine                     numeric
XCL2                             chemokine                     numeric
XCR1                              receptor                     numeric

Sending also attached the tableMissing(exp), if that helps...

Screen Shot 2021-03-09 at 11 34 02 AM

And my description object only has one column called family

Screen Shot 2021-03-09 at 11 39 46 AM

Thank you so much for your attention!

Camila

camilafarias112 commented 3 years ago

I have exposure names with spaces... do you think that would impact anything? Like "B cells"...

ESCRI11 commented 3 years ago

@camilafarias112 Yes, having names with spaces yields to errors indeed! I might need to add a block on the read function to make sure this is not an issue anymore. Can you please use exposure names without spaces and report back the results?

Thanks in advance, Xavier.

camilafarias112 commented 3 years ago

Hello @ESCRI11 - the normality test is running! :D After some tests, the issue was not the spaces alone. +,-,) and ( in the exposure list gave me the error. When I replaced all of them for _ I moved forward in the workflow.

I appreciate very much the attention, can't way to see the results from rexposome! All the best and take care, Camila

ESCRI11 commented 3 years ago

Thanks for the feedback @camilafarias112 . I will look into it to be sure this is no longer a problem in the future. I will include this update on a future version (to be determined).