You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qry<-"this is a test"
trg<-"test this is a"
res=align(qry,trg,task="path")
res$cigar
#[1] "1=5D8=5I"
getNiceAlignment(res,qry,trg)
#$query_aligned
#[1] "t-----his is a test"
#$matched_aligned
#[1] "|-----||||||||-----"
#$target_aligned
#[1] "test this is a-----"
qry=paste(rep("this is a test",100),collapse=" ")
trg=paste(rep("test this is a",100),collapse=" ")
res=align(qry,trg,task="path")
res$cigar
#[1] "1=5D1493=5I"
aln=getNiceAlignment(res,qry,trg)
#Error in getNiceAlignment(res, qry, trg) :
#The CIGAR string is in an invalid format. Operation detected is not a single character '=' or 'X' or 'D'.
#The expected format should be 'number of occurrences' + 'CIGAR operation', e.g. '4=' or '1D5=1X1=1X'.Please fix.
The text was updated successfully, but these errors were encountered:
Hello, the expression under "check CIGAR correct" in getNiceAlignment "^[XDI1-9=]*$" does not account for all possible cigar ops according to https://samtools.github.io/hts-specs/SAMv1.pdf (1.4.6. CIGAR: CIGAR string) it could be "^[MIDNSHPX0-9=]+$". First test below works, second example does not. Maybe this can also help: https://rdrr.io/bioc/GenomicAlignments/man/cigar-utils.html. Thank you.
library(edlibR)
qry<-"this is a test"
trg<-"test this is a"
res=align(qry,trg,task="path")
res$cigar
#[1] "1=5D8=5I"
getNiceAlignment(res,qry,trg)
#$query_aligned
#[1] "t-----his is a test"
#$matched_aligned
#[1] "|-----||||||||-----"
#$target_aligned
#[1] "test this is a-----"
qry=paste(rep("this is a test",100),collapse=" ")
trg=paste(rep("test this is a",100),collapse=" ")
res=align(qry,trg,task="path")
res$cigar
#[1] "1=5D1493=5I"
aln=getNiceAlignment(res,qry,trg)
#Error in getNiceAlignment(res, qry, trg) :
#The CIGAR string is in an invalid format. Operation detected is not a single character '=' or 'X' or 'D'.
#The expected format should be 'number of occurrences' + 'CIGAR operation', e.g. '4=' or '1D5=1X1=1X'.Please fix.
The text was updated successfully, but these errors were encountered: