Learn R Programming

seqbias (version 1.20.0)

seqbias.fit: Fitting seqbias models

Description

Fits a seqbias module given a reference sequence and reads in BAM format

Usage

seqbias.fit(ref_fn, reads_fn, n = 1e5, L = 15, R = 15)

Arguments

ref_fn
filename of a reference sequence against which the reads are aligned, in FASTA format.
reads_fn
filename of aligned reads in BAM format.
n
train on at most this many reads.
L
consider at most L positions to the left of the read start.
R
consider at most R positions to the right of the read start.

Value

position.

Details

A Bayesian network is trained on the first n unique reads in the provided BAM file, predicting the posterior probability of a read beginning at a position given the surrounding sequence. This is used to discern the sequencing bias: how more or less likely a read is to fall on a particular position.

The abundance of region can be more accurately assessed by normalizing (dividing) each position by its predicted bias.

See Also

seqbias.predict

Examples

Run this code
  reads_fn <- system.file( "extra/example.bam", package = "seqbias" )
  ref_fn <- system.file( "extra/example.fa", package = "seqbias" )

  sb <- seqbias.fit( ref_fn, reads_fn )

  I <- GRanges( c('seq1'), IRanges( c(1), c(5000) ), strand = c('-') )

  bias <- seqbias.predict( sb, I )

Run the code above in your browser using DataLab