libgunshotmatch.project

Represents a collection of repeat analyses.

Classes:

Project(name, alignment, datafile_data[, …])

A project represents the aligned peaks from multiple datafiles.

Functions:

consolidate(project, engine)

Consolidate the compound identification from the experiments into a single dataset.

class Project(name, alignment, datafile_data, consolidated_peaks=None)[source]

A project represents the aligned peaks from multiple datafiles.

Parameters

Methods:

__eq__(other)

Return self == other.

consolidate(engine[, peak_filter])

Consolidate the compound identification from the experiments into a single dataset.

export(output_dir)

Export as a gsmp file.

from_dict(d)

Construct a Project from a dictionary.

from_file(filename)

Parse a gsmp file.

to_dict()

Returns a dictionary representation of this Project.

Attributes:

alignment

Peak alignment for the repeats in this project.

consolidated_peaks

List of peaks after consolidate() is performed.

datafile_data

Mapping of repeat names to Repeat objects.

name

The name of the project.

__eq__(other)

Return self == other.

Return type

bool

alignment

Type:    Alignment

Peak alignment for the repeats in this project.

consolidate(engine, peak_filter=None)[source]

Consolidate the compound identification from the experiments into a single dataset.

Parameters
Return type

DataFrame

Returns

pandas.DataFrame giving the results of pairwise mass spectral comparisons between the repeats for each aligned peak.

consolidated_peaks

Type:    Optional[List[ConsolidatedPeak]]

List of peaks after consolidate() is performed. None initially.

datafile_data

Type:    Dict[str, Repeat]

Mapping of repeat names to Repeat objects.

export(output_dir)[source]

Export as a gsmp file.

Return type

str

Returns

The output filename.

classmethod from_dict(d)[source]

Construct a Project from a dictionary.

Parameters

d (Mapping[str, Any])

Return type

Project

classmethod from_file(filename)[source]

Parse a gsmp file.

Parameters

filename (Union[str, Path, PathLike]) – The input filename.

Return type

Project

name

Type:    str

The name of the project.

to_dict()[source]

Returns a dictionary representation of this Project.

All keys are native, JSON-serializable, Python objects.

Return type

Dict[str, Any]

consolidate(project, engine)[source]

Consolidate the compound identification from the experiments into a single dataset.

Parameters
Return type

DataFrame

Returns

List of consolidated peaks and pandas.DataFrame giving the results of pairwise mass spectral comparisons between the repeats for each aligned peak.

New in version 0.10.0.