Question: VARScan2 Error, CBS segmentation by "DNACopy"
0
gravatar for mittu1602
2.9 years ago by
mittu1602180
India
mittu1602180 wrote:

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

cnv R • 1.3k views
ADD COMMENTlink modified 2.9 years ago by Kevin Blighe66k • written 2.9 years ago by mittu1602180
2
gravatar for Kevin Blighe
2.9 years ago by
Kevin Blighe66k
Kevin Blighe66k wrote:

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 COMMENTlink modified 2.8 years ago • written 2.9 years ago by Kevin Blighe66k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1706 users visited in the last hour