Error with longitudinal linear-mixed-effects

Dear QIIME 2 developers,

I processed my data along the new tutorial "Performing longitudinal and paired sample comparisons with q2-longitudinal". While pairwise difference comparisons and pairwise distance comparisons worked out well on my data I encountered the following errors with longitudinal linear-mixed-effects:

either
Plugin error from longitudinal:
Singular matrix
Debug info has been saved to /tmp/qiime2-q2cli-err-2t5n23zo.log

or
Plugin error from longitudinal:
'AxesSubplot' object does not support indexing
Debug info has been saved to /tmp/qiime2-q2cli-err-83vjyolh.log

depending on my input for --p-group-categories --p-state-column and --p-individual-id-column.

I attached those log files here.
qiime2-q2cli-err-83vjyolh.txt (882 Bytes)
qiime2-q2cli-err-2t5n23zo.txt (2.6 KB)

Hope you can help me to make it work.

Cheers!

Hi @Mechah, thanks for commenting. To debug this issue, I will need:

  1. for you to provide the exact commands that you ran that caused these issues
  2. the input files that caused this issue (you can email these to me directly if you prefer) so that I can attempt to replicate these errors.

To rule out the possibility of, e.g., install errors, are you able to run the tutorial commands on the tutorial data and see the output?

Thanks!

1 Like

Hi @Nicholas_Bokulich,

Yes, I’m able to run the tutorial commands on the tutorial data and see the expected output.

command producing error: Singular matrix

qiime longitudinal linear-mixed-effects --m-metadata-file Mappingfile_GARTENleben_v3.txt --m-metadata-file shannon_vector.qza --p-metric shannon --p-group-categories Description,ProductTreatment --p-state-column Month --p-individual-id-column SampleCode --o-visualization GARTENleben_0-0_shannon_linear-mixed-effects.qzv --verbose

command producing error: ‘AxesSubplot’ object does not support indexing

qiime longitudinal linear-mixed-effects --m-metadata-file Mappingfile_GARTENleben_v3.txt --m-metadata-file observed_otus_vector.qza --p-metric observed_otus --p-group-categories ProductTreatment --p-state-column Month --p-individual-id-column SampleCode --o-visualization GARTENleben_0-0_obs_OTUs_linear-mixed-effects.qzv --verbose

  1. I would prefer to send you the files directly by email. However I could not find your email contact at Northern Arizona University. Where can I find your contact?

Thanks!

1 Like

@Mechah thanks for raising these two issues and sending your data to help me debug.

The first issue appears to be related to the independent variables that you are providing to LME. They are not actually independent, but appear to be covariates (e.g., most Descriptions only use one type of ProductTreatment), resulting in this error. If instead you provide --p-group-categories CopiesMW,ProductTreatment, LME will run fine (though I recognize that this is probably biologically meaningless, it's useful for diagnosing which inputs cause the error). Thank you for finding this issue: q2-longitudinal should provide more information on why this error is occurring, and I have opened this ticket to improve in the next release. For now, you should try to identify other, non-covariate factors to use as group-categories.

This issue is a minor bug in the way plots are created/indexed, so thank you for detecting this. The code was written assuming that 2+ group-categories would be used; a ticket for this issue has been raised and will be solved in the next release (next month). For now, LME will only work when 2 or more group-categories are provided.

Thank you for your help in debugging linear-mixed-effects!

2 Likes

Hi @Nicholas_Bokulich,
wow thanks for your fast support!
I played around with other variables and it worked. Nevertheless, I’m looking forward to the revised version of LME in an upcoming release.
Cheers!

1 Like

I had the same exact problem! I was receiving the error “‘AxesSubplot’ object does not support indexing” and could not figure out what I was doing wrong. It is working now if I supply two group categories.

I am wondering if is possible to use linear-mixed-effects with a unifrac distance matrix. I saw in the documentation that it is possible to determine the relationship between a specific taxa in a feature table and several variable. If I supplied a unifrac distance matrix as --i-table what would I use for '–p-metric` and is this allowable?

Hi @Maggi_Mars,
linear-mixed-effects cannot accept a DistanceMatrix as input — the table artifact only accepts FeatureTable[RelativeFrequency] artifacts (an OTU table).

linear-mixed-effects does accept pcoa results as input, so it would be possible to test, for example, how PC1 changes over time in relation to your selected variables.

If you are specifically interested in distance between samples, rather than principal coordinates, you could use the pairwise-distances visualization — though that action only examines distance between paired samples at two time points in relation to one variable.

I hope that helps. If not, let us know — q2-diversity or another plugin may be able to accomplish what you want to do.

1 Like

Both of the q2-longitudinal issues described in this topic (support for single variables, and better error message with invalid input) have been fixed in the 2017.9 release! :tada:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.