get_cleaned: Clean input file so that can be used in functions in the...

Description Usage Arguments Value

Description

Clean input file so that can be used in functions in the package.

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 'extension' parameter. Also, it should have columns named exactly '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 specified 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.


xw187/MetID documentation built on May 5, 2019, 9:21 a.m.