Пример #1
0
def run(enrichr_results, signature_label):

    # Libraries
    libraries = {
        'KEA_2015': '### A. KEA (experimentally validated targets)',
        'ARCHS4_Kinases_Coexp': '### B. ARCHS4 (coexpressed genes)'
    }

    # Initialize results
    results = []

    # Loop through genesets
    for geneset in ['upregulated', 'downregulated']:

        # Append ChEA results
        enrichment_dataframe = s.get_enrichr_results(
            enrichr_results[geneset]['userListId'],
            gene_set_libraries=libraries,
            geneset=geneset)
        results.append(enrichment_dataframe)

    # Concatenate results
    enrichment_dataframe = pd.concat(results)

    return {
        'enrichment_dataframe': enrichment_dataframe,
        'signature_label': signature_label
    }
Пример #2
0
def run(enrichr_results, signature_label):

    # Libraries
    libraries = {
        'TargetScan_microRNA_2017':
        '### A. TargetScan (experimentally validated targets)',
        'miRTarBase_2017':
        '### B. miRTarBase (experimentally validated targets)'
    }

    # Initialize results
    results = []

    # Loop through genesets
    for geneset in ['upregulated', 'downregulated']:

        # Append ChEA results
        enrichment_dataframe = s.get_enrichr_results(
            enrichr_results[geneset]['userListId'],
            gene_set_libraries=libraries,
            geneset=geneset)
        results.append(enrichment_dataframe)

    # Concatenate results
    enrichment_dataframe = pd.concat(results)

    return {
        'enrichment_dataframe': enrichment_dataframe,
        'signature_label': signature_label
    }
def run(enrichr_results,
        signature_label,
        plot_type='interactive',
        sort_results_by='pvalue'):

    # Libraries
    libraries = {
        'KEGG_2016': 'KEGG Pathways',
        'WikiPathways_2016': 'WikiPathways',
        'Reactome_2016': 'Reactome Pathways'
    }

    # Get Enrichment Results
    enrichment_results = {
        geneset: s.get_enrichr_results(enrichr_results[geneset]['userListId'],
                                       gene_set_libraries=libraries,
                                       geneset=geneset)
        for geneset in ['upregulated', 'downregulated']
    }
    enrichment_results['signature_label'] = signature_label
    enrichment_results['plot_type'] = plot_type
    enrichment_results['sort_results_by'] = sort_results_by

    # Return
    return enrichment_results
Пример #4
0
def run(enrichr_results,
        signature_label,
        plot_type='interactive',
        go_version='2018',
        sort_results_by='pvalue'):

    # Libraries
    go_version = str(go_version)
    libraries = {
        'GO_Biological_Process_' + go_version:
        'Gene Ontology Biological Process (' + go_version + ' version)',
        'GO_Molecular_Function_' + go_version:
        'Gene Ontology Molecular Function (' + go_version + ' version)',
        'GO_Cellular_Component_' + go_version:
        'Gene Ontology Cellular Component (' + go_version + ' version)'
    }

    # Get Enrichment Results
    enrichment_results = {
        geneset: s.get_enrichr_results(enrichr_results[geneset]['userListId'],
                                       gene_set_libraries=libraries,
                                       geneset=geneset)
        for geneset in ['upregulated', 'downregulated']
    }
    enrichment_results['signature_label'] = signature_label
    enrichment_results['plot_type'] = plot_type
    enrichment_results['sort_results_by'] = sort_results_by

    # Return
    return enrichment_results
Пример #5
0
def run(enrichr_results, signature_label, plot_type='interactive'):

    # Libraries
    libraries = {
        'GO_Biological_Process_2017b': 'Gene Ontology Biological Process',
        'GO_Molecular_Function_2017b': 'Gene Ontology Molecular Function',
        'GO_Cellular_Component_2017b': 'Gene Ontology Cellular Component'
    }

    # Get Enrichment Results
    enrichment_results = {
        geneset: s.get_enrichr_results(enrichr_results[geneset]['userListId'],
                                       gene_set_libraries=libraries,
                                       geneset=geneset)
        for geneset in ['upregulated', 'downregulated']
    }
    enrichment_results['signature_label'] = signature_label
    enrichment_results['plot_type'] = plot_type

    # Return
    return enrichment_results