#### Molecular networking ####
# same parameter sets as when we generate the spectral set:
params.search = list(mz_search = 0.01, ppm_search = 10, rt_search = 0, rt_gap = 0)
params.ms.preprocessing = list(normalized = TRUE, baseline = 25000, relative = 0, max_peaks = 200, recalibration = 0)
params.consensus = list(consensus = TRUE, consensus_method = "consensus", consensus_window = 0.01)
# Add network parameters: similarity metrics, minumum fragment matches and similarities
# Add network filters: topK, max_comp_size
# Add network edge annotation parameters: reaction_type (annotating chemical reaction based on mass difference) and use_reaction
params.network = list(network = TRUE, similarity_method = "F1", min_frag_match = 10, min_score = 0.2,
topK = 5, max_comp_size = 0, reaction_type = "Chemical", use_reaction = F)
library1_network = library_generator(input_library = library1_annotated, lcms_files = NULL,
metadata_file = NULL, polarity = "Positive", mslevel = 2,
add.adduct = FALSE,
processing.algorithm = "Default",
params.search = params.search,
params.ms.preprocessing = params.ms.preprocessing,
params.consensus = params.consensus,
params.network = params.network)
Generating molecular network...
Error in if (y > 100) { : the condition has length > 1
All other modules work well until now and I get the same result as in the demo. As I am not yet familiar with all parameters, any idea what problem this could be?
The follow-up question would be also how to visualize the generated network.
Hi!
I am trying to reproduce the demo data (Terfenadine forced degradation data processing), and I am stuck on the molecular networking step. Here is the code (basically identical to demo):
And here is an error that I cannot figure out:
All other modules work well until now and I get the same result as in the demo. As I am not yet familiar with all parameters, any idea what problem this could be?
The follow-up question would be also how to visualize the generated network.