create_interaction_table: Create table of significant interactions

View source: R/data_refinement.R

create_interaction_tableR Documentation

Create table of significant interactions

Description

Performs the actual process of making the table.

Usage

create_interaction_table(
  data,
  taxonomy = NULL,
  threshold.type = "q",
  threshold.value = 0.05,
  removeDuplicates = TRUE,
  score_attributes = NULL
)

Arguments

data

The results from ccrepe

taxonomy

Named character, with the names being those of the OTUs and the values their taxonomy collapased into a single string (for each OTU)

threshold.type

The type of threshold to be used 'q' denotes q-value, while 'p' denotes p-value

threshold.value

The critical significance value for including an interaction

removeDuplicates

If TRUE, the function ensures that no OTU pair is listed twice in the results. Else, two interacting OTUs may show up twice in reverse order (a pair where OTU A is listed as OTU_1 and OTU B is listed was OTU_2 and vice versa for the other pair)

score_attributes

An object of class sim.measure.attributes belonging to the similarity measure being used

Value

An interaction_table, being a data.frame with the following columns (given that they are available in the input):

  • OTU_1, OTU_2 The IDs of the two interacting OTUs

  • sim.score The similarity measure score for the interaction

  • z.stat The z-value of the interaction

  • p.value The p-value of the interaction (based only on the interaction itself)

  • q.value The q-value of the interaction (corrected for multiple testing)

  • taxonomy_1, taxonomy_2 The taxonomy of the two interacting OTUs, collapsed into a single string.

In addition, the information from the given similarity scores are also provided

See Also

collapse_taxonomy sim.measure.attributes


AlmaasLab/micInt documentation built on April 1, 2022, 10:37 a.m.