Module ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias identifier ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Pass decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore NameLoad Assign NameStore BinOpMod Str NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd Call NameLoad NameLoad Call NameLoad NameLoad body Return BinOpMod Str TupleLoad NameLoad NameLoad SubscriptLoad NameLoad Slice Num Num orelse Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call NameLoad Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Str If UnaryOpNot Call NameLoad NameLoad body Expr Call NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad Call NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad If NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num body Expr Str If CompareNotEq Str SubscriptLoad NameLoad Index Num body Assign NameStore BinOpAdd ListLoad Str NameLoad Assign NameStore ListLoad For NameStore NameLoad body If BoolOpAnd NameLoad CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpOr NameLoad NameLoad body Assign NameStore ListLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad ListLoad If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr orelse FunctionDef arguments args NameParam defaults body Return BoolOpAnd Call AttributeLoad NameLoad attr NameLoad CompareNotIn NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd Call AttributeLoad NameLoad attr NameLoad CompareNotIn NameLoad NameLoad decorator_list If NameLoad body For NameStore SubscriptLoad NameLoad Slice Num NameLoad body If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body For NameStore SubscriptLoad NameLoad Slice Num NameLoad body If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad orelse If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad If NameLoad body Assign NameStore ListLoad For NameStore Call NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr ListComp BinOpAdd ListLoad BinOpAdd SubscriptLoad NameLoad Index Num BinOpMod Str NameLoad SubscriptLoad NameLoad Slice Num NameLoad comprehension NameStore NameLoad Assign NameStore NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad Num Call NameLoad NameLoad orelse Assign NameStore ListLoad For NameStore NameLoad body TryExcept body If NameLoad body Delete SubscriptDel NameLoad Index Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Continue FunctionDef arguments args NameParam NameParam defaults body Return ListComp NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad CompareIn NameLoad NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str If NameLoad body Assert CompareEq Call NameLoad NameLoad NameLoad Str Assign NameStore BinOpAdd ListLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad NameLoad Assign NameStore Num If BoolOpAnd NameLoad CompareEq Call NameLoad NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad orelse If BoolOpAnd CompareEq Call NameLoad NameLoad NameLoad UnaryOpNot NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore ListComp ListLoad NameLoad NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore ListLoad SubscriptLoad NameLoad Index Num NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Slice Num NameLoad Call NameLoad ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Slice Num NameLoad BinOpMult Call NameLoad ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Num Assign NameStore SubscriptLoad NameLoad Index Num If BoolOpAnd CompareLt SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Num UnaryOpNot NameLoad body Assign SubscriptStore NameLoad Index Num BinOpMult SubscriptLoad NameLoad Index Num Num Return TupleLoad NameLoad NameLoad NameLoad SubscriptLoad NameLoad Index Num NameLoad NameLoad NameLoad orelse If BoolOpAnd CompareEq Call NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad ListLoad ListLoad For NameStore Call NameLoad Num NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr ListComp BinOpAdd NameLoad BinOpMod Str NameLoad comprehension NameStore NameLoad If CompareEq NameLoad Num body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad NameLoad If NameLoad body If NameLoad body Assign NameStore ListLoad For NameStore Call NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr ListComp BinOpAdd ListLoad BinOpAdd SubscriptLoad NameLoad Index Num BinOpMod Str NameLoad SubscriptLoad NameLoad Slice Num NameLoad comprehension NameStore NameLoad Assign NameStore BinOpAdd ListLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad If BoolOpAnd CompareLt SubscriptLoad NameLoad Index Num Num UnaryOpNot NameLoad body Assign NameStore BinOpMult NameLoad Num Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore Dict For NameStore NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str Assert CompareEq Call NameLoad NameLoad Num Call AttributeLoad Str attr NameLoad If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad ListLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For NameStore NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad If BoolOpAnd CompareIn Str NameLoad CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assert BoolOpAnd CompareNotEq BinOpAdd NameLoad Num NameLoad CompareNotEq BinOpAdd NameLoad Num NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num NameLoad Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore NameLoad For NameStore NameLoad body If CompareIs Call NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad body If UnaryOpNot NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad orelse If CompareEq SubscriptLoad NameLoad Index NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad If BoolOpAnd UnaryOpNot NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpAdd ListLoad NameLoad NameLoad Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr ListComp Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str comprehension NameStore NameLoad Return TupleLoad SubscriptLoad NameLoad Slice Num NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body If Call AttributeLoad NameLoad attr Str body Continue If Call AttributeLoad NameLoad attr Str body Continue Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad If Call NameLoad NameLoad body Continue If Call AttributeLoad NameLoad attr Str body Continue Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A __future__ division numpy ndarray ones zeros vstack string strip os makedirs listdir os.path abspath dirname join exists isdir copy deepcopy qcli.util qcli_system_call emperor.qiime_backports.make_3d_plots get_custom_coords remove_nans scale_custom_coords emperor.qiime_backports.parse mapping_file_to_dict emperor.qiime_backports.util MetadataMap is_valid_git_refname is_valid_git_sha1 summarize_pcoas emperor __version__ emperor_library_version EmperorSupportFilesError N/A IOError N/A N/A Exception for missing support files N/A N/A EmperorInputFilesError N/A IOError N/A N/A Exception for missing support files N/A N/A EmperorUnsupportedComputation N/A ValueError N/A N/A Exception for computations that lack a meaning N/A N/A get_emperor_library_version N/A N/A N/A N/A N/A Get Emperor version and the git SHA + current branch (if applicable) N/A emperor_dir N/A get_emperor_project_dir N/A emperor_version emperor_library_version N/A sha_cmd N/A git --git-dir %s/.git rev-parse HEAD emperor_dir N/A N/A sha_o sha_e sha_r N/A qcli_system_call sha_cmd N/A git_sha N/A N/A sha_o strip N/A branch_cmd N/A git --git-dir %s/.git rev-parse --abbrev-ref HEAD emperor_dir N/A N/A branch_o branch_e branch_r N/A qcli_system_call branch_cmd N/A git_branch N/A N/A branch_o strip N/A N/A N/A is_valid_git_refname git_branch N/A is_valid_git_sha1 git_sha N/A N/A N/A %s, %s@%s N/A emperor_version git_branch N/A git_sha N/A 0 7 N/A N/A N/A %s emperor_version N/A get_emperor_project_dir N/A N/A N/A N/A N/A  Returns the top-level Emperor directory

    based on qiime.util.get_qiime_project_dir from github.com/qiime/qiime
     N/A current_file_path N/A abspath __file__ N/A current_dir_path N/A dirname current_file_path N/A N/A dirname current_dir_path N/A get_emperor_support_files_dir N/A N/A N/A N/A N/A Returns the path for the support files of the project  N/A N/A join N/A get_emperor_project_dir emperor/support_files/ N/A copy_support_files N/A N/A file_path N/A N/A N/A Copy the support files to a named destination

    Parameters
    ----------
    file_path: str
        path where you want the support files to be copied to

    Raises
    ------
    EmperorSupportFilesError
        if a problem is found whilst trying to copy the files.
     N/A file_path N/A join file_path emperor_required_resources N/A N/A N/A exists file_path N/A N/A N/A makedirs file_path N/A cmd N/A cp -R "%s/"* "%s" N/A N/A get_emperor_support_files_dir N/A abspath file_path N/A N/A cmd_o cmd_e cmd_r N/A qcli_system_call cmd N/A cmd_e N/A N/A N/A EmperorSupportFilesError N/A N/A Error found whilst trying to copy the support files:
{}
Could not execute: {} format cmd_e cmd N/A N/A preprocess_mapping_file N/A N/A data headers columns unique single clones N/A False False 0 N/A N/A Process a mapping file to expand the data or remove unuseful fields

    Parameters
    ----------
    data: list of list of str
        mapping file data
    headers: list of str
        mapping file headers
    columns: list of str
        headers to keep, if one of these headers includes two ampersands,
        this function will create a new column by merging the delimited columns
    unique: bool, optional
        keep columns where all values are unique. Default: false.
    single: bool, optional
        keep columns where all values are the same. Default: false
    clones: int, optional
        number of times to replicate the metadata. Default: 0

    Returns
    -------
    data: list of list of str
        processed mapping file data
    headers: list of str
        processed mapping file headers
     N/A N/A SampleID N/A columns N/A 0 N/A N/A columns N/A N/A SampleID columns N/A merge N/A N/A column columns N/A N/A N/A column N/A && column N/A N/A N/A N/A merge append column N/A new_column merge N/A N/A indices N/A N/A N/A headers index header_name N/A header_name N/A N/A new_column split && N/A line data N/A N/A N/A N/A line append N/A N/A join N/A N/A line N/A index N/A index indices N/A N/A N/A headers append new_column N/A N/A unique single N/A N/A columns_to_remove N/A N/A metadata N/A MetadataMap N/A mapping_file_to_dict data headers N/A N/A N/A None columns N/A N/A columns N/A headers N/A N/A f_unique N/A metadata hasUniqueCategoryValues N/A f_single N/A metadata hasSingleCategoryValue N/A f_unique N/A N/A x N/A N/A N/A N/A N/A N/A metadata hasUniqueCategoryValues x N/A x columns N/A f_single N/A N/A x N/A N/A N/A N/A N/A N/A metadata hasSingleCategoryValue x N/A x columns N/A N/A unique N/A N/A c N/A headers N/A 1 None N/A N/A N/A f_unique c N/A N/A N/A N/A columns_to_remove append c N/A single N/A N/A c N/A headers N/A 1 None N/A N/A N/A f_single c N/A N/A N/A N/A columns_to_remove append c N/A columns_to_remove N/A list N/A set columns_to_remove N/A N/A data headers N/A keep_columns_from_mapping_file data headers columns_to_remove negate True N/A N/A N/A None columns N/A N/A columns N/A headers N/A N/A N/A data headers N/A keep_columns_from_mapping_file data headers columns N/A N/A data headers N/A sanitize_mapping_file data headers N/A clones N/A N/A out_data N/A N/A index N/A range 0 clones N/A N/A N/A N/A out_data extend N/A N/A N/A N/A N/A element N/A 0 N/A _%d index N/A element N/A 1 None N/A element data N/A data out_data N/A N/A data headers N/A keep_columns_from_mapping_file N/A N/A data headers columns negate N/A False N/A N/A Select the header names to remove/keep from the mapping file

    Parameters
    ----------
    data: list of list of str
        mapping file data
    headers: list of str
        mapping file headers names
    columns: list of str
        header names to keep/remove, see negate
    negate: bool, optional
        False will _keep_ the listed columns; True will _remove_ them.
        Default: False

    Returns
    -------
    data: list of list of str
        filtered mapping file data
    headers: list of str
        filtered mapping file headers
     N/A data N/A deepcopy data N/A headers N/A deepcopy headers N/A negate N/A N/A indices_of_interest N/A range 0 N/A len headers N/A N/A indices_of_interest N/A N/A column columns N/A N/A N/A N/A negate N/A N/A N/A indices_of_interest N/A N/A N/A indices_of_interest index N/A N/A headers index column N/A N/A N/A N/A indices_of_interest append N/A N/A headers index column N/A N/A N/A ValueError N/A N/A keep_elements N/A N/A elements indices N/A N/A N/A N/A element N/A N/A i element N/A enumerate elements N/A i indices N/A N/A headers N/A keep_elements headers indices_of_interest N/A data N/A N/A keep_elements row indices_of_interest N/A row data N/A N/A data headers N/A preprocess_coords_file N/A N/A coords_header coords_data coords_eigenvals coords_pct mapping_header mapping_data custom_axes jackknifing_method is_comparison pct_variation_below_one N/A None None False False N/A N/A Process a PCoA data and handle customizations in the contents

    This controller function handles any customization that has to be done to
    the PCoA data prior to the formatting. Note that the first element in each
    list (coords, headers, eigenvalues & percents) will be considered the
    master set of coordinates.

    Parameters
    ----------
    coords_header: 1d or 2d array of str
        If 1d array of str, the sample identifiers in the PCoA file
        If 2d array of str, the sample identifiers for each coordinate
        file (if jackknifing or comparing plots)
    coords_data: 2d array of float or list of 2d array of float
        If 2d array of float, matrix of coordinates in the PCoA file
        If list of 2d array of float,  with coordinates for each file
        (if jackknifing or comparing plots)
    coords_eigenvals: 1d or 2d array of float
        If 1d array, eigenvalues for the coordinates file
        If 2d array, list of  arrays with the eigenvalues
        (if jackknifing or comparing plots)
    coords_pct: 1d or 2d array of float
        If 1d array, the percent explained by each principal coordinates axis
        If 2d array, a list of lists with numpy arrays (if jackknifing or
        comparing plots)
    mapping_header: list of str
        mapping file headers names
    mapping_data: list of lists of str
        mapping file data
    custom_axes: str, optional
        name of the mapping data fields to add to coords_data. Default: None
    jackknifing_method: {'sdev', 'IRQ', None}, optional
        For more info see qiime.util.summarize_pcoas. Default: None
    is_comparison: bool, optional
        whether or not the inputs should be considered as the ones for a
        comparison plot. Default: false
    pct_variation_below_one: bool, optional
        boolean to allow percet variation of the axes be under one.
        Default: false

    Returns
    -------
    coords_header: list of str
        Sample identifiers in the PCoA file
    coords_data: 2d array of float
        matrix of coordinates in the PCoA file with custom_axes if provided
    coords_eigenvals: array of float
        either the eigenvalues of the input coordinates or the average
        eigenvalues of the multiple coords that were passed in
    coords_pct: array of float
        list of percents explained by each axis as given by the master
        coordinates i. e. the center around where the values revolve
    coords_low: 2d array of float
        coordinates representing the lower edges of an ellipse; None if no
        jackknifing is applied
    coords_high: 2d array of float
        coordinates representing the highere edges of an ellipse; None if no
        jackknifing is applied
    clones: int
        total number of input files

    Raises
    ------
    AssertionError
        if a comparison plot is requested but a list of data is not passed
        as input
     N/A is_comparison N/A N/A N/A N/A type coords_data list Cannot process a comparison with the data from a single coordinates file N/A mapping_file N/A N/A mapping_header mapping_data N/A coords_file N/A coords_header coords_data N/A clones 0 N/A N/A custom_axes N/A N/A type coords_data ndarray N/A N/A N/A get_custom_coords custom_axes mapping_file coords_file N/A N/A remove_nans coords_file N/A N/A scale_custom_coords custom_axes coords_file N/A N/A N/A N/A N/A type coords_data list N/A is_comparison N/A N/A master_pcoa N/A N/A coords_header N/A 0 N/A coords_data N/A 0 N/A coords_eigenvals N/A 0 N/A coords_pct N/A 0 N/A support_pcoas N/A N/A h d e p N/A N/A h d e p N/A zip coords_header coords_data coords_eigenvals coords_pct N/A N/A coords_data coords_low coords_high eigenvalues_average identifiers N/A summarize_pcoas master_pcoa support_pcoas method jackknifing_method apply_procrustes False N/A custom_axes N/A N/A coords_file N/A N/A master_pcoa N/A 0 coords_data N/A N/A get_custom_coords custom_axes mapping_file coords_file N/A N/A remove_nans coords_file N/A N/A scale_custom_coords custom_axes coords_file N/A axes N/A len custom_axes N/A N/A coords_low N/A N/A N/A 0 axes N/A zeros N/A N/A N/A coords_low shape N/A 0 axes N/A N/A coords_high N/A N/A N/A 0 axes N/A N/A ones N/A N/A N/A coords_high shape N/A 0 axes 1e-05 N/A coords_data N/A coords_file N/A 1 N/A N/A N/A N/A N/A master_pcoa N/A 3 N/A 0 1.0 N/A pct_variation_below_one N/A N/A N/A master_pcoa N/A 3 N/A N/A master_pcoa N/A 3 100 N/A N/A identifiers coords_data eigenvalues_average N/A master_pcoa N/A 3 coords_low coords_high clones N/A N/A N/A N/A N/A type coords_data list is_comparison N/A N/A clones N/A len coords_data N/A N/A out_headers out_coords N/A N/A N/A N/A index N/A range 0 clones N/A N/A headers_i N/A coords_header N/A index N/A coords_i N/A coords_data N/A index N/A N/A N/A out_headers extend N/A N/A element N/A _%d index N/A element headers_i N/A N/A index 0 N/A N/A out_coords coords_i N/A coords_eigenvals N/A coords_eigenvals N/A index N/A coords_pct N/A coords_pct N/A index N/A N/A out_coords N/A vstack N/A out_coords coords_i N/A coords_file N/A out_headers out_coords N/A custom_axes N/A N/A clones N/A N/A out_data N/A N/A index N/A range 0 clones N/A N/A N/A N/A out_data extend N/A N/A N/A N/A N/A element N/A 0 N/A _%d index N/A element N/A 1 None N/A element mapping_data N/A mapping_file N/A N/A mapping_header out_data N/A N/A get_custom_coords custom_axes mapping_file coords_file N/A N/A remove_nans coords_file N/A N/A scale_custom_coords custom_axes coords_file N/A N/A N/A N/A coords_pct N/A 0 1.0 N/A pct_variation_below_one N/A N/A coords_pct N/A coords_pct 100 N/A N/A N/A coords_file N/A 0 N/A coords_file N/A 1 coords_eigenvals coords_pct None None clones N/A _is_numeric N/A N/A x N/A N/A N/A Return true if x is a numeric value, return false else

    Parameters
    ----------
    x : str
        string to test whether something is or not a number

    Returns
    -------
    bool
        whether something is or not a number
     N/A N/A N/A N/A float x N/A N/A N/A N/A False N/A True N/A fill_mapping_field_from_mapping_file N/A N/A data headers values criteria N/A _is_numeric N/A N/A 
    Parameters
    ----------
    data : list of list of str
        mapping file data
    headers : list of str
        mapping file headers
    values : str
        string with the format a format of
        Category:ValueToFill;Category:ValueToFill ...
        or
        Category:ColumnToSearch==ValueWithinTheColumnToSearch=ValueToFill
    criteria : function, optional
        function that takes a value and returns true or false, default is
        to check if the inputed value is numeric or not (_is_numeric).

    Returns
    -------
    data: list of list of str
        Filled in mapping file data

    Raises
    ------
    EmperorInputFilesError
        If a header is not found in the mapping file or it wasn't used for
        processing.
     N/A out_data N/A deepcopy data N/A values N/A map strip N/A N/A values split ; N/A values_dict N/A N/A v values N/A N/A N/A colname vals N/A map strip N/A N/A v split : 1 N/A vals N/A map strip N/A N/A vals split , N/A N/A N/A len vals 1 N/A N/A You can only pass 1 replacement value: {} format vals N/A N/A colname values_dict N/A N/A N/A values_dict N/A colname N/A N/A N/A N/A N/A values_dict N/A colname extend vals N/A N/A key v N/A N/A values_dict items N/A N/A value v N/A N/A column None N/A used_column_index False N/A N/A N/A header_index N/A N/A headers index key N/A N/A N/A ValueError N/A N/A N/A EmperorInputFilesError N/A N/A The header {} does not exist in the mapping file format key N/A N/A N/A == value N/A = value N/A N/A arrow_index N/A N/A value index == N/A equal_index N/A N/A value rindex = N/A N/A N/A N/A arrow_index 2 equal_index N/A N/A arrow_index 1 equal_index N/A N/A Not properly formatted: {} format value N/A column N/A value N/A arrow_index N/A column_value N/A value N/A N/A arrow_index 2 equal_index N/A new_value N/A value N/A N/A equal_index 1 N/A N/A N/A column_index N/A N/A headers index column N/A N/A N/A ValueError N/A N/A N/A EmperorInputFilesError N/A N/A The header {} does not exist in the mapping file format column N/A fill_the_data False N/A line out_data N/A N/A N/A N/A criteria N/A line N/A header_index False N/A N/A N/A column N/A N/A N/A line N/A header_index value N/A used_column_index True N/A fill_the_data True N/A N/A N/A N/A line N/A column_index column_value N/A N/A N/A line N/A header_index new_value N/A used_column_index True N/A fill_the_data True N/A N/A N/A used_column_index fill_the_data N/A N/A N/A EmperorInputFilesError N/A N/A This value '{}' does not exist in '{}' or it wasn't used forprocessing format column_value column N/A out_data N/A sanitize_mapping_file N/A N/A data headers N/A N/A N/A Clean the strings in the mapping file for use with javascript

    This function will remove all the ocurrences of characters like ' or ".

    Parameters
    ----------
    data : list of lists of str
        the mapping file data
    headers : list of str
        the mapping file headers

    Returns
    -------
    s_data : list of lists of str
        sanitized version of the input mapping file data
    s_headers : list of str
        sanitized version of the input mapping file headers
     N/A all_lines N/A N/A headers data N/A out_lines N/A N/A line all_lines N/A N/A N/A N/A out_lines append N/A N/A N/A N/A N/A element replace ' replace " N/A element line N/A N/A N/A out_lines N/A 1 None N/A out_lines N/A 0 N/A guess_coordinates_files N/A N/A dir_path N/A N/A N/A Given a directory return the file paths that can contain coordinates

    Parameters
    ----------
    dir_path : str
        path to the directory where coordinate files are contained

    Returns
    -------
    list of str
        list of filepaths pointing to the coordinates files

    Notes
    -----
    If a path inside dir_path meets any of the following criteria, it will be
    ignored:
    - Is a hidden file
    - Is named `Icon?`.
    - Is folder
    - Is part of the procrustes results from QIIME, see
      transform_coordinate_matrices.py
     N/A coord_fps N/A N/A filepath N/A listdir dir_path N/A N/A N/A N/A filepath startswith . N/A N/A N/A N/A N/A filepath startswith Icon? N/A N/A N/A filepath N/A join N/A abspath dir_path filepath N/A N/A isdir filepath N/A N/A N/A N/A N/A filepath endswith procrustes_results.txt N/A N/A N/A N/A N/A coord_fps append filepath N/A coord_fps N/A