Pre-set variables
Functions to pre set and inspect the variables engine, id_col, theme and warnings. Note that set_engine use is compulsory to obtain the plots, the rest can be specified or not as plot parameters.
- pyrangeyes.get_engine()
Returns the currently defined engine.
- pyrangeyes.get_id_col()
Returns the currently defined ID column (id_col).
- pyrangeyes.get_theme()
Returns the currently defined color theme.
- pyrangeyes.get_warnings()
Returns the current warnings state.
- pyrangeyes.set_engine(name)
Defines the engine for the plots.
- Parameters:
name (str) – Indicates if Matplotlib (‘plt’, ‘matplotlib’) or Plotly (‘ply’, ‘plotly’) should be used.
Examples
>>> import pyrangeyes as pre
>>> pre.set_engine('plt')
- pyrangeyes.set_id_col(name)
Defines the ID column for the data.
- Parameters:
name (str) – Indicates the name of the ID column to be used when dealing with data.
Examples
>>> import pyranges_plot as pre
>>> pre.set_id_col('gene_id')
- pyrangeyes.set_theme(name)
Defines the color theme for the plots.
- Parameters:
name ({str, dict, None}) – Name of the predefined theme or dictionary with defined options to be set as new default. Currently available themes are “dark”, “light”, “pastel” and “swimming_pool”.
Examples
>>> import pyrangeyes as pre
>>> pre.set_theme("dark") >>> pre.set_theme({"title_color": "goldenrod", "exon_height": 0.8})
- pyrangeyes.set_warnings(option)
Defines if the warnings should be shown.
- Parameters:
option (bool) – True for showing the warnings and false to turn them off.
Examples
>>> import pyrangeyes as pre
>>> pre.set_warnings(False)