wallaroo.custom_types


@runtime_checkable
class IAssayAnalysis(typing.Protocol):

Base class for protocol classes.

Protocol classes are defined as::

class Proto(Protocol):
    def meth(self) -> int:
        ...

Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example::

class C:
    def meth(self) -> int:
        return 0

def func(x: Proto) -> int:
    return x.meth()

func(C())  # Passes static type check

See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as::

class GenProto(Protocol[T]):
    def meth(self) -> T:
        ...
IAssayAnalysis(*args, **kwargs)
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:

Compare basic stats between baseline and window.

Returns

A dataframe including stats, start and end times for the window against the baseline.

def compare_bins(self) -> pandas.core.frame.DataFrame:

Compare bins between baseline and window.

Returns

A dataframe including edges, labels and values for the window against the baseline.

@runtime_checkable
class IAssayAnalysisList(typing.Protocol):

Base class for protocol classes.

Protocol classes are defined as::

class Proto(Protocol):
    def meth(self) -> int:
        ...

Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example::

class C:
    def meth(self) -> int:
        return 0

def func(x: Proto) -> int:
    return x.meth()

func(C())  # Passes static type check

See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as::

class GenProto(Protocol[T]):
    def meth(self) -> T:
        ...
IAssayAnalysisList(*args, **kwargs)
def chart_iopaths( self, labels: Optional[List[str]] = None, selected_labels: Optional[List[str]] = None, nth_x_tick: Optional[int] = None) -> None:

Create a basic chart of the scores for each unique iopath of an AssayAnalysisList.

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:

Create a chart of the scores from a dataframe representation of an AssayAnalysisList.

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:

Convert an AssayAnalysisList to a dataframe.

def to_full_dataframe(self) -> pandas.core.frame.DataFrame:

Convert an AssayAnalysisList to a full dataframe.