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 |
Take positive and negative matrices and combine them by deleting redundat entities.
CombinePolarities(POSITIVE, NEGATIVE, CommonEntitiesFiltered)
CombinePolarities(POSITIVE, NEGATIVE, CommonEntitiesFiltered)
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. |
## Not run: CombinePolarities(POSITIVE,NEGATIVE,CommonEntitiesFiltered) ## End(Not run)
## Not run: CombinePolarities(POSITIVE,NEGATIVE,CommonEntitiesFiltered) ## End(Not run)
Remove those entities with residuals above and below a maximum and minimum specified value.
FilterbyRT(CommonEntitiesImproved, MaxResidual, MinResidual)
FilterbyRT(CommonEntitiesImproved, MaxResidual, MinResidual)
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 |
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-.
## Not run: CommonEntitiesFiltered<-FilterbyRT(CommonEntitiesImproved,MaxResidual=0.5,MinResidual=(-0.5)) ## End(Not run)
## Not run: CommonEntitiesFiltered<-FilterbyRT(CommonEntitiesImproved,MaxResidual=0.5,MinResidual=(-0.5)) ## End(Not run)
Takes matrices from positive and negative ionization mode and find entities in common.
FindCommon(POSITIVE, NEGATIVE, ADDUCTS, Masstolerance, RTtolerance)
FindCommon(POSITIVE, NEGATIVE, ADDUCTS, Masstolerance, RTtolerance)
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. |
## Not run: CommonEntities<-FindCommon(POSITIVE,NEGATIVE,ADDUCTS,Masstolerance=0.02,RTtorelance=0.5) ## End(Not run)
## Not run: CommonEntities<-FindCommon(POSITIVE,NEGATIVE,ADDUCTS,Masstolerance=0.02,RTtorelance=0.5) ## End(Not run)
Remove those entities that have been associated to more than one adduct, retaining only the most probable.
RemoveMismatch(CommonEntities)
RemoveMismatch(CommonEntities)
CommonEntities |
(Matrix generated from the FindCommon function). |
CommonEntitiesImproved The matrix without mismatched entities.
## Not run: CommonEntitiesImproved<-RemoveMismatch(CommonEntities) ## End(Not run)
## Not run: CommonEntitiesImproved<-RemoveMismatch(CommonEntities) ## End(Not run)
Study the correlation between RT in positive and negative ionization modes to find those entities that have been associated wrongly.
StudyRTdiff(CommonEntitiesImproved)
StudyRTdiff(CommonEntitiesImproved)
CommonEntitiesImproved |
The resultant data set from the function RemoveMismatch |
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.
## Not run: CommonEntitiesImproved<-StudyRTdiff(CommonEntitiesImproved) ## End(Not run)
## Not run: CommonEntitiesImproved<-StudyRTdiff(CommonEntitiesImproved) ## End(Not run)