In [2]:
%matplotlib inline
import pandas as pd

Figure 4 csv data generation

Figure data consolidation for Figure 4, which shows patterns entropy for taxa and across the phylogeny

Figure 4a: entropy for genera and entropy for representative tag sequences


In [20]:
# read in exported table for genus

fig4a_genus = pd.read_csv('../../../data/07-entropy-and-covariation/genus-level-distribution.csv', header=0)

In [21]:
# read in exported table for otu

fig4a_otu = pd.read_csv('../../../data/07-entropy-and-covariation/otu-level-distribution-400.csv', header=0)

Figure 4b: Entropy as a function of phylogenetic width per clade


In [22]:
# read in exported table

fig4b = pd.read_csv('../../../data/07-entropy-and-covariation/entropy_by_phylogeny_c20.csv', header=0)

Figure 4c: Entropy as a function of taxonomic level


In [23]:
# read in exported table

fig4c = pd.read_csv('../../../data/07-entropy-and-covariation/entropy_by_taxonomy_c20.csv', header=0)

Figure 4bc: Entropy values per OTU for violin plot


In [24]:
# read in exported table

fig4bc = pd.read_csv('../../../data/07-entropy-and-covariation/entropy_per_tag_sequence_s10.csv', header=0)

In [25]:
fig4 = pd.ExcelWriter('Figure4_data.xlsx')

fig4a_genus.to_excel(fig4,'Fig-4a_genus')
fig4a_otu.to_excel(fig4,'Fig-4a_sequence')
fig4b.to_excel(fig4,'Fig-4b')
fig4c.to_excel(fig4,'Fig-4c')
fig4bc.to_excel(fig4,'Fig-4bc_violin')

fig4.save()

In [ ]: