Entering edit mode
Guest User
★
13k
@guest-user-4897
Last seen 10.4 years ago
Hi,
Using Rsamtools to read a bam file, is there a way to scan all the
optional tag fields that exists in the bam file without having to
explicitly specify them a priory in the ScanBamParam argument?
-- output of sessionInfo():
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets
methods base
other attached packages:
[1] doParallel_1.0.3 iterators_1.0.6 foreach_1.4.1
data.table_1.8.10 Rsamtools_1.13.44 Biostrings_2.29.19
GenomicRanges_1.13.45 XVector_0.1.4
[9] IRanges_1.19.38 BiocGenerics_0.7.5
loaded via a namespace (and not attached):
[1] bitops_1.0-6 codetools_0.2-8 stats4_3.0.2 tools_3.0.2
zlibbioc_1.7.0
--
Sent via the guest posting facility at bioconductor.org.
You could take a peek at the first line of the bam file using:
which will give you the tags in the file after the 11th position, i.e., NH, HI, AS, RG, RE, etc. in this example.
You could then do
but there is no 'get all tags from BAM file' function AFAIK.