<jupyter_start><jupyter_text>Gene-age distributions by algorithm This notebook was used to generate data for Figure 1<jupyter_code>import pandas as pd
from matplotlib import pyplot as plt
%matplotlib inline
binAges = pd.read_csv("../binAges_HUMAN.csv",index_col=0)
binAges = binAges[['InParanoid', 'InParanoidCore', 'PANTHER8_LDO','OMA_Groups', 'OMA_Pairs', 
    'RSD', 'EggNOG', 'Orthoinspector', 'Hieranoid_2', 'EnsemblCompara_v2', 
    'Metaphors', 'PhylomeDB','PANTHER8_all']]
binAges.head()<jupyter_output><empty_output><jupyter_text>Get value counts for each database, normalize, and plot<jupyter_code>ageCounts = binAges.apply(pd.value_counts)
ageCounts.drop(["None"],inplace=True)
ageFreqs = ageCounts.apply(lambda x: x/float(x.sum()))
cols = ["Cellular_organisms","Euk+Bac",
  "Euk_Archaea",
  "Eukaryota",
  "Opisthokonta",
  "Eumetazoa",
  "Vertebrata",
  "Mammalia"]

ageFreqsFlip = ageFreqs.T[cols]
ageFreqsFlip 
ax = ageFreqsFlip.plot(kind='bar',colormap='Greys', ylim=(0,.7),legend=False)
ax.grid(False)
xLeft,xRight = ax.get_xlim()

plt.tight_layout()
plt.legend(loc=0,ncol=3,prop={'size':9})

#plt.savefig("ageDistributions.svg")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15816326530612246, 'fraction_numerical': 0.00935374149659864, 'mean_word_length': 8.053846153846154, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '199902', 'license': 'MIT', 'n_tokens_mistral': 504, 'n_tokens_neox': 487, 'n_words': 74, 'path': 'Notebooks/geneAges_byAlgorithm.ipynb', 'repo_name': 'bliebeskind/Gene-Ages', 'size': '1176'}