VARScan2 Error, CBS segmentation by "DNACopy"
1
0
Entering edit mode
6.9 years ago
mittu1602 ▴ 200

I am analysing copy number from from a sample through VARScan2 following this manual where for doing "Segmentation and classification" I am using DNACopy and following below mentioned commands:

library(DNAcopy)
cn <- read.table("your.cn.file",header=F)
CNA.object <-CNA( genomdat = cn[,6], chrom = cn[,1], maploc = cn[,2], data.type = 'logratio')
CNA.smoothed <- smooth.CNA(CNA.object)

but it shows me error:

Error in CNA(genomdat = cn[, 6], chrom = cn[, 1], maploc = cn[, 2], data.type = "logratio") : 
  could not find function "CNA"

So I installed CNA by install.packages("cna") but still received the same error. It could be a silly fix, but it will be great if I can get some help. Thank you

R CNV • 2.2k views
ADD COMMENT
2
Entering edit mode
6.9 years ago

It would be more advisable to install from Bioconductor:

source("http://bioconductor.org/biocLite.R")

#Secure http
#source("https://bioconductor.org/biocLite.R")

#Install
biocLite("DNAcopy")

#Load the package
require(CNA)

#Check if the function now exists (typing it this way will show the function code)
CNA

#Implicitly specify CNA function from DNAcopy package
DNAcopy::CNA

The last way of using the function, i.e., DNAcopy::CNA, may be necessary if some other loaded package has a function by the same name (namespace issue).

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 2582 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6