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 |
A package for short RNA seq visualization and quantification.
Package: | ssviz |
Type: | Package |
Version: | 0.99 |
Date: | 2014-05-08 |
License: | GPL-2 |
Diana H.P. Low Maintainer: Diana Low <[email protected]>
counts
is an example total read count for bam reads
data(ssviz)
data(ssviz)
internal
ctrlbam
is an example control dataset from bam file read in with readBam
data(ssviz)
data(ssviz)
internal
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
getCountMatrix(bam_file,pseudo=FALSE)
getCountMatrix(bam_file,pseudo=FALSE)
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. |
An object of class data.frame having the values from the original bam file with an additional 'count' column.
Diana H.P. Low
data(ssviz) getCountMatrix(ctrlbam)
data(ssviz) getCountMatrix(ctrlbam)
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
signature(object="DataFrame")
Returns and object of class data.frame having the values from the original bam file with an additional 'count' column.
"logicalORmissing"
Class union of logical and missing object.
Diana H.P. Low
showClass("logicalORmissing")
showClass("logicalORmissing")
Calculates nucleotide frequency of reads in bam file
ntfreq(bam_file, ntlength, toRNA = TRUE, count_type = "total")
ntfreq(bam_file, ntlength, toRNA = TRUE, count_type = "total")
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 |
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
Diana H.P. Low
data(ssviz) freq<-ntfreq(pctrlbam,ntlength=10)
data(ssviz) freq<-ntfreq(pctrlbam,ntlength=10)
Calculates nucleotide frequency of reads in bam file
ntfreq(bam_file, ntlength, toRNA = TRUE, count_type = "total")
Returns a data frame of nucleotide frequences along length of sequence provided.
Diana H.P. Low
pctrlbam
is an example control dataset from bam file read in with readBam
data(ssviz)
data(ssviz)
internal
piRNA ping-pong analysis of complementary sequences
pingpong(bam_file)
pingpong(bam_file)
bam_file |
An object of class data.frame or DataFrame |
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.
This function returns a data.frame object with frequency of overlapping complementary piRNAs.
Diana H.P. Low
Brennecke J. et al. Cell 128, 1089-1103, March 23, 2007
data(ssviz) pp<-pingpong(pctrlbam)
data(ssviz) pp<-pingpong(pctrlbam)
piRNA ping-pong analysis of complementary sequences
pingpong(bam_file)
Returns a data.frame object with frequency of overlapping complementary piRNAs.
Diana H.P. Low
Plots distribution of reads in the bam file based on length, direction (strand) or location (rname)
plotDistro(bamlist, type = "qwidth", samplenames = NULL, unique = FALSE, ncounts = NULL, norm = FALSE, yname = "Counts per million")
plotDistro(bamlist, type = "qwidth", samplenames = NULL, unique = FALSE, ncounts = NULL, norm = FALSE, yname = "Counts per million")
bamlist |
An object of type list, giving a list of bam files. If you only have 1 file, use |
type |
An object of type character. Can be |
samplenames |
Labels for the plot. |
unique |
Logical value to use unique reads ( |
ncounts |
Number of total counts in the bam file, used if |
norm |
Logical value to determine if plot will be normalised. |
yname |
y axis label. |
Diana H.P. Low
data(ssviz) plotDistro(list(ctrlbam))
data(ssviz) plotDistro(list(ctrlbam))
Plots distribution of reads in the bam file based on length, direction (strand) or location (rname)
plotDistro(bamlist, type = "qwidth", samplenames = NULL, unique = FALSE, ncounts = 1e+06, norm = FALSE, yname = "Counts per million")
Returns a distribution plot.
Diana H.P. Low
Plots nucleotide frequency generated by ntfreq
plotFreq(freqvector, percentage = TRUE)
plotFreq(freqvector, percentage = TRUE)
freqvector |
|
percentage |
Logical value to represent y-axis as percentage or frequency. |
Diana H.P. Low
data(ssviz) freq<-ntfreq(pctrlbam,ntlength=10) plotFreq(freq)
data(ssviz) freq<-ntfreq(pctrlbam,ntlength=10) plotFreq(freq)
Plots the ping-pong frequency of piRNA amplification
plotPP(pout, samplenames = NULL)
plotPP(pout, samplenames = NULL)
pout |
An object of type |
samplenames |
An object of type character for sample labels. |
Diana H.P. Low
Brennecke J. et al. Cell 128, 1089-1103, March 23, 2007
data(ssviz) pp<-pingpong(pctrlbam) plotPP(list(pp))
data(ssviz) pp<-pingpong(pctrlbam) plotPP(list(pp))
Plots the ping-pong frequency of piRNA amplification
plotPP(pout, samplenames = NULL)
Returns the pingpong amplification plot.
Diana H.P. Low
Plots the read density given a chromosome region.
plotRegion(bamlist, region, howsmooth = 2, ncounts = NULL, samplenames = NULL)
plotRegion(bamlist, region, howsmooth = 2, ncounts = NULL, samplenames = NULL)
bamlist |
An object of type list, giving a list of bam files. If you only have 1 file, use |
region |
An object of type character defining the region to plot. Eg. |
howsmooth |
Numeric value controlling smoothness of the plot. |
ncounts |
Total number of reads for plot normalization. |
samplenames |
Sample names |
Returns the x and y components of the region's reads and plots the density.
Diana H.P. Low
data(ssviz) region<-'chr1:3015526-3080526' plotRegion(list(ctrlbam), region=region)
data(ssviz) region<-'chr1:3015526-3080526' plotRegion(list(ctrlbam), region=region)
Plots the read density given a chromosome region.
plotRegion(bamlist, region, howsmooth = 2, ncounts = NULL, samplenames = NULL)
Returns the x and y components of the region's reads and plots the density.
Diana H.P. Low
ptreatbam
is an example treatment dataset from bam file read in with readBam
data(ssviz)
data(ssviz)
internal
Reads a bam file through RSamtools, and converts it into a data frame of class DataFrame
readBam(file_name, tags = character(0))
readBam(file_name, tags = character(0))
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. |
This function formalizes what had been described in the RSamtools documentation and makes it easier to compute the downstream functions in this package.
Returns the bam file contents in a readable dataframe format.
Diana H.P. Low
RSamtools package
bam.files <- dir(system.file("extdata", package = "ssviz"), full = TRUE, patt = "bam$") ctrlbam <- readBam(bam.files[1])
bam.files <- dir(system.file("extdata", package = "ssviz"), full = TRUE, patt = "bam$") ctrlbam <- readBam(bam.files[1])
Reads a bam file through RSamtools, and converts it into a data frame of class DataFrame
readBam(bam_file, tags = character(0))
Returns the bam file contents in a readable dataframe format.
Diana H.P. Low
treatbam
is an example treatment dataset from bam file read in with readBam
data(ssviz)
data(ssviz)
internal