itpseq.Replicate

class itpseq.Replicate(*, replicate: str | None = None, filename: Path | None = None, sample: Sample | None = None, labels: dict | None = None, **kwargs)

Replicate instances represent a specific biological or experimental replicate of a Sample.

The purpose of the class is to handle, process, and analyze data corresponding to a replicate. Replicate objects provide methods to load associated data, compute statistical measures, and generate graphical representations such as sequence logos.

filename

Path to the file associated with the replicate. This file is expected to contain raw data relevant to the replicate.

Type:

Optional[Path]

sample

The sample object this replicate belongs to.

Type:

Optional[Sample]

replicate

Identifier or label for the replicate (e.g., “1”).

Type:

Optional[str]

labels

Dictionary of labels or metadata associated with the replicate.

Type:

Optional[dict]

name

Name of the sample, derived from sample.name if provided.

Type:

str

dataset

The DataSet the Sample belongs to, derived from sample.dataset if provided.

Type:

Any

kwargs

Additional keyword arguments and metadata stored as “meta” during initialization.

Type:

dict

Methods

logo([logo_kwargs, ax, fMet, type])

Generates a sequence logo based on the aligned inverse-toeprints, using the logomaker library.

get_counts

load_data

__init__(*, replicate: str | None = None, filename: Path | None = None, sample: Sample | None = None, labels: dict | None = None, **kwargs)

Methods

__init__(*[, replicate, filename, sample, ...])

get_counts([pos])

load_data(**kwargs)

logo([logo_kwargs, ax, fMet, type])

Generates a sequence logo based on the aligned inverse-toeprints, using the logomaker library.