abs_initialize: Initialize absCopyNumber object from file or data.frame

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/step1_initialize.R

Description

This is the first step for user to use a flexible way for copynumber data input, absolute copy number (with purity and ploidy pair) calling. This function help user input their copy segmentation data as file or data.frame, input their SNV data as file or data.frame.

Usage

1
2
3
abs_initialize(seg, min.seg.len = NULL, snv = NULL, isMaf = FALSE,
  sample_seg = NULL, sample_snv = NULL, platform = c("WES", "WGS",
  "MicroArray"), verbose = FALSE)

Arguments

seg

The name of file or a data.frame containing the segmentation data.

min.seg.len

The minimum length of a segment to be included in computation. The default value is 200 bp for WES, 3000 bp for WGS and 0 bp for MicroArray.

snv

optinal. The name of file or a data.frame containing a set of somatic single nucleotide variants (SNVs).

isMaf

logical. Whether the specified snv argument is provide as MAF file/data.frame.

sample_seg

character, default is NULL. At default function will look for 'sample' column in data (the best way to input multiple samples) of CNV or SNV. If 'sample' column is not find and sample_seg is specified, sample_seg will be treated as column name storing sample name or sample names (character vector), otherwise data will be treated as single sample data and sample name is 'sample'.

sample_snv

same as sample_seg but for snv data.

platform

character, default is 'WES'. Must be one of 'WES', 'WGS' or 'MicroArray'.

verbose

if TRUE, print extra information.

Details

when process data with multiple samples, absCopyNumber require data.frame/file with one column for the sample variable, see sample_seg option. Support input format by absCopyNumber package please run abs_supportfiles function.

Value

a absCopyNumber object

Author(s)

Shixiang Wang <w_shixiang@163.com>

See Also

absCopyNumber, abs_prepare, , abs_calling

Examples

1
2
3
4
5
6
7
file_cn = system.file("extdata/example.cn.txt.gz", package = "absCopyNumber")
file_snv = system.file("extdata/example.snv.txt.gz", package = "absCopyNumber")


res1 =  abs_initialize(seg = file_cn, snv = file_snv, verbose = T)
res2 =  abs_initialize(seg = file_cn, snv = file_snv, sample_seg = "test1",
                       sample_snv = "test1", verbose = T)

ShixiangWang/absCopyNumber documentation built on May 28, 2019, 5:42 p.m.