output_ccrepe_data: output_ccrepe_data

View source: R/data_refinement.R

output_ccrepe_dataR Documentation

output_ccrepe_data

Description

Takes input from ccrepe and transforms it into a convenient table

Usage

output_ccrepe_data(
  data,
  taxonomy = NULL,
  threshold.type = "q",
  threshold.value = 0.05,
  output.file = FALSE,
  filename = NULL,
  return.value = TRUE,
  csv_option = "2",
  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

output.file

Should the function write the date to a csv-file?

filename

What is the name of the output file (including path). Ignored if output.file is TRUE

return.value

Should the function return the interaction table as a return value?

csv_option

If assigned the value '2', the function will use the write.csv2 function which print the numbers if comma as decimal delimer and semicolon as the delimer between numbers. Else, the decimal delimer is point and comma the delimer between numbers.

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

Examples

library(micInt)
sim.scores <- similarity_measures(subset= c("spearman","pearson"))
res <- runAnalysis(OTU_table = seawater,
sim.scores = sim.scores,returnVariable = 'ccrepe_res',
iterations = 100,parallel = FALSE)
output_ccrepe_data(res$ccrepe_res$spearman$res)



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