Last data update: 2014.03.03

R: (Legacy) GappedReads objects
GappedReads-classR Documentation

(Legacy) GappedReads objects

Description

The GappedReads class extends the GAlignments class.

A GappedReads object contains all the information contained in a GAlignments object plus the sequences of the queries. Those sequences can be accessed via the qseq accessor.

Constructor

GappedReads objects are typically created when reading a file containing aligned reads with the readGappedReads function.

Accessors

In the code snippets below, x is a GappedReads object.

qseq(x): Extracts the sequences of the queries as a DNAStringSet object.

Author(s)

Herv<c3><83><c2><a9> Pag<c3><83><c2><a8>s

References

http://samtools.sourceforge.net/

See Also

  • GAlignments objects.

  • readGappedReads.

Examples

greads_file <- system.file("extdata", "ex1.bam", package="Rsamtools")
greads <- readGappedReads(greads_file)
greads
qseq(greads)

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

Loading required package: Biostrings
Loading required package: XVector
Loading required package: Rsamtools
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/GenomicAlignments/GappedReads-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GappedReads-class
> ### Title: (Legacy) GappedReads objects
> ### Aliases: class:GappedReads GappedReads-class GappedReads qseq
> ###   qseq,GappedReads-method qwidth,GappedReads-method
> ###   c,GappedReads-method
> ### Keywords: methods classes
> 
> ### ** Examples
> 
> greads_file <- system.file("extdata", "ex1.bam", package="Rsamtools")
> greads <- readGappedReads(greads_file)
> greads
GappedReads object with 3271 alignments and 0 metadata columns:
         seqnames strand       cigar    qwidth     start       end     width
            <Rle>  <Rle> <character> <integer> <integer> <integer> <integer>
     [1]     seq1      +         36M        36         1        36        36
     [2]     seq1      +         35M        35         3        37        35
     [3]     seq1      +         35M        35         5        39        35
     [4]     seq1      +         36M        36         6        41        36
     [5]     seq1      +         35M        35         9        43        35
     ...      ...    ...         ...       ...       ...       ...       ...
  [3267]     seq2      +         35M        35      1524      1558        35
  [3268]     seq2      +         35M        35      1524      1558        35
  [3269]     seq2      -         35M        35      1528      1562        35
  [3270]     seq2      -         35M        35      1532      1566        35
  [3271]     seq2      -         35M        35      1533      1567        35
             njunc
         <integer>
     [1]         0
     [2]         0
     [3]         0
     [4]         0
     [5]         0
     ...       ...
  [3267]         0
  [3268]         0
  [3269]         0
  [3270]         0
  [3271]         0
  -------
  seqinfo: 2 sequences from an unspecified genome
> qseq(greads)
  A DNAStringSet instance of length 3271
       width seq
   [1]    36 CACTAGTGGCTCATTGTAAATGTGTGGTTTAACTCG
   [2]    35 CTAGTGGCTCATTGTAAATGTGTGGTTTAACTCGT
   [3]    35 AGTGGCTCATTGTAAATGTGTGGTTTAACTCGTCC
   [4]    36 GTGGCTCATTGTAATTTTTTGTTTTAACTCTTCTCT
   [5]    35 GCTCATTGTAAATGTGTGGTTTAACTCGTCCATGG
   ...   ... ...
[3267]    35 TTTCTTTTCTCCTTTTTTTTTTTTTTTTTCTACAT
[3268]    35 TTTCTTTTCACTTTTTTTTTTTTTTTTTTTTACTT
[3269]    35 TTTTTTCTTTTTTTTTTTTTTTTTTTTGCATGCCA
[3270]    35 TTTTTTTTTTTTTTTTTTTTTTTGCATGCCAGAAA
[3271]    35 TTTTTTTTTTTTTTTTTTTTTTTCATGCCAGAAAA
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>