Last data update: 2014.03.03

R: Create count matrix with different summarizing options
isoCountsR Documentation

Create count matrix with different summarizing options

Description

This function collapses isomiRs into different groups. It is a similar concept than how to work with gene isoforms. With this function, different changes can be put together into a single miRNA variant. For instance all sequences with variants at 3' end can be considered as different elements in the table or analysis having the following naming hsa-miR-124a-5p.iso.t3:AAA.

Usage

isoCounts(ids, ref = FALSE, iso5 = FALSE, iso3 = FALSE, add = FALSE,
  subs = FALSE, seed = FALSE, minc = 1, mins = 1)

Arguments

ids

object of class IsomirDataSeq

ref

differentiate reference miRNA from rest

iso5

differentiate trimming at 5 miRNA from rest

iso3

differentiate trimming at 3 miRNA from rest

add

differentiate additions miRNA from rest

subs

differentiate nt substitution miRNA from rest

seed

differentiate changes in 2-7 nts from rest

minc

int minimum number of isomiR sequences to be included.

mins

int minimum number of samples with number of sequences bigger than minc counts.

Details

You can merge all isomiRs into miRNAs by calling the function only with the first parameter isoCounts(ids). You can get a table with isomiRs altogether and the reference miRBase sequences by calling the function with ref=TRUE. You can get a table with 5' trimming isomiRS, miRBase reference and the rest by calling with isoCounts(ids, ref=TRUE, iso5=TRUE). If you set up all parameters to TRUE, you will get a table for each different sequence mapping to a miRNA (i.e. all isomiRs).

Examples for the naming used for the isomiRs are at http://seqcluster.readthedocs.org/mirna_annotation.html#mirna-annotation.

Value

IsomirDataSeq object with new count table. The count matrix can be access with counts(ids).

Examples

data(mirData)
ids <- isoCounts(mirData, ref=TRUE)
head(counts(ids))
# taking into account isomiRs and reference sequence.
ids <- isoCounts(mirData, ref=TRUE, minc=10, mins=6)
head(counts(ids))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(isomiRs)
Loading required package: DiscriMiner
Loading required package: IRanges
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, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, 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, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
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")'.

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/isomiRs/isoCounts.Rd_%03d_medium.png", width=480, height=480)
> ### Name: isoCounts
> ### Title: Create count matrix with different summarizing options
> ### Aliases: isoCounts
> 
> ### ** Examples
> 
> data(mirData)
> ids <- isoCounts(mirData, ref=TRUE)
> head(counts(ids))
                     nb1    nb2    nb3     o1     o2     o3
hsa-let-7a-3p.iso     16     45     14     28     19     50
hsa-let-7a-3p.ref      8     25      9     19      7     15
hsa-let-7a-5p.iso  98799 117213  91493 117138  80728 125977
hsa-let-7a-5p.ref 328816 427450 335726 439522 245117 499625
hsa-let-7b-3p.iso     12     38     17     24     27     33
hsa-let-7b-5p.iso  39957  61305  43601  42921  36954  42320
> # taking into account isomiRs and reference sequence.
> ids <- isoCounts(mirData, ref=TRUE, minc=10, mins=6)
> head(counts(ids))
                     nb1    nb2    nb3     o1     o2     o3
hsa-let-7a-3p.iso     16     45     14     28     19     50
hsa-let-7a-5p.iso  98799 117213  91493 117138  80728 125977
hsa-let-7a-5p.ref 328816 427450 335726 439522 245117 499625
hsa-let-7b-3p.iso     12     38     17     24     27     33
hsa-let-7b-5p.iso  39957  61305  43601  42921  36954  42320
hsa-let-7b-5p.ref  69810 127089  82385 107306  67639 117933
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>