gunshotmatch_reports.alignment

CSV reports of alignment between reference projects and unknown samples.

New in version 0.5.0.

Classes:

CSVRow([peak_no, name, rt, area, …])

Represents data for a peak in a CSV report.

Functions:

csv_two_projects(p1, padded_p1_cp, p2, …)

Returns CSV report for the alignment between the given projects.

csv_two_projects_and_unknown(p1, …[, …])

Returns CSV report for the alignment between the given projects and unknown.

get_csv_data(project, cp, max_area)

Return data for the CSV report for given peak in the given project.

namedtuple CSVRow(peak_no='', name='', rt='', area='', area_percentage='', match_factor='')[source]

Bases: NamedTuple

Represents data for a peak in a CSV report.

Fields
  1.  peak_no (str) – Alias for field number 0

  2.  name (str) – Alias for field number 1

  3.  rt (str) – Alias for field number 2

  4.  area (str) – Alias for field number 3

  5.  area_percentage (str) – Alias for field number 4

  6.  match_factor (str) – Alias for field number 5

__repr__()

Return a nicely formatted representation string

classmethod header()[source]

Returns the CSV column headers.

Return type

Tuple[str, str, str, str, str, str]

csv_two_projects(p1, padded_p1_cp, p2, padded_p2_cp)[source]

Returns CSV report for the alignment between the given projects.

Parameters
Return type

str

csv_two_projects_and_unknown(p1, padded_p1_cp, p2, padded_p2_cp, u, padded_u_cp, *, pair_only=False)[source]

Returns CSV report for the alignment between the given projects and unknown.

Parameters
Return type

str

get_csv_data(project, cp, max_area)[source]

Return data for the CSV report for given peak in the given project.

Parameters
Return type

CSVRow