miRmine 1.2.0
miRmine dataset contains rich metadata around 304 selected publicly available,
miRNA-Seq experiments. Authors’ processed the data with miRdeep2 using
annotation files from miRBase v21. Mentioned metadata is used as colData
and miRBase annotations as GRanges are used as rowRanges while preparing
this dataset as RangedSummarizedExperiment. Data used for preprocessing and
constructing the miRmine
RangedSummarizedExperiment are available in
extdata
folder. Details of this proccess could be followed in
data help file: ?miRmine
.
#library(GenomicRanges)
#library(rtracklayer)
#library(SummarizedExperiment)
#library(Biostrings)
#library(Rsamtools)
ext.data <- system.file("extdata", package = "miRmine")
list.files(ext.data)
## [1] "hsa.gff3" "mature.fa"
## [3] "mature.fa.fai" "miRmine-cell-lines.csv"
## [5] "miRmine-info.txt" "miRmine-tissues.csv"
Number of ranges from miRBase GFF and number of features output
by miRdeep2 are not the same (2813 vs. 2822). After closer look it turns out
that 2 rows from either tissues or cell.lines data are duplicated
(with same mature miRNA and same precursor miRNA) and 7 rows don’t correspond
to mirna/precursor combination existing in miRBase v21. These rows were
removed for all samples, as seen in ?miRmine
.
To load this dataset use:
library("miRmine")
## Loading required package: SummarizedExperiment
## Loading required package: GenomicRanges
## Loading required package: stats4
## Loading required package: BiocGenerics
## Loading required package: parallel
##
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
##
## clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
## clusterExport, clusterMap, parApply, parCapply, parLapply,
## parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
##
## IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
##
## Filter, Find, Map, Position, Reduce, anyDuplicated, append,
## as.data.frame, basename, cbind, colMeans, colSums, colnames,
## dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
## intersect, is.unsorted, lapply, lengths, mapply, match, mget,
## order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
## rowMeans, rowSums, rownames, sapply, setdiff, sort, table,
## tapply, union, unique, unsplit, which, which.max, which.min
## Loading required package: S4Vectors
##
## Attaching package: 'S4Vectors'
## The following object is masked from 'package:base':
##
## expand.grid
## Loading required package: IRanges
## Loading required package: GenomeInfoDb
## Loading required package: Biobase
## Welcome to Bioconductor
##
## Vignettes contain introductory material; view with
## 'browseVignettes()'. To cite Bioconductor, see
## 'citation("Biobase")', and for packages 'citation("pkgname")'.
## Loading required package: DelayedArray
## Loading required package: matrixStats
##
## Attaching package: 'matrixStats'
## The following objects are masked from 'package:Biobase':
##
## anyMissing, rowMedians
## Loading required package: BiocParallel
##
## Attaching package: 'DelayedArray'
## The following objects are masked from 'package:matrixStats':
##
## colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges
## The following objects are masked from 'package:base':
##
## aperm, apply
data(miRmine)
miRmine
## class: RangedSummarizedExperiment
## dim: 2813 304
## metadata(0):
## assays(1): counts
## rownames(2813): hsa-let-7a-2-3p.hsa-let-7a-2
## hsa-let-7a-3p.hsa-let-7a-1 ... hsa-miR-99b-3p.hsa-mir-99b
## hsa-miR-99b-5p.hsa-mir-99b
## rowData names(10): source type ... UniqueName mirna_seq
## colnames(304): DRX003170..Lung. DRX003171..Lung. ...
## SRX666573..C8166. SRX666574..C8166.
## colData names(17): Experiment.Accession Tissue ... Total.RUNs
## Total.Bases
You may want to further subset data on some of many colData features (Tissue, Cell Line, Disease, Sex, Instrument) or output some specifics of particular experiment(s) (Accession #, Description, Publication):
adenocarcinoma = miRmine[ , miRmine$Disease %in% c("Adenocarcinoma")]
adenocarcinoma
## class: RangedSummarizedExperiment
## dim: 2813 30
## metadata(0):
## assays(1): counts
## rownames(2813): hsa-let-7a-2-3p.hsa-let-7a-2
## hsa-let-7a-3p.hsa-let-7a-1 ... hsa-miR-99b-3p.hsa-mir-99b
## hsa-miR-99b-5p.hsa-mir-99b
## rowData names(10): source type ... UniqueName mirna_seq
## colnames(30): ERX358444..Hair.follicle. ERX358445..Hair.follicle.
## ... SRX290601..Pancreas. SRX290617..Pancreas.
## colData names(17): Experiment.Accession Tissue ... Total.RUNs
## Total.Bases
as.character(adenocarcinoma$Sample.Accession)
## [1] "DRS016321" "DRS016322" "DRS016297" "DRS016298" "DRS016299" "DRS016300"
## [7] "DRS016301" "DRS016302" "DRS016303" "DRS016304" "DRS016305" "DRS016306"
## [13] "DRS016307" "DRS016308" "DRS016309" "DRS016310" "DRS016311" "DRS016312"
## [19] "DRS016313" "DRS016314" "DRS016315" "DRS016316" "DRS016317" "DRS016318"
## [25] "DRS016319" "DRS016320" "DRS016289" "DRS016289" "DRS016293" "DRS016293"
rowRanges data is also rich in metadata, containing all the features from miRBase hsa.gff3, with addition of actual miRNA sequence as DNAString instance. For example to read the sequence of top expressed miRNA over a subset of samples:
top.mirna = names(sort(rowSums(assays(adenocarcinoma)$counts))[1])
rowRanges(adenocarcinoma)$mirna_seq[[top.mirna]]
## Loading required package: Biostrings
## Loading required package: XVector
##
## Attaching package: 'Biostrings'
## The following object is masked from 'package:DelayedArray':
##
## type
## The following object is masked from 'package:base':
##
## strsplit
## 16-letter "DNAString" instance
## seq: CAAGCCCGACAAGCGC
miRmine
could be directly used in DESeq2
(note that expression values are RPM not raw reads):
library("DESeq2")
mirmine.subset = miRmine[, miRmine$Tissue %in% c("Lung", "Saliva")]
mirmine.subset = SummarizedExperiment(
assays = SimpleList(counts=ceiling(assays(mirmine.subset)$counts)),
colData=colData(mirmine.subset),
rowRanges=rowRanges(mirmine.subset),
rowData=NULL
)
ddsSE <- DESeqDataSet(mirmine.subset, design = ~ Tissue)
## converting counts to integer mode
## factor levels were dropped which had no samples
ddsSE <- ddsSE[ rowSums(counts(ddsSE)) > 1, ]
dds <- DESeq(ddsSE)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
res <- results(dds)
res
## log2 fold change (MLE): Tissue Saliva vs Lung
## Wald test p-value: Tissue Saliva vs Lung
## DataFrame with 1110 rows and 6 columns
## baseMean log2FoldChange
## <numeric> <numeric>
## hsa-let-7a-3p.hsa-let-7a-1 1.36878225121224 -5.06121692525049
## hsa-let-7a-3p.hsa-let-7a-3 1.36878225121224 -5.06121692525049
## hsa-let-7a-5p.hsa-let-7a-1 70832.4152362289 -6.66070394820764
## hsa-let-7a-5p.hsa-let-7a-2 70816.3802786825 -6.68915844432709
## hsa-let-7a-5p.hsa-let-7a-3 70796.4538181454 -6.6970658032693
## ... ... ...
## hsa-miR-98-3p.hsa-mir-98 2.74944147887468 -6.06706594334606
## hsa-miR-98-5p.hsa-mir-98 147.192905249397 -2.99953300228544
## hsa-miR-99a-5p.hsa-mir-99a 44.5105030263479 3.34660728353674
## hsa-miR-99b-3p.hsa-mir-99b 11.6648163870668 -0.850214803129576
## hsa-miR-99b-5p.hsa-mir-99b 213.017809065176 1.56034696799802
## lfcSE stat
## <numeric> <numeric>
## hsa-let-7a-3p.hsa-let-7a-1 4.40771665321255 -1.1482627681073
## hsa-let-7a-3p.hsa-let-7a-3 4.40771665321255 -1.1482627681073
## hsa-let-7a-5p.hsa-let-7a-1 0.905381321837468 -7.35679407952637
## hsa-let-7a-5p.hsa-let-7a-2 0.910761724424878 -7.34457571605911
## hsa-let-7a-5p.hsa-let-7a-3 0.907304190176292 -7.38127948242809
## ... ... ...
## hsa-miR-98-3p.hsa-mir-98 4.10433386746395 -1.47820965332308
## hsa-miR-98-5p.hsa-mir-98 1.45189465107018 -2.06594397195038
## hsa-miR-99a-5p.hsa-mir-99a 2.1654459571011 1.54545869526888
## hsa-miR-99b-3p.hsa-mir-99b 3.00398623730122 -0.283028860975544
## hsa-miR-99b-5p.hsa-mir-99b 0.923541384927293 1.68952576837784
## pvalue padj
## <numeric> <numeric>
## hsa-let-7a-3p.hsa-let-7a-1 0.250860104234839 NA
## hsa-let-7a-3p.hsa-let-7a-3 0.250860104234839 NA
## hsa-let-7a-5p.hsa-let-7a-1 1.88379602439951e-13 5.44588305235495e-12
## hsa-let-7a-5p.hsa-let-7a-2 2.06412818772954e-13 5.70776316259124e-12
## hsa-let-7a-5p.hsa-let-7a-3 1.56775513668932e-13 4.74805841397338e-12
## ... ... ...
## hsa-miR-98-3p.hsa-mir-98 0.139351670880805 0.22783460843237
## hsa-miR-98-5p.hsa-mir-98 0.0388337702361009 0.088642997150938
## hsa-miR-99a-5p.hsa-mir-99a 0.122235352389183 0.211830201960546
## hsa-miR-99b-3p.hsa-mir-99b 0.777154713281173 0.836328930028471
## hsa-miR-99b-5p.hsa-mir-99b 0.0911187179612673 0.168954823974828
## R version 3.5.0 (2018-04-23)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.4 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.7-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.7-bioc/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 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] parallel stats4 stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] DESeq2_1.20.0 Biostrings_2.48.0
## [3] XVector_0.20.0 miRmine_1.2.0
## [5] SummarizedExperiment_1.10.0 DelayedArray_0.6.0
## [7] BiocParallel_1.14.0 matrixStats_0.53.1
## [9] Biobase_2.40.0 GenomicRanges_1.32.0
## [11] GenomeInfoDb_1.16.0 IRanges_2.14.0
## [13] S4Vectors_0.18.0 BiocGenerics_0.26.0
## [15] BiocStyle_2.8.0
##
## loaded via a namespace (and not attached):
## [1] bit64_0.9-7 splines_3.5.0 Formula_1.2-2
## [4] latticeExtra_0.6-28 blob_1.1.1 GenomeInfoDbData_1.1.0
## [7] yaml_2.1.18 pillar_1.2.2 RSQLite_2.1.0
## [10] backports_1.1.2 lattice_0.20-35 digest_0.6.15
## [13] RColorBrewer_1.1-2 checkmate_1.8.5 colorspace_1.3-2
## [16] htmltools_0.3.6 Matrix_1.2-14 plyr_1.8.4
## [19] XML_3.98-1.11 genefilter_1.62.0 bookdown_0.7
## [22] zlibbioc_1.26.0 xtable_1.8-2 scales_0.5.0
## [25] htmlTable_1.11.2 tibble_1.4.2 annotate_1.58.0
## [28] ggplot2_2.2.1 nnet_7.3-12 lazyeval_0.2.1
## [31] survival_2.42-3 magrittr_1.5 memoise_1.1.0
## [34] evaluate_0.10.1 foreign_0.8-70 tools_3.5.0
## [37] data.table_1.10.4-3 stringr_1.3.0 locfit_1.5-9.1
## [40] munsell_0.4.3 cluster_2.0.7-1 AnnotationDbi_1.42.0
## [43] compiler_3.5.0 rlang_0.2.0 grid_3.5.0
## [46] RCurl_1.95-4.10 rstudioapi_0.7 htmlwidgets_1.2
## [49] bitops_1.0-6 base64enc_0.1-3 rmarkdown_1.9
## [52] gtable_0.2.0 DBI_0.8 gridExtra_2.3
## [55] knitr_1.20 bit_1.1-12 Hmisc_4.1-1
## [58] rprojroot_1.3-2 stringi_1.1.7 Rcpp_0.12.16
## [61] geneplotter_1.58.0 rpart_4.1-13 acepack_1.4.1
## [64] xfun_0.1