seq2fft: seq2fft

View source: R/ffTrack.R

seq2fftR Documentation

seq2fft

Description

Creates ffTrack object from BSGenome or FASTA (coming soon) file

## will either convert (1) raw sequence (2) k-nucleotide context centered around base or (3) motifs defined by some dictionary (anchored at first base) into leveled ffTrack (i.e. integer track with populated levels field)

Usage

seq2fft(seq, fftpath, nnuc = 0, dict = NULL, chrsub = TRUE, neg = FALSE,
  region = NULL, mc.cores = 1, verbose = FALSE, buffer = 1e+05,
  skip.sweep = FALSE, vmode = "ubyte", min.gapwidth = 1000)

Arguments

seq

BSGenome object, ffTrack object representing genomic sequence, or (not yet supported) FASTA file

fftpath

path to ffTrack .rds that will be created by this

nnuc

how many nucleotides to left and right to enumerate

dict

this should be a character vector or DNAStringSet, overrides nnuc arg if not null

chrsub

whether to sub in / sub out 'chr' when accessing seq file

neg

whether to analyze sequence data on negative strand (i.e. motifs will be analyzed in rev complement)

region

GRanges specifying regions to limit ffTrack computation to (default is whole genome, ie seqnames of BigWig file)

mc.cores

currently mc.cores can only be one (weird mclapply bug when running)

verbose

logical flag

buffer

integer size of how big of a buffer to use when transferring data from BigWig to ffTrack object; number of bases to access at a time

skip.sweep

logical flag (default FALSE) if TRUE will skip the sweep of "region" for the portions that have non-NA values; if TRUE will not sweep for covered region, just make a whole genome file or a file across provided regions

vmode

character specifyhing vmode to use for encoding (by default double)

min.gapwidth

minimum gap-width with which to merge reference adjacent intervals, this will mildly increase the file size but reduce the range complexity of the GRanges object; flank (to reduce the range complexity of the ffdata skeleton, but increase file size)

Value

ffTrack object corresponding to the data in the BigWig file


mskilab/ffTrack documentation built on Feb. 6, 2023, 2:47 a.m.