Question: Error generated by Rsamtools while importing the best base quality score from the bam file
0
gravatar for MAPK
4.0 years ago by
MAPK1.4k
United States
MAPK1.4k wrote:

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. Thanks you.

 

R • 1.2k views
ADD COMMENTlink modified 20 months ago by Biostar ♦♦ 20 • written 4.0 years ago by MAPK1.4k
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: 1002 users visited in the last hour