Package 'MScombine'

Title: Combine Data from Positive and Negative Ionization Mode Finding Common Entities
Description: Find common entities detected in both positive and negative ionization mode, delete this entity in the less sensible mode and combine both matrices.
Authors: Monica Calderon-Santiago
Maintainer: Monica Calderon-Santiago <[email protected]>
License: GPL-2
Version: 1.4
Built: 2025-03-12 02:58:05 UTC
Source: https://github.com/cran/MScombine

Help Index


Combine positive and negative matrices

Description

Take positive and negative matrices and combine them by deleting redundat entities.

Usage

CombinePolarities(POSITIVE, NEGATIVE, CommonEntitiesFiltered)

Arguments

POSITIVE

A matrix with positive entities information (Compound Name, Mass, RT, and multiple columns with the area of the compound in samples)

NEGATIVE

A matrix with positive entities information (Compound Name, Mass, RT, and multiple columns with the area of the compound in samples)

CommonEntitiesFiltered

The data set generated with the FilterbyRT function.

Examples

## Not run: 
CombinePolarities(POSITIVE,NEGATIVE,CommonEntitiesFiltered)

## End(Not run)

Filter by RT residuals

Description

Remove those entities with residuals above and below a maximum and minimum specified value.

Usage

FilterbyRT(CommonEntitiesImproved, MaxResidual, MinResidual)

Arguments

CommonEntitiesImproved

Data set resulted from the RemoveMismatch function

MaxResidual

Maximum residual allowed for RT+ vs RT- association

MinResidual

Minimum residual allowed for RT+ vs RT- association

Value

Plot filtered (RT+ vs RT-, regression, "residuals vs predicted", and Q-Q plot)

New CommonEntities table filtered, obtained after removing entities with very high or low residuals or RT+ vs RT-.

Examples

## Not run: 
CommonEntitiesFiltered<-FilterbyRT(CommonEntitiesImproved,MaxResidual=0.5,MinResidual=(-0.5))

## End(Not run)

Find entities presented in both polarities

Description

Takes matrices from positive and negative ionization mode and find entities in common.

Usage

FindCommon(POSITIVE, NEGATIVE, ADDUCTS, Masstolerance, RTtolerance)

Arguments

POSITIVE

A matrix with positive entities information (Compound Name, Mass, RT, and multiple columns with the area of the compound in samples).

NEGATIVE

A matrix with positive entities information (Compound Name, Mass, RT, and multiple columns with the area of the compound in samples).

ADDUCTS

A matrix with positive adducts, negative adducts and their difference in mass.

Masstolerance

The tolerance in Da when considering the adducts that can be present in both matrices.

RTtolerance

The tolerance of retention time when comparing both polarities. It should be in the same units as the RT in POSITIVE and NEGATIVE matrices.

Examples

## Not run: 
CommonEntities<-FindCommon(POSITIVE,NEGATIVE,ADDUCTS,Masstolerance=0.02,RTtorelance=0.5)

## End(Not run)

Remove mismatched entities

Description

Remove those entities that have been associated to more than one adduct, retaining only the most probable.

Usage

RemoveMismatch(CommonEntities)

Arguments

CommonEntities

(Matrix generated from the FindCommon function).

Value

CommonEntitiesImproved The matrix without mismatched entities.

Examples

## Not run: 
CommonEntitiesImproved<-RemoveMismatch(CommonEntities)

## End(Not run)

Study RT differences to lately remove outliers

Description

Study the correlation between RT in positive and negative ionization modes to find those entities that have been associated wrongly.

Usage

StudyRTdiff(CommonEntitiesImproved)

Arguments

CommonEntitiesImproved

The resultant data set from the function RemoveMismatch

Value

Plot (RT+ vs RT-, regression, "residuals vs predicted", and Q-Q plot)

The CommonEntitiesImproved dataset now included a new column with residuals of each entity for the RT+ vs RT- regression.

Examples

## Not run: 
CommonEntitiesImproved<-StudyRTdiff(CommonEntitiesImproved)

## End(Not run)