class
Assay(wallaroo.object.Object):
An Assay represents a record in the database. An assay contains
some high level attributes such as name, status, active, etc. as well
as the sub objects Baseline, Window and Summarizer which specify how
the Baseline is derived, how the Windows should be created and how the
analysis should be conducted.
Base constructor.
Each object requires:
- a GraphQL client - in order to fill its missing members dynamically
- an initial data blob - typically from unserialized JSON, contains at
- least the data for required
members (typically the object's primary key) and optionally other data
members.
def
active(*args, **kwargs):
def
status(*args, **kwargs):
def
name(*args, **kwargs):
def
warning_threshold(*args, **kwargs):
def
alert_threshold(*args, **kwargs):
def
pipeline_id(*args, **kwargs):
def
pipeline_name(*args, **kwargs):
def
workspace_id(*args, **kwargs):
def
workspace_name(*args, **kwargs):
@staticmethod
def
get_assay_info( client: wallaroo.client.Client, assay_id: int, workspace_id: Optional[int] = None, workspace_name: Optional[str] = None) -> pandas.core.frame.DataFrame:Get the assay information for the given assay_id
Parameters
- client: Client object
- assay_id: int Assay Identifier
- workspace_id: Optiona[int] Workspace Identifier
- workspace_name: Optional[str] Workspace Name
Returns
pd.DataFrame
def
turn_on(self):
Sets the Assay to active causing it to run and backfill any
missing analysis.
def
turn_off(self):
Disables the Assay. No further analysis will be conducted until the assay
is enabled.
def
set_alert_threshold(self, threshold: float):
Sets the alert threshold at the specified level. The status in the AssayAnalysis
will show if this level is exceeded however currently alerting/notifications are
not implemented.
def
set_warning_threshold(self, threshold: float):
Sets the warning threshold at the specified level. The status in the AssayAnalysis
will show if this level is exceeded however currently alerting/notifications are
not implemented.
class
AssayAnalysis:
The AssayAnalysis class helps handle the assay analysis logs from the Plateau
logs. These logs are a json document with meta information on the assay and analysis
as well as summary information on the baseline and window and information on the comparison
between them.
window_summary: Dict[str, Any]
def
baseline_stats(self) -> pandas.core.frame.DataFrame:
Creates a simple dataframe with the basic stats data for a baseline.
def
baseline_bins(self) -> pandas.core.frame.DataFrame:
Creates a simple dataframe to with the edge/bin data for a baseline.
def
chart(self, show_scores: bool = True) -> None:
Create a chart showing the bins, values and scores of an assay result.
show_scores
will also label each bin with its final weighted (if specified) score.
Parameters
- show_scores: Whether to show the scores for each bin.
def
compare_basic_stats(self) -> pandas.core.frame.DataFrame:
Creates a simple dataframe making it easy to compare a baseline and window.
def
compare_bins(self) -> pandas.core.frame.DataFrame:
Creates a simple dataframe to compare the bin/edge information of baseline and window.
class
AssayAnalysisList:
Helper class primarily to easily create a dataframe from a list
of AssayAnalysis objects.
def
chart_iopaths( self, labels: Optional[List[str]] = None, selected_labels: Optional[List[str]] = None, nth_x_tick: Optional[int] = None) -> None:
Creates a basic charts of the scores for each unique iopath of a list of assay results.
Parameters
- labels: Custom labels for each unique iopath. If provided,
these labels will be used in chart titles instead of raw iopath values.
- selected_labels: Labels to filter which iopaths to chart.
If provided, only iopaths with labels in this list will be charted.
- nth_x_tick: Controls the density of x ticks.
Every nth x tick will be used for the chart.
def
chart_scores( self, title: Optional[str] = None, nth_x_tick: Optional[int] = 4, start: Optional[datetime.datetime] = None, end: Optional[datetime.datetime] = None) -> None:
Creates a chart of the scores from dataframe representation of a list of assay results.
Parameters
- title: The title of the chart.
- nth_x_tick: Controls the density of x ticks.
Every nth x tick will be used for the chart.
- start: The start time of the chart. Both start and end have
to be provided to be used.
- end: The end time of the chart. Both start and end have
to be provided to be used.
def
to_dataframe(self) -> pandas.core.frame.DataFrame:
Creates and returns a summary dataframe from the assay results.
def
to_full_dataframe(self) -> pandas.core.frame.DataFrame:
Creates and returns a dataframe with all values including inputs
and outputs from the assay results.