I am running DNAcopy package for copy number analysis on whole genome sequencing data. I successfully plotted chromosome and map position but when i was trying to plot by chromosome , I am continuously getting an error. Following is my code and error.
> setwd("C:/Users/User/Desktop/DNAcopy")
> library(DNAcopy)
> P1 = read.table ("R025.output.copynumber.called", header=TRUE)
> CNA.object <- CNA( genomdat = P1[,7], chrom = P1[,1], maploc = P1 [,2], data.type = 'logratio',sampleid="R025")
> CNA.object.smoothed <- smooth.CNA(CNA.object)
> CNA.object.smoothed.seg <- segment(CNA.object.smoothed, verbose=0, min.width=2)
> seg.pvalue <- segments.p(CNA.object.smoothed.seg, ngrid=100, tol=1e-6, alpha=0.05, search.range=100, nperm=1000)
> write.table (seg.pvalue,file="R025_DNAcopy.pvalue", row.names=F, col.names=T, quote=F, sep="\t")
> jpeg("R025.jpeg")
> plot(CNA.object.smoothed.seg, plot.type="w")
> dev.off()
null device
1
> plot(CNA.object.smoothed.seg, plot.type="s")
Setting multi-figure configuration
Error in plot.new() : figure margins too large
Please use the formatting bar (especially the
code
option) to present your post better. I've done it for you this time.Thanks!