The official Python 3 interface to the g:Profiler toolkit, providing functional enrichment analysis of GO and other terms, conversion between identifier namespaces, and mapping orthologous genes. It is currently at version 1.0.0, released in April 2019, and appears to have a stable, though not rapid, release cadence based on its history.
pip install gprofiler-officialVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `GProfiler` client and perform basic functional enrichment analysis (g:GOSt) and gene ID conversion (g:Convert). It's recommended to provide a `user_agent` for API calls and to set `return_dataframe=True` for convenient result handling with pandas.
Review the API documentation for version 1.0.0 and update your code accordingly. For legacy projects requiring Python 2, use `pip install gprofiler-official==0.2.3`.
Ensure your project is running on Python 3. If Python 2 support is strictly necessary, use version 0.2.3 specifically.
Check for identifier discrepancy warnings in the g:Profiler output. You may need to manually map ambiguous genes or re-submit the query with explicit mappings to ensure all identifiers are correctly interpreted.
Install `pandas` explicitly if you intend to use the DataFrame output: `pip install pandas`.
Ensure you have `gprofiler-official` installed (not `gprofiler` or `python-gprofiler`) and use the correct capitalization for the import: `from gprofiler import GProfiler`.
The recommended way to use `gprofiler-official` (v1.0.0) is through its Python API. Use `from gprofiler import GProfiler` in a Python script and call methods on the `GProfiler` object. If a command-line interface is strictly needed, verify if your installation created a `gprofiler.py` executable in your PATH or check the library's official documentation for alternative CLI usage.
If the `gprofiler` method returns a list, you need to iterate through the list to access individual dictionary items within it. Alternatively, initialize `GProfiler` with `return_dataframe=True` to get results as a pandas DataFrame, which offers different methods for data access. For example: `gp = GProfiler(return_dataframe=True)`.