makeDatabase: makeDatabase

Description Usage Arguments

Description

Takes flat text files (comma, tab, or other separated) and converts the data to a MonetDBLite database (<https://github.com/hannesmuehleisen/MonetDBLite>). Given the filepath, file type (PLINK output only, at this time), file extension/suffix and separator, the function automatically pulls chromosome number and phenotype from the file name, marks the data with that phenotype name, and sorts it into a queryable database.

Usage

1
2
3
4
makeDatabase(filesuffix, srcfilepath = getwd(), dbfilepath = getwd(),
  separator = ".", dbname = "MultiGWASdb", ignore = NULL,
  pattern = NULL, filetype = "plink", delimiter = "\t",
  overwrite = FALSE, append = TRUE)

Arguments

filesuffix

A string indicating the file extension of the data files to be sorted into the database.

srcfilepath

A string indicating the location of the data to be sorted into the database, by default the working directory. File path must be absolute, not relative! (eg no "./")

dbfilepath

A string indicating the location of the database, by default the workind directory. File path must be absolute, not relative! (eg no "./")

separator

A string indicating the separator between the phenotype and chromosome in the first part of the file name, by default ".".

dbname

A string giving the name of the folder that will contain the database, or the name of an existing folder if the data is to be appended to the database. Default "MultiGWASdb".

ignore

A vector of filenames to ignore, that will not be included in the database. You only need to list files here that ALSO have the indicated file suffix- files in the filepath without this suffix will already be ignored.

pattern

An optional string vector to search the filenames for, to subset to only a specific set of data to input (eg only certain chromosomes).

filetype

A string indicating the filetype to be input. At this time only the default "plink" is accepted.

delimiter

A string giving the delimiter in the flat text file, by default tab (\t).

overwrite

Logical, indicating whether a database with the same dbname in the same filepath should be overwritten to create a new database. Default FALSE.

append

Logical, indicating whether data should be appended to a database with the same dbname in the same filepath, if it exists. Default TRUE.


lea-urpa/MultiGWASTools documentation built on May 24, 2019, 5:01 a.m.