Am I misunderstanding the usage of first()
and second()
from the GAlignmentPairs
. My understanding is that it should return the first and second mates for each pairs, right? I think it's pretty recent as I have used it before. Also, I'm seeing this with other bam files.
Many thanks
aln <- readGAlignmentPairs("https://dovetail-public.s3-us-west-2.amazonaws.com/TPC-29-37.bam")
length(aln)
# [1] 3164606
length(second(aln))
# [1] 3164606
length(first(aln))
# [1] 2
sessionInfo( )
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] coolR_0.0.0.9000 rhdf5_2.32.4
[3] InteractionSet_1.16.0 tidyr_1.1.2
[5] dplyr_1.0.2 ggplot2_3.3.2
[7] rtracklayer_1.48.0 GenomicAlignments_1.24.0
[9] Rsamtools_2.4.0 Biostrings_2.56.0
[11] XVector_0.28.0 SummarizedExperiment_1.18.2
[13] DelayedArray_0.14.1 matrixStats_0.57.0
[15] Biobase_2.48.0 GenomicRanges_1.40.0
[17] GenomeInfoDb_1.24.2 IRanges_2.22.2
[19] S4Vectors_0.26.1 BiocGenerics_0.34.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 compiler_4.0.3 pillar_1.4.6
[4] bitops_1.0-6 tools_4.0.3 zlibbioc_1.34.0
[7] lifecycle_0.2.0 tibble_3.0.3 gtable_0.3.0
[10] lattice_0.20-41 pkgconfig_2.0.3 rlang_0.4.7
[13] Matrix_1.2-18 GenomeInfoDbData_1.2.3 withr_2.3.0
[16] generics_0.0.2 vctrs_0.3.4 tidyselect_1.1.0
[19] grid_4.0.3 glue_1.4.2 R6_2.4.1
[22] XML_3.99-0.5 BiocParallel_1.22.0 Rhdf5lib_1.10.1
[25] purrr_0.3.4 magrittr_1.5 scales_1.1.1
[28] ellipsis_0.3.1 colorspace_1.4-1 RCurl_1.98-1.2
[31] munsell_0.5.0 crayon_1.3.4
I wonder if
first()
is being masked by a similarly named function in another package? What aboutlength(GenomicAlignments::first(aln))