Title: | SIFT-MS and CPET Data Processor |
---|---|
Description: | Processor for selected ion flow tube mass spectrometer (SIFT-MS) output file from breath analysis. It allows the filtering of the SIFT output file (i.e., variation over time of the target analyte concentration) and the following analysis for the determination of: maximum, average, and standard deviation value of target concentration measured at each exhalation, and the respiratory rate over the measurement. Additionally, it is possible to align the SIFT-MS data with other on-line techniques such as cardio pulmonary exercise test (CPET) for a comprehensive characterization of breath samples. |
Authors: | Federico Vivaldi; Tommaso Lomonaco |
Maintainer: | Federico Vivaldi <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-03-12 03:13:04 UTC |
Source: | https://github.com/cran/SIPETool |
Raw and filtered output from SIFT-MS, and CPET system. Four different files are available: raw_sift -> raw data from SIFT-MS CPET_time -> data from CPET system for time allignment SIFT_time -> filtered data from SIFT-MS for time allignment SIFT_filtered -> raw data from SIFT-MS filtered using SIFT_output_filter
This function takes as input a vector and return the data index according to the selected time frame
data_indexer(dat, time_frame_index = NA)
data_indexer(dat, time_frame_index = NA)
dat |
input vector |
time_frame_index |
custom data range from the time column |
a vector indexed according to the specified time frame
data_indexer(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
data_indexer(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
This function takes as input a vector and returns it normalized between a specified range
normalizer(dat, norm_range = c(0, 1))
normalizer(dat, norm_range = c(0, 1))
dat |
the vector to normalize |
norm_range |
the range used for normalization |
vector normalized between norm_range
normalizer(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
normalizer(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
Raw and filtered output from SIFT-MS, and CPET system. Four different files are available: raw_SIFT -> raw data from SIFT-MS CPET_time -> data from CPET system for time allignment SIFT_time -> filtered data from SIFT-MS for time allignment SIFT_filtered -> raw data from SIFT-MS filtered using SIFT_output_filter
Raw and filtered output from SIFT-MS, and CPET system. Four different files are available: raw_sift -> raw data from SIFT-MS CPET_time -> data from CPET system for time allignment SIFT_time -> filtered data from SIFT-MS for time allignment SIFT_filtered -> raw data from SIFT-MS filtered using SIFT_output_filter
This function takes as input the output file generated by the SIFT-MS and returns a .csv containing the TIME and the concentrations data selected by the user
SIFT_output_filter( setdir = getwd(), input_name = file.choose(), output_name, n_parameters = 2, param_names = c("Isoprene", "Acetone"), out_file = TRUE )
SIFT_output_filter( setdir = getwd(), input_name = file.choose(), output_name, n_parameters = 2, param_names = c("Isoprene", "Acetone"), out_file = TRUE )
setdir |
allow the selection of the working directory |
input_name |
allow the selection of the input file |
output_name |
name of the .csv output file |
n_parameters |
number of analytes |
param_names |
vector with name of the analytes |
out_file |
flag for the export of a csv file |
Filtered data and optional csv from SIFT input
data(raw_SIFT) SIFT_output_filter(input_name = raw_SIFT, output_name = "testfile", out_file = FALSE)
data(raw_SIFT) SIFT_output_filter(input_name = raw_SIFT, output_name = "testfile", out_file = FALSE)
Raw and filtered output from SIFT-MS, and CPET system. Four different files are available: raw_sift -> raw data from SIFT-MS CPET_time -> data from CPET system for time allignment SIFT_time -> filtered data from SIFT-MS for time allignment SIFT_filtered -> raw data from SIFT-MS filtered using SIFT_output_filter
This function takes as input a vector and returns the sign of each element
sign_detect(dat)
sign_detect(dat)
dat |
the vector to be used |
vector with the signs of each element of the original matrix
sign_detect(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
sign_detect(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
This function takes as input a csv file containing a time column and data columns and returns the position of the end tidals for each data column maximazing the syncronization between data. This function was originally devised for the analysis of the end tidals coming from exhaled breath analyzed through SIFT-MS technology
tidal_analyzer( setdir = getwd(), input_name = file.choose(), output_name, starting_threshold = 0.03, time_frame = NA, out_file = TRUE )
tidal_analyzer( setdir = getwd(), input_name = file.choose(), output_name, starting_threshold = 0.03, time_frame = NA, out_file = TRUE )
setdir |
working directory |
input_name |
csv file |
output_name |
name of the output file |
starting_threshold |
initial value for the dynamic threshold |
time_frame |
custom data range from the time column |
out_file |
flag for the export of a csv file |
csv containing the end tidals, their maximum, average, frequency, and timing
data(SIFT_filtered) tidal_analyzer(input_name = head(SIFT_filtered, n = 100), output_name = "out", out_file = FALSE)
data(SIFT_filtered) tidal_analyzer(input_name = head(SIFT_filtered, n = 100), output_name = "out", out_file = FALSE)
This function takes as input a matrix and returns for each column the end tidals depending of the threshold set. It is possible to set a custom time frame for the search of the tidals. Note: a minimum amount of 45 points are necessary.
tidal_finder( dat, height_threshold = 0.2, refine = FALSE, time_frame_index = NA )
tidal_finder( dat, height_threshold = 0.2, refine = FALSE, time_frame_index = NA )
dat |
the input matrix |
height_threshold |
the minimum height of the tidal |
refine |
refine the dataset |
time_frame_index |
custom time frame |
matrix with the tidals for each column
tidal_finder(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
tidal_finder(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
This function takes as input two data set containing a time vector and a data vector and return the two data sets aligned. This is done by reducing the dimensions of the data set with higher points. The first data set is the one coming from the CPET-ESE and the second one from the SIFT-MS
time_filter(Cy = file.choose(), sift = file.choose())
time_filter(Cy = file.choose(), sift = file.choose())
Cy |
CPET-ESE output file |
sift |
SIFT-MS refined file |
A plot and the SIFT-MS data file resized for the alignment with the CPET-ESE file
data(SIFT_time) data(CPET_time) time_filter(CPET_time, SIFT_time)
data(SIFT_time) data(CPET_time) time_filter(CPET_time, SIFT_time)
This function takes as input a vector and returns the trend of each column expressed as the difference between two consecutive elements
trend(dat)
trend(dat)
dat |
the vector to analyze |
vector containing the trend of the each column
trend(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))
trend(c(1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1,1:10,10:1))