<commit_before>#!/usr/bin/env python

__author__ = "<NAME>"
__copyright__ = "Copyright 2013, The American Gut Project"
__credits__ = ["<NAME>"]
__license__ = "BSD"
__version__ = "unversioned"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"

from future import __division__

from numpy import array, argsort, zeros


def get_filtered_taxa_summary(mapping_file, taxa_summary_file,
                              metadata_category, metadata_value,
                              top_n_taxa=7, select_taxa=None):
    """ Get a simplified taxonomy table.

        Inputs:
        mapping_file - Input mapping file (sample ids match taxa file)
        taxa_summary_file - Taxonomy summary file
        metadata_category - Used to select specific samples from the taxa file
        metadata_value - Value used to select specific samples
                         from the taxa file<commit_msg>future to __future__<commit_after>#!/usr/bin/env python

from __future__ import division

__author__ = "<NAME>"
__copyright__ = "Copyright 2013, The American Gut Project"
__credits__ = ["<NAME>"]
__license__ = "BSD"
__version__ = "unversioned"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"

from numpy import array, argsort, zeros


def get_filtered_taxa_summary(mapping_file, taxa_summary_file,
                              metadata_category, metadata_value,
                              top_n_taxa=7, select_taxa=None):
    """ Get a simplified taxonomy table.

        Inputs:
        mapping_file - Input mapping file (sample ids match taxa file)
        taxa_summary_file - Taxonomy summary file
        metadata_category - Used to select specific samples from the taxa file
        metadata_value - Value used to select specific samples
                         from the taxa file
{'fraction_non_alphanumeric': 0.07106598984771574, 'fraction_numerical': 0.0056401579244218835, 'mean_word_length': 2.798715203426124, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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}}
{'dir': 'git-commits-cleaned', 'id': '6396193', 'n_tokens_mistral': 510, 'n_tokens_neox': 472, 'n_words': 157}