NanoporeRNASeq contains RNA-Seq data from the K562 and MCF7 cell lines that were generated by the SG-NEx project (https://github.com/GoekeLab/sg-nex-data). Each of these cell line has three replicates, with 1 direct RNA sequencing data and 2 cDNA sequencing data. The files contains reads aligned to the human genome (Grch38) chromosome 22 (1:25500000).
data("SGNexSamples")
SGNexSamples
##> DataFrame with 6 rows and 6 columns
##> sample_id Platform cellLine protocol cancer_type
##> <character> <character> <character> <character> <character>
##> 1 K562_directcDNA_repl.. MinION K562 directcDNA Leukocyte
##> 2 K562_directcDNA_repl.. GridION K562 directcDNA Leukocyte
##> 3 K562_directRNA_repli.. GridION K562 directRNA Leukocyte
##> 4 MCF7_directcDNA_repl.. MinION MCF7 directcDNA Breast
##> 5 MCF7_directcDNA_repl.. GridION MCF7 directcDNA Breast
##> 6 MCF7_directRNA_repli.. GridION MCF7 directRNA Breast
##> fileNames
##> <character>
##> 1 NanoporeRNASeq/versi..
##> 2 NanoporeRNASeq/versi..
##> 3 NanoporeRNASeq/versi..
##> 4 NanoporeRNASeq/versi..
##> 5 NanoporeRNASeq/versi..
##> 6 NanoporeRNASeq/versi..
data("HsChr22BambuAnnotation")
HsChr22BambuAnnotation
##> GRangesList object of length 1500:
##> $ENST00000043402
##> GRanges object with 2 ranges and 2 metadata columns:
##> seqnames ranges strand | exon_rank exon_endRank
##> <Rle> <IRanges> <Rle> | <integer> <integer>
##> [1] 22 20241415-20243110 - | 2 1
##> [2] 22 20268071-20268531 - | 1 2
##> -------
##> seqinfo: 1 sequence from an unspecified genome; no seqlengths
##>
##> $ENST00000086933
##> GRanges object with 3 ranges and 2 metadata columns:
##> seqnames ranges strand | exon_rank exon_endRank
##> <Rle> <IRanges> <Rle> | <integer> <integer>
##> [1] 22 19148576-19149095 - | 3 1
##> [2] 22 19149663-19149916 - | 2 2
##> [3] 22 19150025-19150283 - | 1 3
##> -------
##> seqinfo: 1 sequence from an unspecified genome; no seqlengths
##>
##> $ENST00000155674
##> GRanges object with 8 ranges and 2 metadata columns:
##> seqnames ranges strand | exon_rank exon_endRank
##> <Rle> <IRanges> <Rle> | <integer> <integer>
##> [1] 22 17137511-17138357 - | 8 1
##> [2] 22 17138550-17138738 - | 7 2
##> [3] 22 17141059-17141233 - | 6 3
##> [4] 22 17143098-17143131 - | 5 4
##> [5] 22 17145024-17145117 - | 4 5
##> [6] 22 17148448-17148560 - | 3 6
##> [7] 22 17149542-17149745 - | 2 7
##> [8] 22 17165209-17165287 - | 1 8
##> -------
##> seqinfo: 1 sequence from an unspecified genome; no seqlengths
##>
##> ...
##> <1497 more elements>
We can visualize the one sample for a single gene ENST00000215832 (MAPK1)
library(ggbio)
range <- HsChr22BambuAnnotation$ENST00000215832
# plot mismatch track
library(BSgenome.Hsapiens.NCBI.GRCh38)
# plot annotation track
tx <- autoplot(range, aes(col = strand), group.selfish = TRUE)
# plot coverage track
coverage <- autoplot(bamFiles[[1]], aes(col = coverage), which = range)
# merge the tracks into one plot
tracks(annotation = tx, coverage = coverage, heights = c(1, 3)) + theme_minimal()
Applying bambu to bamFiles
bambu returns a SummarizedExperiment object
se
##> class: RangedSummarizedExperiment
##> dim: 1511 6
##> metadata(0):
##> assays(6): counts CPM ... uniqueCounts theta
##> rownames(1511): tx.1 tx.2 ... ENST00000641933 ENST00000641967
##> rowData names(6): TXNAME GENEID ... readCount txNDR
##> colnames(6): e43b0723720f5_3844 e43b04327decc_3846 ...
##> e43b06ddcef62_3852 e43b042e46737_3854
##> colData names(3): name d_rate nGeneFordRate
We can visualize the annotated and novel isoforms identified in this gene example using plot functions from bambu
##> [[1]]
##> TableGrob (3 x 1) "arrange": 3 grobs
##> z cells name grob
##> 1 1 (2-2,1-1) arrange gtable[layout]
##> 2 2 (3-3,1-1) arrange gtable[layout]
##> 3 3 (1-1,1-1) arrange text[GRID.text.262]
sessionInfo()
##> R version 4.2.0 RC (2022-04-19 r82224)
##> Platform: x86_64-pc-linux-gnu (64-bit)
##> Running under: Ubuntu 20.04.4 LTS
##>
##> Matrix products: default
##> BLAS: /home/biocbuild/bbs-3.15-bioc/R/lib/libRblas.so
##> LAPACK: /home/biocbuild/bbs-3.15-bioc/R/lib/libRlapack.so
##>
##> locale:
##> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
##> [3] LC_TIME=en_GB LC_COLLATE=C
##> [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 stats graphics grDevices utils datasets methods
##> [8] base
##>
##> other attached packages:
##> [1] bambu_2.2.0
##> [2] SummarizedExperiment_1.26.0
##> [3] Biobase_2.56.0
##> [4] MatrixGenerics_1.8.0
##> [5] matrixStats_0.62.0
##> [6] BSgenome.Hsapiens.NCBI.GRCh38_1.3.1000
##> [7] BSgenome_1.64.0
##> [8] rtracklayer_1.56.0
##> [9] ggbio_1.44.0
##> [10] ggplot2_3.3.5
##> [11] Rsamtools_2.12.0
##> [12] Biostrings_2.64.0
##> [13] XVector_0.36.0
##> [14] GenomicRanges_1.48.0
##> [15] GenomeInfoDb_1.32.0
##> [16] IRanges_2.30.0
##> [17] S4Vectors_0.34.0
##> [18] NanoporeRNASeq_1.6.0
##> [19] ExperimentHub_2.4.0
##> [20] AnnotationHub_3.4.0
##> [21] BiocFileCache_2.4.0
##> [22] dbplyr_2.1.1
##> [23] BiocGenerics_0.42.0
##>
##> loaded via a namespace (and not attached):
##> [1] backports_1.4.1 Hmisc_4.7-0
##> [3] plyr_1.8.7 lazyeval_0.2.2
##> [5] splines_4.2.0 BiocParallel_1.30.0
##> [7] digest_0.6.29 ensembldb_2.20.0
##> [9] htmltools_0.5.2 fansi_1.0.3
##> [11] magrittr_2.0.3 checkmate_2.1.0
##> [13] memoise_2.0.1 cluster_2.1.3
##> [15] prettyunits_1.1.1 jpeg_0.1-9
##> [17] colorspace_2.0-3 blob_1.2.3
##> [19] rappdirs_0.3.3 xfun_0.30
##> [21] dplyr_1.0.8 crayon_1.5.1
##> [23] RCurl_1.98-1.6 jsonlite_1.8.0
##> [25] graph_1.74.0 survival_3.3-1
##> [27] VariantAnnotation_1.42.0 glue_1.6.2
##> [29] gtable_0.3.0 zlibbioc_1.42.0
##> [31] DelayedArray_0.22.0 scales_1.2.0
##> [33] DBI_1.1.2 GGally_2.1.2
##> [35] Rcpp_1.0.8.3 xtable_1.8-4
##> [37] progress_1.2.2 htmlTable_2.4.0
##> [39] foreign_0.8-82 bit_4.0.4
##> [41] OrganismDbi_1.38.0 Formula_1.2-4
##> [43] htmlwidgets_1.5.4 httr_1.4.2
##> [45] RColorBrewer_1.1-3 ellipsis_0.3.2
##> [47] farver_2.1.0 pkgconfig_2.0.3
##> [49] reshape_0.8.9 XML_3.99-0.9
##> [51] nnet_7.3-17 sass_0.4.1
##> [53] utf8_1.2.2 labeling_0.4.2
##> [55] tidyselect_1.1.2 rlang_1.0.2
##> [57] reshape2_1.4.4 later_1.3.0
##> [59] AnnotationDbi_1.58.0 munsell_0.5.0
##> [61] BiocVersion_3.15.2 tools_4.2.0
##> [63] cachem_1.0.6 xgboost_1.6.0.1
##> [65] cli_3.3.0 generics_0.1.2
##> [67] RSQLite_2.2.12 evaluate_0.15
##> [69] stringr_1.4.0 fastmap_1.1.0
##> [71] yaml_2.3.5 knitr_1.39
##> [73] bit64_4.0.5 purrr_0.3.4
##> [75] KEGGREST_1.36.0 AnnotationFilter_1.20.0
##> [77] RBGL_1.72.0 mime_0.12
##> [79] formatR_1.12 xml2_1.3.3
##> [81] biomaRt_2.52.0 compiler_4.2.0
##> [83] rstudioapi_0.13 filelock_1.0.2
##> [85] curl_4.3.2 png_0.1-7
##> [87] interactiveDisplayBase_1.34.0 tibble_3.1.6
##> [89] bslib_0.3.1 stringi_1.7.6
##> [91] highr_0.9 GenomicFeatures_1.48.0
##> [93] lattice_0.20-45 ProtGenerics_1.28.0
##> [95] Matrix_1.4-1 vctrs_0.4.1
##> [97] pillar_1.7.0 lifecycle_1.0.1
##> [99] BiocManager_1.30.17 jquerylib_0.1.4
##> [101] data.table_1.14.2 bitops_1.0-7
##> [103] httpuv_1.6.5 R6_2.5.1
##> [105] BiocIO_1.6.0 latticeExtra_0.6-29
##> [107] promises_1.2.0.1 gridExtra_2.3
##> [109] dichromat_2.0-0 assertthat_0.2.1
##> [111] rjson_0.2.21 withr_2.5.0
##> [113] GenomicAlignments_1.32.0 GenomeInfoDbData_1.2.8
##> [115] parallel_4.2.0 hms_1.1.1
##> [117] grid_4.2.0 rpart_4.1.16
##> [119] tidyr_1.2.0 rmarkdown_2.14
##> [121] biovizBase_1.44.0 shiny_1.7.1
##> [123] base64enc_0.1-3 restfulr_0.0.13