Question: VARScan2 Error, CBS segmentation by "DNACopy"
0
gravatar for mittu1602
16 months ago by
mittu1602150
India
mittu1602150 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 • 772 views
ADD COMMENTlink modified 16 months ago by Kevin Blighe41k • written 16 months ago by mittu1602150
2
gravatar for Kevin Blighe
16 months ago by
Kevin Blighe41k
London, England
Kevin Blighe41k 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 16 months ago • written 16 months ago by Kevin Blighe41k
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: 697 users visited in the last hour