generateStrandModel: Create a Strand Model generateStrandModel Creates a model of...

Description Usage Arguments Value Examples

View source: R/generateStrandModel.R

Description

Create a Strand Model

generateStrandModel Creates a model of a DNA strand in the form of a matrix (data frames are too slow) for further processing/plotting.

Usage

1
2
generateStrandModel(startBase, endBase, fc, chr, strand, scaling = 1000,
  updateProgressBar = NULL)

Arguments

startBase

The starting base pair number

endBase

The ending base pair number

fc

The featurecounts object from rsubread after counting your alignment

chr

Chromosome; Should match Chr in fc

strand

+ or - strand to generate models for

scaling

scaling factor in how many base pairs should be represented per index (ex. 1000) to reduce computational complexity when simulating physics/plotting

updateProgressBar

a function for linking with shiny's progress bar. This will be called if not NULL when progress bar is to be updated (every 1000 processed features)

Value

A matrix containing the strand model.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
   #featureCounts() is from RSubread package; only run this if that is installed
   fc <- featureCounts(files=bamFile, annot.ext=annotation, useMetaFeatures=FALSE)
   #replace fc with the one loaded from featureCounts if you are using your own data
   sm <- generateStrandModel(startBase=1, endBase=195471971,
    fc=musCh1fc, chr="chr1", strand="-", scaling=100000)
   sm1 <- generateStrandModel(1, 195471971, musCh1fc, "chr1", "+")
   sm2 <- generateStrandModel(3000000, 3217000, musCh1fc, "chr1", "-")

## End(Not run)

hyf97ca/hotgenes documentation built on Dec. 8, 2019, 12:41 p.m.