questions about import of qiime2-mmvec

Hi, @mortonjt !

I am studying q2-mmvec to analyze my data( metabolome and the microbiom). However, I meet some questions about input files.
Firstly, I have gained a table of microbe’s taxonomy via USEARCH, and there is not ‘confidence’ in this table(maybe I have ignored some details).But in sample data of mmvec(cf/taxonomy.txt) has ‘confidence’. Therefore, I wonder if the ‘confidence’ is necessary for mmvec ?
Secondly, my original data about metabolome mainly has sample ID, compounds’ name and different compounds abundances in different samples, and I have poorly understood how to gain metabolite-metadata in sample data of mmvec (‘cf/metabolite-metadata.txt’). In other words, I don’t know what information metabolite-metadata needs and how to let my data of metabolome convert this format, probably I have ignored some steps.
Looking forward to your reply. Thank you!

Hester

1 Like
  1. confidence shouldn’t be necessary as long as it is a qiime2 compatible FeatureData[Sequence] type.
  2. if you don’t have any additional metabolite information, you could just feed in a file with all of the compound names again. Normally, this metabolite information is accommodated with m/z, retention time, in addition to other annotations from classyfire or sirius, or even KEGG.

Hi mortonjt !
Because there is not ‘Compound_Source’ in my metabolite metadata, I have substituted 'Class II' or 'Class I' for 'Compound Source', and my metabolite metadata is shown in the following table.

sampleID Q1 (Da) Q3 (Da) Molecular Weight (Da) Formula Ionization model Compounds Class I Class II CAS Level cpd_ID kegg_map
2268 138.05 94.07 137.048 C7H7NO2 [M+H]+ Trigonelline Alkaloids Alkaloids 535-83-1 B C01004 ko00760

But when I run 'qiime mmvec heatmap' with 'Class I' or 'Class II', my heatmap was a little messy. A part of heatmap is shown in following picture.


I tried to normalize my heatmap by using PDF editing or transferring PDF to PPT, but they didn't work. So I have no idea to normalize it.
Looking forward your reply!

Hi @hesterlee , I’m not exactly clear on the question. Do you mean that the legends are a little squished, or your colormap is a bit off?

I’m sorry I didn’t express very clearly. The picture I show is just a problematic part of complete heatmap. And my problem is that the layout of my heat map is a bit confusing( some text and graphics are overlapped together ), I think it should be as you have said that the colormap is a bit off. And this question is more obvious when ‘Class_II’ replaces ‘Compound_source’( I’ve highlighted the problem in the picture).

And when I run the cf-example in GitHub, there was no problem in layout of the heatmap.

hmm yes I see what you mean. MMvec is not a great plotting library for this reason. Getting labels to fit is a hard problem; and we are probably not going to be able to fix it in a completely automated fashion.

There are 2 workarounds to this problem

  1. You manipulate the image in Photoshop / Inkscape, or some other image manipulation package. The pdf should have vectorized elements that you can manipulate by hand.
  2. You can replot everything in Python / R. If you are comfortable with Python, you can directly manipulate the seaborn object that is used to generate this visualization. You’d just need to run the ranks_heatmap function.
2 Likes

Thanks for your help, I have solved my question !