-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
139 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
utils::globalVariables( | ||
c( | ||
"params" | ||
) | ||
) | ||
|
||
#' @title Create edges | ||
#' | ||
#' @description This function applies similarity calculation to a list of | ||
#' spectra to create edges | ||
#' | ||
#' @include calculate_entropy.R | ||
#' | ||
#' @param index Indices | ||
#' @param frags Fragments | ||
#' @param precs Precursors | ||
#' @param nspecs Number of spectra | ||
#' @param ms2_tolerance MS2 tolerance | ||
#' @param ppm_tolerance ppm tolerance | ||
#' @param threshold Threshold | ||
#' | ||
#' @return NULL | ||
#' | ||
#' @export | ||
#' | ||
#' @examples NULL | ||
create_edges <- function(index, | ||
frags, | ||
precs, | ||
nspecs, | ||
ms2_tolerance, | ||
ppm_tolerance, | ||
threshold) { | ||
# Calculate the similarity using lapply | ||
inner_list <- lapply(X = (index + 1):nspecs, FUN = function(target) { | ||
calculate_entropy( | ||
index, | ||
target, | ||
frags, | ||
ms2_tolerance, | ||
ppm_tolerance, | ||
threshold | ||
) | ||
}) |> | ||
dplyr::bind_rows() | ||
|
||
return(inner_list) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.