Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diff abundance after aggTax #91

Open
JHBI115 opened this issue Dec 5, 2023 · 0 comments
Open

diff abundance after aggTax #91

JHBI115 opened this issue Dec 5, 2023 · 0 comments

Comments

@JHBI115
Copy link

JHBI115 commented Dec 5, 2023

Hi ,
I'm not a statistician and not very pro-efficient in R.
I'm trying to run fitFeatureModel on the MRexperiment object that was output by aggTax function . And I get this ERROR ;
Error in lmFit(log(mat), mod, weights = weights) :
row dimension of design doesn't match column dimension of data object

My intial obj :

obj_Treat
MRexperiment (storageMode: environment)
assayData: 2549 features, 48 samples
element names: counts
protocolData: none
phenoData
sampleNames: F110-2 F110-d ... F142-d (48 total)
varLabels: patientID preterm_del ... treatment2 (12 total)
varMetadata: labelDescription
featureData
featureNames: 36ba457bd2f0549ccde2199095e7aa18
b3212620482d3313452d1cce8bfb2f73 ...
d1b3d9b8720fb1e710a3d20a348b8388 (2549 total)
fvarLabels: OTUID Taxon ... Species (9 total)
fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:

Class = aggTax(obj_Treat, lvl = "Class", out = "MRexperiment", returnFullHierarchy=FALSE)
Class
MRexperiment (storageMode: environment)
assayData: 41 features, 48 samples
element names: counts
protocolData: none
phenoData
sampleNames: F110-2 F110-d ... F142-d (48 total)
varLabels: patientID preterm_del ... treatment2 (12 total)
varMetadata: labelDescription
featureData
featureNames: [Chloracidobacteria] [Saprospirae] ... ZB2 (41 total)
fvarLabels: Taxa
fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:

Class = cumNorm(Class, p = 0.5)
pd = pData(Class)
mod <- model.matrix(~1 + treatment, data = pd)
Class_flouride_vs_placebo = fitFeatureModel(Class, mod)
Error in lmFit(log(mat), mod, weights = weights) :
row dimension of design doesn't match column dimension of data object

dim(mod)
[1] 48 2

What am I doing wrong ?

Thank you so much !
Cori

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant