RelativeFrequency table heatmap

Hi,
Is there a way to use feature table heatmap function to generate a heatmap representation of a RelativeFrequency feature table? I checked QIIME2 Docs and apparently this function accepts exclusively Frequency type tables, so is there a way to mask the RelativeFrequency table in order to QIIME look at it as a Frequency table and then generate the heatmap? Probably QIIME can’t make this plots for a RelativeFrequency because it would face problems clustering samples/features based on relative frequencies, that being the case, can I access the matplotlib code used by QIIME team while developing this visualizer so I can generate a similar heatmap for tables other than frequency tables?

Thank you

1 Like

Hi @vheidrich,
You are correct, this function only accepts Frequency tables but to tell the truth I am not sure there is any reason why it should not also accept RelativeFrequency — @thermokarst any thoughts?.

The code that is setting this is here. You could change this line to say 'table': FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | PercentileNormalized] and then you will be able to input any of those types. You could also submit that change as a pull request to change that in QIIME 2. :wink:

Sure, it's all open source BDS-3 licensed code. You could just use this function to make your own heatmaps with any pandas dataframe — it would be easy to load your feature table using the Artifact API and view as a pd.DataFrame to input to that function.

1 Like

There is built-in normalization in this method, I guess we would want to disable that normalization if the provided input has already been normalized.

BTW, I think we could probably also just update the signature to accept FeatureTable, instead of that union listing above, but I could be wrong (cc @ebolyen).

:t_rex:

2 Likes

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