get {ramwas} | R Documentation

## Functions for Access to Data, MWAS Results, and Location Information

### Description

Functions for access to data, MWAS results, and location information.

Function `getLocations` obtains the location information for all variables (CpGs).

Function `getMWASandLocations` obtains both MWAS results and location information in a single data frame.

Functions `getDataByLocation` and `getMWASrange` return the data (coverage) and MWAS results for the selected set of variables (CpGs).

### Usage

    getLocations(x)
    getMWAS(x)
    getMWASandLocations(x)
    getMWASrange(x, chr, start, end)
    getDataByLocation(x, chr, start, end)

### Arguments

`x` | Name of directory or list of RaMWAS parameters as described in the "RW6_param.Rmd" vignette. Try: `vignette("RW6_param","ramwas")`. If a directory name is provided, it must point to Data (coverage) directory (parameter `dircoveragenorm`) for `getDataByLocation` and `getLocations` MWAS directory (parameter `dirmwas`) for `getMWAS`, `getMWASandLocations`, and `getMWASrange`
`chr` | Chromosome name or number.
`start` | Start position of the genomic region of interest.
`end` | End position of the genomic region of interest.

### Details

The functions return the MWAS results and/or locations.

### Value

Function `getLocations` returns a data frame with

`chr` | Chromosome
`start` | Start position
`end` | End position

Function `getMWAS` returns a data frame with

`cor` | coverage - phenotype correlation
`t.test` | t-statistic
`p.value` | p-value
`q.value` | q-value (FDR)

If the outcome variable was categorical, columns `cor` and `t.test` are replaced with `R.squared` and `F-test`.

Functions `getMWASandLocations` and `getMWASrange` return a data frame with elements of output of both `getLocations` and `getMWAS`

Function `getDataByLocation` returns a list with

`locations` | Chromosomal location information for located variables
`matrix` | Data (coverage) matrix for the selected locations

### Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

### See Also

See vignettes: `browseVignettes("ramwas")`.

### Examples

    ## Not run:
    # Extract locations using parameter vector
    getLocations(param)

    # Extract locations using directory name
    getLocations("/data/myMWAS")

    # Extract MWAS using parameter vector
    getMWAS(param)

    # Extract MWAS using directory name
    getMWAS("/data/myMWAS")

    # Extract MWAS using parameter vector
    getMWASandLocations(param)

    # Extract MWAS using directory name
    getMWASandLocations("/data/myMWAS")

    # Extract MWAS for a region
    getMWASrange(param, 1, 123321, 223321)

    # Chromosome can be character
    getMWASrange(param, "chr1", 123321, 223321)

    # Extract data for a region
    getDataByLocation(param, 1, 123321, 223321)

    # Chromosome can be character
    getDataByLocation(param, "chr1", 123321, 223321)

    ## End(Not run)

[Package ramwas version 1.10.5 Index]