gunshotmatch_reports.peaks¶
Peak Report Generator.
Classes:
|
Class for producing CSV peak reports. |
|
Helper class for peak metadata for insertion into a PDF or CSV report. |
|
Summary data for a |
Functions:
|
Construct a peak report for the given project and write to the chosen file. |
-
class
CSVReports(project)[source]¶ Bases:
objectClass for producing CSV peak reports.
- Parameters:
project (
Project) – A GunShotMatch project.
New in version 0.4.0.
Methods:
Produce an overview report of the peaks, giving the name, retention time and peak area of the peaks.
Produce a summary report of the peaks, giving the individual retention times and hits.
-
overview_csv()[source]¶ Produce an overview report of the peaks, giving the name, retention time and peak area of the peaks.
The output columns are as follows:
Peak No.
Name – The name of the top hit
Rt – Mean retention time
Area – Mean peak area
Area % – Mean peak area as a percentage of the largest peak
MF – Mean match factor for the top hit
Rejected – Whether the peak has been rejected (e.g. with PeakViewer)
Min Peak Area – The minimum peak area across the repeats.
Max Peak Area – The maximum peak area across the repeats.
Peak Area Range – The difference between the minimum and maximum peak areas.
Area Range Percent -ve – The difference between the minimum and mean peak areas as a percentage of the mean.
Area Range Percent +ve – The difference between the maximum and mean peak areas as a percentage of the mean.
The peaks are sorted from largest to smallest.
Changed in version 0.8.0: Added Min Peak Area, Max Peak Area, Peak Area Range, and Area Range Percent columns.
- Return type:
-
summary_csv()[source]¶ Produce a summary report of the peaks, giving the individual retention times and hits.
The table for each peak mirrors the table in the PDF peak report (
build_peak_report()). The peaks are sorted from largest to smallest.- Return type:
-
class
PeakMetadataTable(project)[source]¶ Bases:
objectHelper class for peak metadata for insertion into a PDF or CSV report.
- Parameters:
project (
Project) – A GunShotMatch project.
New in version 0.3.0.
Attributes:
Peak areas as percentage of largest peak
The total number of peaks in the project.
Maximum number of rows for the metadata table.
A GunShotMatch project.
Methods:
get_summary_for_peak(peak, peak_number)Return a formatted summary of the peak.
get_table_for_peak(peak, peak_number)Return tabulated data on the peak, with individual peak areas, retention times, and the top 5 hits.
-
area_percentages¶ Peak areas as percentage of largest peak
-
get_summary_for_peak(peak, peak_number)[source]¶ Return a formatted summary of the peak.
- Parameters:
peak (
ConsolidatedPeak)peak_number (
int) – The peak number, 1-indexed.
- Return type:
-
get_table_for_peak(peak, peak_number)[source]¶ Return tabulated data on the peak, with individual peak areas, retention times, and the top 5 hits.
-
max_peak_number¶ The total number of peaks in the project.
-
num_rows¶ Maximum number of rows for the metadata table.
-
project¶ A GunShotMatch project.
-
namedtuple
PeakSummary(peak_no, name, rt, area, area_percentage, mf, rejected)[source]¶ Bases:
NamedTupleSummary data for a
ConsolidatedPeak.Formatted for insertion into a PDF or CSV peak report.
New in version 0.3.0.
- Fields:
peak_no (
str) – Peak number, 1-indexedname (
str) – The name of the top hitrt (
str) – Mean retention timearea (
str) – Mean peak areaarea_percentage (
str) – Mean peak area as a percentage of the largest peakmf (
str) – Mean match factor for the top hitrejected (
str) – Whether the peak has been rejected (e.g. with PeakViewer)
-
__repr__()¶ Return a nicely formatted representation string