Acquire Data from Water’s .rpt File#

The .rpt file provided by Waters instrument is a text file containing the output from each detector (UV, ELSD, ES+ and ES-), described as “functions” sequentially. The functions are described for each well in turn.

The following script extracts the data relevant to PyParse, and reformats it into a common structure. It finds the appropriate sections of text by looking for keywords that describe the start of a particular section.

getWatersData.getChromatogram(spectrum)[source]#

Takes the region of text in rpt file corresponding to the chromatogram, and extracts the data into two lists, corresponding to x-values and y-values.

Parameters:

spectrum – Section of rpt file as string

Returns:

A list of 2 lists, [x-values, y-values]

getWatersData.getData(filename)[source]#

Converts the input .rpt file into a dictionary where each index corresponds to a well. Each dictionary value contains a list of peaks, where each peak is represented as a dictionary with the peak area, m/z and UV (if available) data present.

Parameters:

filename – Address of the input file

Returns:

List comprising: a dictionary of all peaks in all wells; a dictionary containing each chromatogram; a dictionary of the sample IDs for each well; a dictionary of the total_abs_area of each well. Each of these dictionaries are indexed by well.

getWatersData.getMSData(spectrum)[source]#

Takes the specific region of the rpt file pertaining to m/z data for a specific peak in a specific well, and returns a 2-D list containing all m/z peaks and their normalised intensity.

Parameters:

spectrum – Section of rpt file as string

Returns:

2-D list in following format: [m/z value, normalised intensity of that value]

getWatersData.getUVData(spectrum)[source]#

Takes the specific region of the rpt file pertaining to UV absorbance spectrum data for a specific peak in a specific well, and returns a list containing all the maxima of that spectrum. The height of the maxima must be greater than the min_uv_threshold specified in options.

Parameters:

spectrum – Section of rpt file as string

Returns:

UV maxima as a list