Package 'ssviz'

Title: A small RNA-seq visualizer and analysis toolkit
Description: Small RNA sequencing viewer
Authors: Diana Low
Maintainer: Diana Low <[email protected]>
License: GPL-2
Version: 1.41.0
Built: 2024-11-19 04:26:23 UTC
Source: https://github.com/bioc/ssviz

Help Index


ssviz

Description

A package for short RNA seq visualization and quantification.

Details

Package: ssviz
Type: Package
Version: 0.99
Date: 2014-05-08
License: GPL-2

Author(s)

Diana H.P. Low Maintainer: Diana Low <[email protected]>


counts data

Description

counts is an example total read count for bam reads

Usage

data(ssviz)

Source

internal


ctrlbam data

Description

ctrlbam is an example control dataset from bam file read in with readBam

Usage

data(ssviz)

Source

internal


getCountMatrix

Description

returns the bam data.frame with an additional column counts. Only relevant if the fasta file used for mapping input was previously collapsed via fastx_toolkit to return a fasta read name in the format of readnumber-totalcounts

Usage

getCountMatrix(bam_file,pseudo=FALSE)

Arguments

bam_file

An object of class DataFrame (from IRanges). Can be generated from readBam.

pseudo

Logical. If TRUE, assume the reads in the bam file does not have a count record and sets all counts to 1.

Value

An object of class data.frame having the values from the original bam file with an additional 'count' column.

Author(s)

Diana H.P. Low

See Also

readBam

Examples

data(ssviz)
getCountMatrix(ctrlbam)

getCountMatrix

Description

returns the bam data.frame with an additional column counts. Only relevant if the fasta file used for mapping input was previously collapsed via fastx_toolkit to return a fasta read name in the format of readnumber-totalcounts

Methods

signature(object="DataFrame")

Returns and object of class data.frame having the values from the original bam file with an additional 'count' column.


Class "logicalORmissing"

Description

Class union of logical and missing object.

Author(s)

Diana H.P. Low

Examples

showClass("logicalORmissing")

ntfreq

Description

Calculates nucleotide frequency of reads in bam file

Usage

ntfreq(bam_file, ntlength, toRNA = TRUE, count_type = "total")

Arguments

bam_file

An object of class data.frame or DataFrame

ntlength

An integer specifying the length of the sequence to quantify

toRNA

A logical value on whether to translate the DNA sequence to RNA

count_type

A character string on how to count the nucleotides. Can be either "total" or "unique". If total is selected, the function will look for the countcolumn and multiply the reads by its number of occurence when calculating the frequency.

Value

Returns a data.frame of the frequency of nucleotides (either A/C/G/T or A/C/G/U) at each position up to the specified ntlength

Author(s)

Diana H.P. Low

Examples

data(ssviz)
freq<-ntfreq(pctrlbam,ntlength=10)

ntfreq

Description

Calculates nucleotide frequency of reads in bam file

Methods

ntfreq(bam_file, ntlength, toRNA = TRUE, count_type = "total")

Returns a data frame of nucleotide frequences along length of sequence provided.

Author(s)

Diana H.P. Low


pctrlbam data

Description

pctrlbam is an example control dataset from bam file read in with readBam

Usage

data(ssviz)

Source

internal


pingpong

Description

piRNA ping-pong analysis of complementary sequences

Usage

pingpong(bam_file)

Arguments

bam_file

An object of class data.frame or DataFrame

Details

The ping-pong mechanism is a proposed method for the amplification of primary piRNAs, which leads to the production of new primary piRNAs from their precursor transcripts, which eventually amplifies the pool of both primary and secondary piRNAs. This positive feedback loop is a secondary biogenesis mechanism that requires complementary transcripts to a pre-existing pool of piRNAs.

Value

This function returns a data.frame object with frequency of overlapping complementary piRNAs.

Author(s)

Diana H.P. Low

References

Brennecke J. et al. Cell 128, 1089-1103, March 23, 2007

Examples

data(ssviz)
pp<-pingpong(pctrlbam)

pingpong

Description

piRNA ping-pong analysis of complementary sequences

Methods

pingpong(bam_file)

Returns a data.frame object with frequency of overlapping complementary piRNAs.

Author(s)

Diana H.P. Low


plotDistro

Description

Plots distribution of reads in the bam file based on length, direction (strand) or location (rname)

Usage

plotDistro(bamlist, type = "qwidth", samplenames = NULL, unique = FALSE, ncounts = NULL, norm = FALSE, yname = "Counts per million")

Arguments

bamlist

An object of type list, giving a list of bam files. If you only have 1 file, use list(bam_file)

type

An object of type character. Can be qwidth,rname or strand. In theory, any column property existing in the bam file can be used, but these 3 would be most meaningful.

samplenames

Labels for the plot.

unique

Logical value to use unique reads (TRUE) or all reads (FALSE)

ncounts

Number of total counts in the bam file, used if unique is set to FALSE.

norm

Logical value to determine if plot will be normalised.

yname

y axis label.

Author(s)

Diana H.P. Low

Examples

data(ssviz)
plotDistro(list(ctrlbam))

plotDistro

Description

Plots distribution of reads in the bam file based on length, direction (strand) or location (rname)

Methods

plotDistro(bamlist, type = "qwidth", samplenames = NULL, unique = FALSE, ncounts = 1e+06, norm = FALSE, yname = "Counts per million")

Returns a distribution plot.

Author(s)

Diana H.P. Low


plotFreq

Description

Plots nucleotide frequency generated by ntfreq

Usage

plotFreq(freqvector, percentage = TRUE)

Arguments

freqvector

data.frame object generated by ntfreq

percentage

Logical value to represent y-axis as percentage or frequency.

Author(s)

Diana H.P. Low

See Also

ntfreq

Examples

data(ssviz)
freq<-ntfreq(pctrlbam,ntlength=10)
plotFreq(freq)

plotFreq

Description

Plots nucleotide frequency generated by ntfreq

Methods

plotFreq(freqvector, percentage = TRUE)

Returns a frequency bar plot.

Author(s)

Diana H.P. Low


plotPP

Description

Plots the ping-pong frequency of piRNA amplification

Usage

plotPP(pout, samplenames = NULL)

Arguments

pout

An object of type data.frame generated by pingpong

samplenames

An object of type character for sample labels.

Author(s)

Diana H.P. Low

References

Brennecke J. et al. Cell 128, 1089-1103, March 23, 2007

See Also

pingpong

Examples

data(ssviz)
pp<-pingpong(pctrlbam)
plotPP(list(pp))

plotPP

Description

Plots the ping-pong frequency of piRNA amplification

Methods

plotPP(pout, samplenames = NULL)

Returns the pingpong amplification plot.

Author(s)

Diana H.P. Low


plotRegion

Description

Plots the read density given a chromosome region.

Usage

plotRegion(bamlist, region, howsmooth = 2, ncounts = NULL, samplenames = NULL)

Arguments

bamlist

An object of type list, giving a list of bam files. If you only have 1 file, use list(bam_file)

region

An object of type character defining the region to plot. Eg. chr1:1000-2000

howsmooth

Numeric value controlling smoothness of the plot.

ncounts

Total number of reads for plot normalization.

samplenames

Sample names

Value

Returns the x and y components of the region's reads and plots the density.

Author(s)

Diana H.P. Low

Examples

data(ssviz)
region<-'chr1:3015526-3080526'
plotRegion(list(ctrlbam), region=region)

plotRegion

Description

Plots the read density given a chromosome region.

Methods

plotRegion(bamlist, region, howsmooth = 2, ncounts = NULL, samplenames = NULL)

Returns the x and y components of the region's reads and plots the density.

Author(s)

Diana H.P. Low


ptreatbam data

Description

ptreatbam is an example treatment dataset from bam file read in with readBam

Usage

data(ssviz)

Source

internal


readBam

Description

Reads a bam file through RSamtools, and converts it into a data frame of class DataFrame

Usage

readBam(file_name, tags = character(0))

Arguments

file_name

Character string of bam file location

tags

Bam tags to import into the data frame. By default it only takes the standard values if none are given.

Details

This function formalizes what had been described in the RSamtools documentation and makes it easier to compute the downstream functions in this package.

Value

Returns the bam file contents in a readable dataframe format.

Author(s)

Diana H.P. Low

References

RSamtools package

Examples

bam.files <- dir(system.file("extdata", package = "ssviz"), full = TRUE, patt = "bam$")
ctrlbam <- readBam(bam.files[1])

readBam

Description

Reads a bam file through RSamtools, and converts it into a data frame of class DataFrame

Methods

readBam(bam_file, tags = character(0))

Returns the bam file contents in a readable dataframe format.

Author(s)

Diana H.P. Low


treatbam data

Description

treatbam is an example treatment dataset from bam file read in with readBam

Usage

data(ssviz)

Source

internal