scanBam
1
0
Entering edit mode
@9977223c
Last seen 22 months ago
Israel

hy, I am working with a bamfile, using the package Rsamtools and the function scanBam, some information that are important for me are return as NA, on galaxy and on IGV i can see the information and I don't undersant why.

srq<-scanBam(bamfile1)

srq[["pos"]]

it is given a list of 220134 entries that are all NA, it is the same for qwidth, mapq, cigar, mpos, isize, rname, strand... what is the problem ? thank you

Rsamtools Rsam • 1.2k views
ADD COMMENT
0
Entering edit mode

The syntax should be srq[[1]][["pos"]]; your command should return NULL. From the help page ?scanBam, does the command

> fl <- system.file("extdata", "ex1.bam", package="Rsamtools")
> scanBam(fl)[[1]][["pos"]]

work as expected? If not, please report the output of sessionInfo(), mine is

> sessionInfo()
R version 4.2.2 RC (2022-10-27 r83205)
Platform: aarch64-apple-darwin21.6.0 (64-bit)
Running under: macOS Monterey 12.6.2

Matrix products: default
BLAS:   /Users/ma38727/bin/R-4-2-branch/lib/libRblas.dylib
LAPACK: /Users/ma38727/bin/R-4-2-branch/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] Rsamtools_2.14.0     Biostrings_2.66.0    XVector_0.38.0
[4] GenomicRanges_1.50.2 GenomeInfoDb_1.34.4  IRanges_2.32.0
[7] S4Vectors_0.36.1     BiocGenerics_0.44.0

loaded via a namespace (and not attached):
 [1] codetools_0.2-18       crayon_1.5.2           bitops_1.0-7
 [4] zlibbioc_1.45.0        BiocParallel_1.32.5    tools_4.2.2
 [7] RCurl_1.98-1.9         parallel_4.2.2         compiler_4.2.2
[10] GenomeInfoDbData_1.2.9

Also, can you indicate what the position information is likely to be? Is this from a very large genome?

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 3 days ago
United States

scanBam has an argument 'param', which you can set up using ScanBamParam. See ?ScanBamParam for the details.

ADD COMMENT

Login before adding your answer.

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