libgunshotmatch.comparison

Comparison between projects and unknowns.

The two submodules, projects and unknowns, provide identical APIs with different internals to handle reference projects (containing two or more repeats) and unknown samples (from a single datafile).

New in version 0.8.0.

Functions:

align_projects([projects, unknowns, D, gap])

Align multiple projects and/or unknowns.

get_padded_peak_lists(alignment[, projects, …])

Pad the consolidated peak lists in each project/unknown, from the given between-project alignment.

align_projects(projects=(), unknowns=(), D=2.5, gap=0.3)[source]

Align multiple projects and/or unknowns.

Parameters
Return type

Alignment

Changed in version 0.9.0:
  • Added D and gap arguments.

  • projects and unknowns can now be a single Project.

get_padded_peak_lists(alignment, projects=(), unknowns=())[source]

Pad the consolidated peak lists in each project/unknown, from the given between-project alignment.

Parameters

Changed in version 0.9.0: projects and unknowns can now be a single Project.

Return type

Tuple[List[MutableSequence[Optional[ConsolidatedPeak]]], List[MutableSequence[Optional[ConsolidatedPeak]]]]

libgunshotmatch.comparison.projects

Comparison between projects.

Functions:

filter_alignment_to_consolidate(project)

Filter peaks from a project’s alignment to only those which survived the consolidate process.

get_padded_peak_list(project, alignment_rts)

Returns a list of consolidated peaks for the project, based on the between-project alignment.

filter_alignment_to_consolidate(project)[source]

Filter peaks from a project’s alignment to only those which survived the consolidate process.

Parameters

project (Project)

Return type

Alignment

get_padded_peak_list(project, alignment_rts)[source]

Returns a list of consolidated peaks for the project, based on the between-project alignment.

Parameters
Return type

MutableSequence[Optional[ConsolidatedPeak]]

libgunshotmatch.comparison.unknowns

Comparison between project(s) and unknowns.

Functions:

filter_alignment_to_consolidate(unknown)

Filter peaks from an unknown’s alignment to only those which survived the consolidate process.

get_padded_peak_list(unknown, alignment_rts)

Returns a list of consolidated peaks for the unknown sample, based on the between-project alignment.

filter_alignment_to_consolidate(unknown)[source]

Filter peaks from an unknown’s alignment to only those which survived the consolidate process.

Parameters

project

Return type

Alignment

get_padded_peak_list(unknown, alignment_rts)[source]

Returns a list of consolidated peaks for the unknown sample, based on the between-project alignment.

Parameters
Return type

MutableSequence[Optional[ConsolidatedPeak]]