Skip to content

Commit

Permalink
merged master and fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hechth committed Dec 21, 2023
1 parent 425c281 commit b2ac5a6
Show file tree
Hide file tree
Showing 47 changed files with 649 additions and 202 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Suggests: knitr,
rmarkdown,
datacomparer (>= 0.1.4),
patrick (>= 0.2.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
15 changes: 15 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,19 @@ export(RecalList)
export(SNplot)
export(Valence)
export(ValidFormula)
export(bind_and_filter_data)
export(calculate_variables)
export(compare_bad_and_filter)
export(compute_pairs)
export(create_data_chunks)
export(create_pairs)
export(extract_mono_and_iso_pairs)
export(filter_and_arrange_data)
export(filter_pairs)
export(merge_and_filter_abundances)
export(merge_and_filter_pairs)
export(processMassList)
export(process_carbon_isotoping)
export(process_sulfur)
export(sulfur_check)
import(ggplot2)
2 changes: 0 additions & 2 deletions R/IsoFiltR.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ combine_isotopes <- function(Isotopes) {
#' @return list(Monolist, Isolist):
#' Monolist - monoistopic and non-matched masses,
#' Isolist - isotopic masses
#' @examples
#' IsoFiltR(peaks = df)
#' @export
IsoFiltR <- function(
peaks,
Expand Down
30 changes: 15 additions & 15 deletions R/MFAssign.R
Original file line number Diff line number Diff line change
Expand Up @@ -504,19 +504,19 @@ records <- vector("list")
}

loop[CompFactorToInt2("Br")] <- unlist(loop[CompFactorToInt2("Br")]) + 1
if (loop[CompFactorToInt2("Br")] > HighMoles2("Br",Br=Brx)) {
if (loop[CompFactorToInt2("Br")] > HighMoles("Br",Br=Brx)) {
break
}
}

loop[CompFactorToInt2("Br81")] <- unlist(loop[CompFactorToInt2("Br81")]) + 1
if (loop[CompFactorToInt2("Br81")] > HighMoles2("Br81",Br81=Br81x)) {
if (loop[CompFactorToInt2("Br81")] > HighMoles("Br81",Br81=Br81x)) {
break
}
}

loop[CompFactorToInt2("I")] <- unlist(loop[CompFactorToInt2("I")]) + 1
if (loop[CompFactorToInt2("I")] > HighMoles2("I",I=Ix)) {
if (loop[CompFactorToInt2("I")] > HighMoles("I",I=Ix)) {
break
}
}
Expand Down Expand Up @@ -635,15 +635,15 @@ records <- vector("list")
max_H = C * 2 + 2, H_test = round(H / max_H, 1),

Senior2 = Pval + Nval + N15val + Valence("H") +
Valence("Cl") + Valence("Cl37")+Valence("Fl") + Valence2("Br") + Valence2("Br81") +
Valence2("I"),
Valence("Cl") + Valence("Cl37")+Valence("Fl") + Valence("Br") + Valence("Br81") +
Valence("I"),

Senior3Atom = C + H + O + N + S + P + N15 + Cl + Cl37 + S34 + Br + Br81 + I,

Senior3Val = C*Valence("C") + H*Valence("H") + O*Valence("O") + N*Nval +
S*Sval + P*Pval + S34*S34val + Fl*Valence("Fl")+
N15*N15val + Cl*Valence("Cl") + Cl37*Valence("Cl37") + Br *Valence2("Br")+
Br81 *Valence2("Br81") + I * Valence2("I")
N15*N15val + Cl*Valence("Cl") + Cl37*Valence("Cl37") + Br *Valence("Br")+
Br81 *Valence("Br81") + I * Valence("I")

)

Expand Down Expand Up @@ -1122,15 +1122,15 @@ records <- vector("list")
max_H = C * 2 + 2, H_test = round(H / max_H,1),

Senior2 = Pval + Nval + N15val + Valence("H") +
Valence("Cl") + Valence("Cl37")+Valence("Fl") + Valence2("Br") + Valence2("Br81") +
Valence2("I"),
Valence("Cl") + Valence("Cl37")+Valence("Fl") + Valence("Br") + Valence("Br81") +
Valence("I"),

Senior3Atom = C + H + O + N + S + P + N15 + Cl + Cl37 + S34 + Br + Br81 + I,

Senior3Val = C*Valence("C") + H*Valence("H") + O*Valence("O") + N*Nval +
S*Sval + P*Pval + S34*S34val + Fl*Valence("Fl")+
N15*N15val + Cl*Valence("Cl") + Cl37*Valence("Cl37") + Br * Valence2("Br") +
Br81 * Valence2("Br81") + I * Valence2("I")
N15*N15val + Cl*Valence("Cl") + Cl37*Valence("Cl37") + Br * Valence("Br") +
Br81 * Valence("Br81") + I * Valence("I")
)

records1$NM <- ifelse(abs(floor(records1$Exp_mass)-records1$Exp_mass) >= min_def & abs(floor(records1$Exp_mass)-records1$Exp_mass) <= max_def,
Expand Down Expand Up @@ -1870,15 +1870,15 @@ records <- vector("list")
max_H = C * 2 + 2, H_test = round(H / max_H,1),

Senior2 = Pval + Nval + N15val + Valence("H") +
Valence("Cl") + Valence("Cl37")+Valence("Fl") + Valence2("Br") + Valence2("Br81") +
Valence2("I"),
Valence("Cl") + Valence("Cl37")+Valence("Fl") + Valence("Br") + Valence("Br81") +
Valence("I"),

Senior3Atom = C + H + O + N + S + P + N15 + Cl + Cl37 + S34,

Senior3Val = C*Valence("C") + H*Valence("H") + O*Valence("O") + N*Nval +
S*Sval + P*Pval + S34*S34val + Fl*Valence("Fl")+
N15*N15val + Cl*Valence("Cl") + Cl37*Valence("Cl37") + Br * Valence2("Br") +
Br81 * Valence2("Br81") + I * Valence2("I")
N15*N15val + Cl*Valence("Cl") + Cl37*Valence("Cl37") + Br * Valence("Br") +
Br81 * Valence("Br81") + I * Valence("I")
)


Expand Down
2 changes: 0 additions & 2 deletions R/MFAssignCHO.R
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,6 @@ MFAssignCHO <- function(peaks, isopeaks = "none", ionMode, lowMW=100,highMW=1000

loop[CompFactorToInt("M")] <- 0 #LowMoles("M")
repeat {


loop[CompFactorToInt("E")] <- 0 #LowMoles("E")
repeat {

Expand Down
2 changes: 1 addition & 1 deletion R/RecalFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ plot_spectrum <- function(plotpeak, RecalPlot) {
#' @examples
#' data <- data.frame(Exp_mass = c(100, 150, 200))
#' processed_data <- processMassList(data)
#'
#' @export
processMassList <- function(data) {
data$NM <- round(data$Exp_mass)

Expand Down
5 changes: 0 additions & 5 deletions R/Utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,6 @@ Even <- function(x) {
#'
#' @return boolean
#'
#' @examples
#' ValidFormula(moles)
#'
#' ValidFormula(c(2, 3, 1, 0, 0, 0, 0, 0, 1))
#'
#' @export
#'
ValidFormula <- function(moles) {
Expand Down
19 changes: 19 additions & 0 deletions man/AddCalculatedSummary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions man/CompFactorToInt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions man/CompFactorToInt2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions man/CompIntToFactor.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion man/CompIntToFactor2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions man/EM.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion man/EM2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions man/Even.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions man/FilterAndMerge.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/FindCoreFormulae2_Halo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions man/HighMoles.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 0 additions & 42 deletions man/HighMoles2.Rd

This file was deleted.

6 changes: 6 additions & 0 deletions man/LowMoles.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b2ac5a6

Please sign in to comment.