import_emf_classifications: Import EMF Classifications

View source: R/reading_classifications.R

import_emf_classificationsR Documentation

Import EMF Classifications

Description

Allows the reading in of EMF classification results from a JSON file.

Usage

import_emf_classifications(
  classification_file,
  remove_categories = list(Sphingolipids = c("neutral glycosphingolipids",
    "acidic glycosphingolipids")),
  fix_json = FALSE
)

Arguments

classification_file

the file to read from

remove_categories

a named list of categories and classes to remove (see Details)

fix_json

properly format the JSON so the JSON parser can read it?

Details

'remove_categories' is used to define which categories and sub-classes of lipids to remove. The default is a list for two classes in *Sphingolipids* that are known to be over assigned, *neutral glycosphingolipics* and *acidic glycosphingolipids*. The top name of the list defines the *Category* level, and then the text entries underneath define the *Classes* to remove. See examples for different ways to define this list that should do different things.

Value

data.frame

Examples

## don't run these
## Not run: 

  # turn off filtering behavior
  import_emf_classifications("categories.json", remove_categories = NULL)

  # filter ALL Sphingolipids
  import_emf_classifications("categories.json", remove_categories = list(
    Sphingolipids = NULL))

  # filter Ceramides
  import_emf_classifications("categories.json", remove_categories = list(Sphingolipids = "ceramides"))

## End(Not run)


rmflight/metabolomicsUtilities documentation built on Oct. 28, 2023, 6:41 p.m.