Identify pathways overrepresented in a constructed feature
    according to a user-specified criterion (see `gene_signature_definitions`
    in the parameters list below) for identifying the feature's gene
    signature. Overlap-correction is not applied to the pathway definitions.

    Parameters
    -----------
    feature_weight_vector : pandas.Series(float), shape = n
      A vector containing gene weights
    pathway_definitions : dict(str -> set(str))
      A pathway (key) is defined by a set of genes (value).
    gene_signature_definition : functools.partial callable,
                                returns (set(), set())
      Accepts the `feature_weight_vector` as input. Provide a function to
      distinguish positive and/or negative gene signatures.
      Both a positive & negative signature may be appropriate if the feature's
      gene weight distribution spans positive and negative values. If this
      is not the case, a user can just specify a single gene signature by
      returning one or the other as an empty set.
    alpha : float (default=0.05)
      Significance level for pathway enrichment.
    metadata : bool (default=False)
      Return information about the gene signature(s)

    Returns
    -----------
    tup([pandas.DataFrame|None], dict())
    tup[0] : pandas.DataFrame: dataframe of significant pathways
           | None if the gene signature does not contain any genes in the
                  pathway definitions
    tup[1] : if `metadata`:
             {"positive signature": <set() positive gene signature>,
              "negative signature": <set() negative gene signature>,
              "pathway definitions": <dict(str -> set()) the pathway genes
               that are in the gene signature(s)>}
             else: {}

def pathway_enrichment_no_overlap_correction(feature_weight_vector,
                                             pathway_definitions,
                                             gene_signature_definition,
                                             alpha=0.05,
                                             metadata=False):
    """Identify pathways overrepresented in a constructed feature
    according to a user-specified criterion (see `gene_signature_definitions`
    in the parameters list below) for identifying the feature's gene
    signature. Overlap-correction is not applied to the pathway definitions.

    Parameters
    -----------
    feature_weight_vector : pandas.Series(float), shape = n
      A vector containing gene weights
    pathway_definitions : dict(str -> set(str))
      A pathway (key) is defined by a set of genes (value).
    gene_signature_definition : functools.partial callable,
                                returns (set(), set())
      Accepts the `feature_weight_vector` as input. Provide a function to
      distinguish positive and/or negative gene signatures.
      Both a positive & negative signature may be appropriate if the feature's
      gene weight distribution spans positive and negative values. If this
      is not the case, a user can just specify a single gene signature by
      returning one or the other as an empty set.
    alpha : float (default=0.05)
      Significance level for pathway enrichment.
    metadata : bool (default=False)
      Return information about the gene signature(s)

    Returns
    -----------
    tup([pandas.DataFrame|None], dict())
    tup[0] : pandas.DataFrame: dataframe of significant pathways
           | None if the gene signature does not contain any genes in the
                  pathway definitions
    tup[1] : if `metadata`:
             {"positive signature": <set() positive gene signature>,
              "negative signature": <set() negative gene signature>,
              "pathway definitions": <dict(str -> set()) the pathway genes
               that are in the gene signature(s)>}
             else: {}
    """
    genes_in_pathway_definitions = set.union(*pathway_definitions.values())

    positive_gene_signature, negative_gene_signature = \
        gene_signature_definition(feature_weight_vector)
    gene_signature = ((positive_gene_signature | negative_gene_signature) &
                      genes_in_pathway_definitions)

    if not gene_signature:
        return (None, {})

    additional_information = {}
    n_genes = len(feature_weight_vector)

    if metadata:
        additional_information["positive_signature"] = positive_gene_signature
        additional_information["negative_signature"] = negative_gene_signature

        collect_signature_pathway_definitions = {}
        for pathway, definition in pathway_definitions.items():
            signature_definition = gene_signature & definition
            if signature_definition:
                collect_signature_pathway_definitions[pathway] = (
                    signature_definition)
        additional_information["pathway_definitions"] = (
            collect_signature_pathway_definitions)

    pathway_positive_series = single_side_pathway_enrichment(
        pathway_definitions, positive_gene_signature, n_genes)
    pathway_negative_series = single_side_pathway_enrichment(
        pathway_definitions, negative_gene_signature, n_genes)
    pvalue_information = pathway_positive_series.append(
        pathway_negative_series)
    side_information = _pathway_side_information(
        pathway_positive_series, pathway_negative_series,
        pvalue_information.index)
    significant_pathways = _significant_pathways_dataframe(
        pvalue_information, side_information, alpha)
    return significant_pathways, additional_information