Error generated by Rsamtools while importing the best base quality score from the bam file
0
0
Entering edit mode
8.9 years ago
MAPK ★ 2.1k

Hi Guys,

I was trying to get the read coverage for the list of variant positions using R script using Rsamtools on a bam file. However, for some reason I am getting the following error:

posns2<-cigarQNarrow(aln1[[i]]$cigar, start=posns,end=-posns,width=1)
Error in .Call2("solve_user_SEW", refwidths, start, end, width, translate.negative.coord,  :
  solving row 1: 'allow.nonnarrowing' is FALSE and the supplied start (104) is > refwidth + 1

posns2<-cigarNarrow(aln1[[i]]$cigar, start=posns,width=1)  
##  posns2<-cigarQNarrow(aln1[[i]]$cigar, start=true.length,width=1)
## posns
posns2<-attr(posns2,"rshift")
## posns2
## posns-posns2-1
shift.other <- posns-posns2-1
shift.other[posns2==0]<-shift[posns2==0] ### posn can be within the softclip or could this causes a problem?
posns<-posns+shift+(shift.other-shift)
############
seq.at.posn<-subseq(aln1[[i]]$seq,start=posns,width=1)
Error in .Call2("solve_user_SEW", refwidths, start, end, width, translate.negative.coord,  :
  solving row 1: 'allow.nonnarrowing' is FALSE and the supplied start (104) is > refwidth + 1
posns-posns2-1

Could you guys please help me figure out the issue here. Thank you.

R • 1.9k views
ADD COMMENT

Login before adding your answer.

Traffic: 2252 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