Last data update: 2014.03.03

R: Import the copy number data
importCNDataR Documentation

Import the copy number data

Description

Function to import the raw copy number data from a tab delimited file.

Usage

  importCNData(path, NRowSkip, ifLogRatio=1)

Arguments

path

path of the tab delimited file containing the copy number data. The file must contain a table, where in the first column there are the names of the probes (snpName), in the second one, the chromosome to which each probe belongs (the possible values of the chromosomes are: the integers from 1 to 22, 'X' and 'Y'), in the third one, the phisical positions of the probes and in the forth one, the copy number data.

NRowSkip

number of row to skip in the file, before the table. The names of the columns are to be skipped.

ifLogRatio

denotes if the data are either the log2ratio of raw copy number data or raw copy number data. By default, they are considered as log2ratio data, otherwise (ifLogRatio=0) they are transformed in log2ratio data.

Value

A list containing:

snpName

an array containing the names of the probes

chr

an array containing the name of the chromosome to which each probe belongs

position

an array containing the physical position of each probe

logratio

an array containing the log2ratio of the raw copy number data

Examples


###import the 10K data of cell line REC
path <- system.file("extdata", "rec10k.txt", package = "mBPCR")
rec10k <- importCNData(path, NRowSkip=1)
plot(rec10k$position[rec10k$chr == 3], rec10k$logratio[rec10k$chr == 3])	    

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(mBPCR)
Loading required package: oligoClasses
Welcome to oligoClasses version 1.34.0
Loading required package: SNPchip
Welcome to SNPchip version 2.18.0
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/mBPCR/importCNData.Rd_%03d_medium.png", width=480, height=480)
> ### Name: importCNData
> ### Title: Import the copy number data
> ### Aliases: importCNData
> ### Keywords: file
> 
> ### ** Examples
> 
> 
> ###import the 10K data of cell line REC
> path <- system.file("extdata", "rec10k.txt", package = "mBPCR")
> rec10k <- importCNData(path, NRowSkip=1)
> plot(rec10k$position[rec10k$chr == 3], rec10k$logratio[rec10k$chr == 3])	    
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>