Skip to contents

Using your community_object, we are able to convert it into a community matrix for easier usability of the object.

Usage

create_community_matrix(cluster_object)

Arguments

cluster_object

the result of the cluster_data() function. data <- import_all_data(peak_table = mums2::mums2_example("botryllus_pt_small.csv"), metadata = mums2::mums2_example("boryillus_metadata.csv"), format = "None")

matched_data <- ms2_ms1_compare(mums2_example("botryllus_v2.gnps.mgf"), data, 1, 6)

dist <- dist_ms2(data = matched_data, cutoff = 0.3, precursor_thresh = 2, score_params = modified_cosine_params(0.5), min_peaks = 0)

cluster_results <- cluster_data(distance_df = dist, ms2_match_data = matched_data, cutoff = 0.3, cluster_method = "opticlust")

community_matrix <- create_community_matrix_object(cluster_results)

Value

a data.frame object of your community_object.