seqbias_fit: Fitting seqbias models

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

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

Usage

1
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.

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.

Value

A vector of reals giving the predicted sequencing bias for each position.

Note

Both the BAM file and the FASTA file should be indexed, with, 'samtools index' and, 'samtools faidx' respectively.

Author(s)

Daniel Jones dcjones@cs.washington.edu

See Also

seqbias.predict

Examples

1
2
3
4
5
6
7
8
  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 )

seqbias documentation built on Nov. 8, 2020, 5:55 p.m.