kmer.freq(seqbias)
kmer.freq()所属R语言包:seqbias
Measuring positional kmer frequencies
测量位置kmer频率
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Given a sample of sequences and corresponding read counts, produce a table giving the position kmer frequencies relative to read starts
鉴于样本序列和相应的读取计数,产生频率相对的位置kmer读表开始
用法----------Usage----------
kmer.freq(seqs, counts, L = 50, R = 50, k = 1)
参数----------Arguments----------
参数:seqs
a list of DNAString objects.
DNAString对象名单。
参数:counts
a list of numeric vectors.
数值向量。
参数:L
how many positions to the left of the read start to consider
多少位置到左的阅读开始考虑
参数:R
how many positions to the right of the read start to consider
如何以正确的阅读开始考虑许多职位
参数:k
the size of each kmer
每个kmer的大小
Details
详情----------Details----------
Sequences and read counts are used to produce a table of aggregate kmer frequencies for each position relative to the read start. The position on which the read starts is numbered 0, positions to the left of the read are negative, and those to the right are positive.
序列和读取计数是用来产生每个位置相对的阅读开始的总kmer频率表。开始读的编号为0,位置到左读的立场是否定的,这些权利是积极的。
The sequences and counts can be generated with the provided functions scanFa and count.reads, respectively. The reverse complement of sequences on the negative strand obtained from scanFa should be used. To properly visualize bias a relatively large random sample of intervals should be generated.
所提供的功能scanFa和count.reads,分别可以生成序列和计数。从scanFa应使用取得的负链上的序列反向互补。要正确形象化偏见产生一个比较大的间隔随机抽样应。
值----------Value----------
A data frame is returned with columns pos, seq, and freq. Where pos gives the position relative to te read start, seq gives the kmer, and freq gives the frequency of that kmer.
列返回一个数据框pos,seq,freq。凡pos给出的相对位置对TE读开始,seq给的kmer,freq给人该kmer的频率。
作者(S)----------Author(s)----------
Daniel Jones
<a href="mailto:dcjones@cs.washington.edu">dcjones@cs.washington.edu</a>
参见----------See Also----------
count.reads
count.reads
举例----------Examples----------
library(Rsamtools)
reads_fn <- system.file( "extra/example.bam", package = "seqbias" )
ref_fn <- system.file( "extra/example.fa", package = "seqbias" )
I <- GRanges( c('seq1'), IRanges( c(1), c(5000) ), strand = c('-') )
ref_f <- FaFile( ref_fn )
open.FaFile( ref_f )
seqs <- scanFa( ref_f, I )
neg_idx <- as.logical( I@strand == '-' )
seqs[neg_idx] <- reverseComplement( seqs[neg_idx] )
counts <- count.reads( reads_fn, I )
freqs <- kmer.freq(seqs, counts, L = 30, R = 30, k = 2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|