setupCnvGWAS {CNVRanger} | R Documentation

## Setup the folders and files to run CNV-GWAS analysis

### Description

This function creates the (i) necessary folders in disk to perform downstream analysis on CNV genome-wide association and (ii) import the necessary input files (i.e. phenotypes, probe map and CNV list) from other locations in disk.

### Usage

    setupCnvGWAS(
      name,
      phen.loc,
      cnv.out.loc,
      map.loc = NULL,
      folder = NULL,
      pops.names = NULL,
      n.cor = 1
    )

### Arguments

`name` | String with a project code or name (e.g. 'Project1')
`phen.loc` | Path/paths to the tab separated text file containing phenotype and sample info. When using more than one population, for populations without phenotypes include the string 'INEXISTENT' instead the path for a file.
`cnv.out.loc` | Path(s) to the CNV analysis output (i.e. PennCNV output, SNP-chip general format or sequencing general format). It is also possible to use a `RaggedExperiment` or a `GRangesList` object instead if the run includes only one population.
`map.loc` | Path to the probe map (e.g. used in PennCNV analysis). Column names containing probe name, chromosome and coordinate must be named as: Name, Chr and Position. Tab delimited. If NULL, artificial probes will be generated based on the CNV breakpoints.
`folder` | Choose manually the project folder (i.e. path as the root folder). Otherwise, user-specific data dir will be used automatically.
`pops.names` | Indicate the name of the populations, if using more than one.
`n.cor` | Number of cores

### Details

The user can import several phenotypes at once. All information will be stored in the list returned by this function. The user should be aware although several phenotypes can be imported, the `cnvGWAS` or `generateGDS` functions will handle only one phenotype per run.

### Value

List ‘phen.info’ with ‘samplesPhen’, ‘phenotypes’, ‘phenotypesdf’, ‘phenotypesSam’, ‘FamID’, ‘SexIds’, ‘pops.names’ (if more than one population) and ‘all.paths’

### Author(s)

Vinicius Henrique da Silva <vinicius.dasilva@wur.nl>

### Examples

    data.dir <- system.file("extdata", package="CNVRanger")

    phen.loc <- file.path(data.dir, "Pheno.txt")
    cnv.out.loc <- file.path(data.dir, "CNVOut.txt")
    map.loc <- file.path(data.dir, "MapPenn.txt")

    phen.info <- setupCnvGWAS('Example', phen.loc, cnv.out.loc, map.loc)

[Package CNVRanger version 1.4.3 Index]