## ----style, echo = FALSE, results = 'asis'-------------------------------------------------------- BiocStyle::markdown() options(width=100, max.print=1000) knitr::opts_chunk$set( eval=as.logical(Sys.getenv("KNITR_EVAL", "TRUE")), cache=as.logical(Sys.getenv("KNITR_CACHE", "TRUE")), error=FALSE) ## ----echo=FALSE, message=FALSE-------------------------------------------------------------------- suppressPackageStartupMessages({ library(GenomicRanges) library(GenomicAlignments) library('RNAseqData.HNRNPC.bam.chr14') library(AnnotationHub) library("TxDb.Hsapiens.UCSC.hg19.knownGene") library(org.Hs.eg.db) }) ah = AnnotationHub() fa <- ah[["AH18522"]] ## ------------------------------------------------------------------------------------------------- ## 1. load software packages library(GenomicRanges) library(GenomicAlignments) ## 2. load sample data library('RNAseqData.HNRNPC.bam.chr14') bf <- BamFile(RNAseqData.HNRNPC.bam.chr14_BAMFILES[[1]], asMates=TRUE) ## 3. define our 'region of interest' roi <- GRanges("chr14", IRanges(19653773, width=1)) ## 4. alignments, junctions, overlapping our roi paln <- readGAlignmentsList(bf) j <- summarizeJunctions(paln, with.revmap=TRUE) j_overlap <- j[j %over% roi] ## 5. supporting reads paln[j_overlap$revmap[[1]]] ## ----ahdemo, eval=FALSE--------------------------------------------------------------------------- # library(AnnotationHub) # ah = AnnotationHub() ## ----ah2------------------------------------------------------------------------------------------ ## data is available from the following sources unique(ah$dataprovider) ## following types of files can be retrieved from the hub unique(ah$sourcetype) ## We will download all _Homo sapiens_ cDNA sequences from the FASTA file ## 'Homo_sapiens.GRCh38.cdna.all.fa' from Ensembl using ## `r Biocpkg("AnnotationHub")`. ah2 <- query(ah, c("fasta", "homo sapiens", "Ensembl")) fa <- ah2[["AH18522"]] fa ## ----gene-model-discovery------------------------------------------------------------------------- library("TxDb.Hsapiens.UCSC.hg19.knownGene") txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene txdb methods(class=class(txdb)) genes(txdb) ## ----select--------------------------------------------------------------------------------------- library(org.Hs.eg.db) select(org.Hs.eg.db, c("BRCA1", "PTEN"), c("ENTREZID", "GENENAME"), "SYMBOL") keytypes(org.Hs.eg.db) columns(org.Hs.eg.db) ## ----sessionInfo---------------------------------------------------------------------------------- sessionInfo()