get_cleaned: Preprocess input file.

Description Usage Arguments Value

Description

Preprocess input file.

Usage

1
get_cleaned(filename, type = c("data.frame", "csv", "txt"), na, sep)

Arguments

filename

the name of the file which the data are to be read from. Its type should be chosen in 'type' parameter. Also, it should have columns named exactly as 'metid' (IDs for peaks), 'query_m.z' (query mass of peaks), 'exact_m.z' (exact mass of putitative IDs), 'kegg_id' (IDs of putitative IDs from KEGG Database), 'pubchem_cid' (CIDs of putitative IDs from PubChem Database). Otherwise, this function would not work.

type

string indicating the type of the file. It can be a 'data.frame' which is already loaded into R, or some other types like a csv file.

na

a character vector of strings which are to be interpreted as NA values.

sep

a character value which seperates multiple IDs in kegg_id or pubchem_cid field, if there are multiple IDs.

Value

get_cleaned returns a list containing the following components:

df

a data frame which is the original input data.

clean_data

a data frame with unuseful observations and features removed.

mass

a data frame with unique query peak, along with query mass.

ID

a data frame with unique putitative IDs, along with PubChem ID, KEGG ID, exact mass.

index_na

a vector of row indexes which contains NA values.


ressomlab/MetID documentation built on May 5, 2019, 12:31 p.m.