Skip to content

mapFromAlignments() and soft-clipping #12

@hpages

Description

@hpages

This looks wrong:

library(GenomicAlignments)
mypos <- IRanges(1:7, width=1, names=rep("read1", 7))
alignment <- GAlignments("chr1", pos=1L, cigar="2S3M2D7M", strand("+"), names="read1")
mapFromAlignments(mypos, alignment)
# IRanges object with 7 ranges and 0 metadata columns:
#             start       end     width
#         <integer> <integer> <integer>
#   read1         1         1         1
#   read1         2         2         1
#   read1         3         3         1
#   read1         4         4         1
#   read1         5         5         1
#   read1         8         8         1
#   read1         9         9         1

The reported deletion (ref pos 6 & 7) seems wrong. Should be ref pos 4 & 5.

sessionInfo():

> sessionInfo()
R Under development (unstable) (2019-10-30 r77336)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /home/hpages/R/R-4.0.r77336/lib/libRblas.so
LAPACK: /home/hpages/R/R-4.0.r77336/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] GenomicAlignments_1.23.1    Rsamtools_2.3.4            
 [3] Biostrings_2.55.4           XVector_0.27.0             
 [5] SummarizedExperiment_1.17.2 DelayedArray_0.13.4        
 [7] BiocParallel_1.21.2         matrixStats_0.55.0         
 [9] Biobase_2.47.2              GenomicRanges_1.39.2       
[11] GenomeInfoDb_1.23.13        IRanges_2.21.3             
[13] S4Vectors_0.25.12           BiocGenerics_0.33.0        

loaded via a namespace (and not attached):
 [1] lattice_0.20-38        crayon_1.3.4           bitops_1.0-6          
 [4] grid_4.0.0             zlibbioc_1.33.1        Matrix_1.2-18         
 [7] tools_4.0.0            RCurl_1.98-1.1         compiler_4.0.0        
[10] GenomeInfoDbData_1.2.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions