pyprobound.table

Module for loading and scoring count tables and sequences.

Members are explicitly re-exported in pyprobound.

A count table consists of sequences and their corresponding counts within each selection round. For example, a three-round SELEX table might be:

AAAA 0 0 2

ACGA 2 1 0

CGAA 0 1 5

TCAG 1 0 0

A table might also contain flanking sequences on the left and right, which are prepended and appended, respectively, to every sequence in the table.

Functions

collate_batch_fn(batch, *[, collate_fn_map])

Merges a sequence of Batches into a single Batch.

get_dataframe(paths[, total_count, random_state])

Loads tab-delimited count tables into columns on a Pandas dataframe.

sample_counts(dataframe[, n_counts, ...])

Randomly samples n_counts total counts each column of a dataframe.

sample_dataframe(dataframe[, frac, ...])

Randomly samples from a dataframe evenly by enrichment.

score(module, batch[, fun, max_split])

Scores a batch using a chosen function, automatically managing devices.

Classes

Batch()

A protocol for a set of rows from a table.

CountBatch(seqs, target)

A protocol for a set of rows from a count table.

CountTable(dataframe, alphabet[, ...])

A tensor encoding of a count table with flank management.

EvenSampler(data_source[, n_bin])

Evenly sample across the range of indices

MultitaskLoader(dataloaders)

Combines multiple dataloaders for multitask learning.

Table(alphabet[, left_flank, right_flank, ...])

A generic tensor encoding of a table, should implement flank management.