Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hechth committed Nov 18, 2024
1 parent a5a0266 commit 7077637
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions R/advanced_annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,18 @@ advanced_annotation <- function(peak_table,
adduct_table = adduct_table,
mass_tolerance = mass_tolerance
)

# this filter is already done in simple_annotation - maybe it can be removed here?
annotation <- filter(annotation, forms_valid_adduct_pair(.data$molecular_formula, .data$adduct))

# ---------------------------

# Tool 2: Compute mass defect
# ----------------------------
annotation <- compute_mass_defect(annotation, precision = mass_defect_precision)
# ----------------------------


# Tool 3: Compute correlations
# Tool 3: Compute correlations (peak intensity matrix will be the input, so doesn't need to be cut)
# ----------------------------
peak_intensity_matrix <- get_peak_intensity_matrix(peak_table)
peak_correlation_matrix <- compute_peak_correlations(peak_intensity_matrix, correlation_method = "p")
Expand Down Expand Up @@ -199,7 +202,7 @@ advanced_annotation <- function(peak_table,
# ----------------------------


# Tool 9: database matching
# Tool 9: pathway matching
# ----------------------------
data(hmdbCompMZ)
chemCompMZ <- dplyr::rename(hmdbCompMZ, chemical_ID = HMDBID)
Expand All @@ -214,7 +217,7 @@ advanced_annotation <- function(peak_table,
)
# ----------------------------

# Tool 10: ???
# Tool 10: compute confidence levels
# ----------------------------
annotation <- multilevelannotationstep4(
outloc = outloc,
Expand Down

0 comments on commit 7077637

Please sign in to comment.