Firstly, apologies if this is a daft/duplicated question - I am very new to this forum and data analysis using R in general.
I am trying to analyse some gene panel data using the cn.mops package in R using the code provided under Section 6 of the package vignette ("Exome sequencing data"). The first part of the code seems to work with no errors:
> BAMfiles <-c("~/Alignments/Filename.bam","~/Alignments/Filename2.bam","~/Alignments/Filename3.bam","~/Alignments/Filename4.bam","~/Alignments/Filename5.bam","~/Alignments/Filename6.bam","~/Alignments/Filename7.bam")
> segments <- read.table("~/Alignments/NeuroMetabolicCodingExons.bed",sep="\t",as.is=TRUE)
> gr <- GRanges(segments[,1],IRanges(segments[,2],segments[,3]))
> X <- getSegmentReadCountsFromBAM(BAMfiles,GR=gr,mode="unpaired")
However, when I then enter the following command as instructed:
> resCNMOPS <- exomecn.mops(X)
It comes up with the following error:
Error in if (n > 512) n <- 2^ceiling(log2(n)) :
missing value where TRUE/FALSE needed
In addition: Warning message:
In normalizeChromosomes(X, chr = chr, normType = normType, qu = normQu) :
There exists a reference sequence with zero reads for some samples.
If anyone could enlighten me as to what this error means/how to fix it I would be eternally grateful.