Exemplo n.º 1
0
def iter_compath_dfs() -> Iterable[pd.DataFrame]:
    """Iterate over all ComPath mappings."""
    sha = get_commit('ComPath', 'compath-resources')

    yield _get_df('kegg_reactome.csv', sha=sha)
    yield _get_df('kegg_wikipathways.csv', sha=sha)
    yield _get_df('pathbank_kegg.csv', sha=sha)
    yield _get_df('pathbank_reactome.csv', sha=sha)
    yield _get_df('pathbank_wikipathways.csv', sha=sha)
    yield _get_df('special_mappings.csv', sha=sha)
    yield _get_df('wikipathways_reactome.csv', sha=sha)
Exemplo n.º 2
0
def iter_compath_dfs() -> Iterable[pd.DataFrame]:
    """Iterate over all ComPath mappings."""
    sha = get_commit("ComPath", "compath-resources")

    yield _get_df("kegg_reactome.csv", sha=sha)
    yield _get_df("kegg_wikipathways.csv", sha=sha)
    yield _get_df("pathbank_kegg.csv", sha=sha)
    yield _get_df("pathbank_reactome.csv", sha=sha)
    yield _get_df("pathbank_wikipathways.csv", sha=sha)
    yield _get_df("special_mappings.csv", sha=sha)
    yield _get_df("wikipathways_reactome.csv", sha=sha)
Exemplo n.º 3
0
def get_obo(force: bool = False) -> Obo:
    """Get FamPlex as OBO."""
    version = get_commit('sorgerlab', 'famplex')
    return Obo(
        ontology=PREFIX,
        name='FamPlex',
        iter_terms=get_terms,
        iter_terms_kwargs=dict(version=version, force=force),
        data_version=version,
        typedefs=[has_member, has_part, is_a, part_of],
        auto_generated_by=f'bio2obo:{PREFIX}',
    )
Exemplo n.º 4
0
def get_biomappings_df() -> pd.DataFrame:
    """Get biomappings equivalences."""
    sha = get_commit('biomappings', 'biomappings')
    url = f'https://raw.githubusercontent.com/biomappings/biomappings/{sha}/src/biomappings/resources/mappings.tsv'
    df = pd.read_csv(url, sep='\t')
    df[PROVENANCE] = url
    df.rename(columns={
        'source prefix': SOURCE_PREFIX,
        'source identifier': SOURCE_ID,
        'target prefix': TARGET_PREFIX,
        'target identifier': TARGET_ID,
    },
              inplace=True)
    df = df[XREF_COLUMNS]
    return df
Exemplo n.º 5
0
def get_biomappings_df() -> pd.DataFrame:
    """Get biomappings equivalences."""
    sha = get_commit("biopragmatics", "biomappings")
    url = f"https://raw.githubusercontent.com/biopragmatics/biomappings/{sha}/src/biomappings/resources/mappings.tsv"
    df = pd.read_csv(url, sep="\t")
    df[PROVENANCE] = url
    df.rename(
        columns={
            "source prefix": SOURCE_PREFIX,
            "source identifier": SOURCE_ID,
            "target prefix": TARGET_PREFIX,
            "target identifier": TARGET_ID,
        },
        inplace=True,
    )
    df = df[XREF_COLUMNS]
    return df
Exemplo n.º 6
0
 def _get_version(self) -> str:
     return get_commit("sorgerlab", "famplex")