找回密码
 注册
查看: 387|回复: 0

R语言 TRAMPR包 create.diffsmatrix()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 11:43:01 | 显示全部楼层 |阅读模式
create.diffsmatrix(TRAMPR)
create.diffsmatrix()所属R语言包:TRAMPR

                                        Calculate Matrix of Distances between Peaks
                                         计算峰之间的距离矩阵

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Generate an array of goodness-of-fit (or distance) between samples and knowns based on the sizes (in base pairs) of TRFLP peaks.  For each sample/known combination, and for each enzyme/primer combination, this calculates the minimum distance between any peak in the sample and the single peak in the known.
生成一个数组善良的样品和已知的基础上的大小(碱基对)TRFLP峰之间的配合(或距离)。对于每个采样/已知的组合,并为每个酶/引物组合,这计算的任何样品中的峰值之间的最小距离和在已知的单峰。


用法----------Usage----------


create.diffsmatrix(samples, knowns)



参数----------Arguments----------

参数:samples
A TRAMPsamples object, containing unidentified samples.
ATRAMPsamples对象,含有不明身份的样本。


参数:knowns
A TRAMPknowns object, containing identified TRFLP patterns.
ATRAMPknowns对象,包含确定TRFLP模式。


Details

详细信息----------Details----------

This function will rarely need to be called directly, but does most of the calculations behind TRAMP, so it is useful to understand how this works.
此功能将很少需要直接调用,但背后的计算TRAMP,所以它是有用的,了解它是如何工作的。

This function generates a three-dimensional s x k x n matrix of the (smallest, see below) distance in base pairs between peaks in a collection of unknowns (run data) and a database of knowns for several enzyme/primer combinations.  s is the number of different samples in the samples data (length(labels(samples))), k is the number of different types in the knowns database (length(labels(knowns))), and n is the number of different enzyme/primer combinations.  The enzyme/primer combinations used are all combinations present in the knowns database; combinations present only in the samples will be ignored.  Not all samples need contain all enzyme/primer combinations present in the knowns.
这个函数生成一个三维的s x k x n矩阵未知数的集合峰之间的距离(最小的,见下文)碱基对运行数据和数据库中的已知几种酶/引物组合。 s是不同的样品的样品数据(length(labels(samples)))k是许多不同类型的已知数据库(length(labels(knowns))),和<X >是不同的酶/引物组合的数量。酶/使用的引物组合的所有组合中存在的已知数据库;组合目前只有样品中都将被忽略。不是所有的样品都需要包含在已知的酶/引物组合。

In the resulting array, m[i,j,k] is the difference (in base pairs) between the ith sample and the jth known for the kth enzyme/primer combination.  The ordering of the n enzyme/primer combinations is arbitrary, so a data.frame of combinations is included as the attribute enzyme.primer, where enzyme.primer$enzyme[k] and enzyme.primer$primer[k] correspond to enzyme and primer used for the distances in m[,,k].
以所得的数组,m[i,j,k]是i个采样和j第k个酶/引物组合的已知的差异(以碱基对为单位)之间。 n酶/引物组合的顺序是任意的,所以数据框的组合属性enzyme.primer,其中enzyme.primer$enzyme[k]和enzyme.primer$primer[k]对应的酶,引物的距离m[,,k]。

Each case in the knowns database has a single (or no) peak for each enzyme/primer combination, but each sample may contain multiple peaks for an enzyme/primer combination; the difference is always the smallest distance from the sample to the known peak.  Where a sample and/or a known lacks an enzyme/primer combination, the value of the difference is NA.  The smallest absolute distance is taken between sample and known peaks, but the sign of the difference is preserved (negative where the closest sample peak was less than the known peak, positive where greater; see absolute.min).
在已知数据库中的每一种情况下为每个酶/引物组合有一个单一的(或没有)的峰,但每个样品可能包含多个峰的酶/引物组合,不同的是总是从样品到已知的峰的最小距离。凡样品和/或公知的缺乏的酶/引物组合,该值的差异是NA。最小的绝对距离之间的样品和已知的山峰,但保留符号的区别在于(负最接近的样品峰小于已知的峰,积极作出更大的看到absolute.min)。


值----------Value----------

A three-dimensional matrix, with an attribute enzyme.primer, described above.
一种三维矩阵,与属性enzyme.primer,如上所述。


参见----------See Also----------

TRAMP, which uses output from create.diffsmatrix.
TRAMP,,使用输出create.diffsmatrix。


实例----------Examples----------


data(demo.samples)
data(demo.knowns)

s <- length(labels(demo.samples))
k <- length(labels(demo.knowns))
n <- nrow(unique(demo.knowns$data[c("enzyme", "primer")]))

m <- create.diffsmatrix(demo.samples, demo.knowns)

dim(m)
identical(dim(m), c(s, k, n))

## Maximum error for each sample/known (i.e. across all enzyme/primer[#每个样品/已知的(即在所有的酶/引物的最大误差]
## combinations), similar to how calculated by \link{TRAMP}[#组合),如何计算\链接{TRAMP}]
error <- apply(abs(m), 1:2, max, na.rm=TRUE)
dim(error)

## Euclidian error (see ?\link{TRAMP})[#的欧几里德错误(看到了吗?\链接【流浪汉})]
error.euclid <- sqrt(rowSums(m^2, TRUE, 2))/rowSums(!is.na(m), dims=2)

## Euclidian and maximum error will require different values of[#欧几里得和最大误差将需要不同的值]
## accept.error in TRAMP:[#accept.error TRAMP:]
plot(error, error.euclid, pch=".")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-30 05:02 , Processed in 0.022973 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表