setupCnvGWAS: Setup the folders and files to run CNV-GWAS analysis

Description Usage Arguments Details Value Author(s) Examples

View source: R/pheno_assoc.R

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

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
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)

CNVRanger documentation built on Dec. 12, 2020, 2 a.m.