pos2fastq(ChIPsim)
pos2fastq()所属R语言包:ChIPsim
Convert read positions to fastq records
转换fastq记录的读取位置
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Convert read positions for a single chromosome (both strands) into read sequences + qualities and write them to file
转换为一个单一的染色体(双链)入读序列+素质读的立场和它们写入文件
用法----------Usage----------
pos2fastq(readPos, names, quality, sequence, qualityFun, errorFun,
readLen = 36, file,
qualityType = c("Illumina", "Sanger", "Solexa"), ...)
参数----------Arguments----------
参数:readPos
A list of two numeric vectors (one per strand)
名单的两个数字向量(每串一)
参数:names
List of names to use for reads in fastq file. Has to be of same shape as name.
列表读取fastq文件中使用的名称。具有相同的形状name。
参数:quality
Passed on as argument to qualityFun.
qualityFun作为参数传递。
参数:sequence
Reference sequence (a DNAString object).
参考序列(DNAString对象)。
参数:qualityFun
Function to generate quality scores.
函数生成的质量得分。
参数:errorFun
Function to introduce sequencing errors.
功能介绍测序错误。
参数:readLen
Read length to generate.
阅读长度生成。
参数:file
Output file (either file name or connection).
输出文件(或者文件的名称或连接)。
参数:qualityType
Encoding to use for read quality scores.
使用的编码阅读质量分数。
参数:...
Further arguments (see Details).
进一步的论点(见详情)。
Details
详情----------Details----------
Arguments passed as part of ... will be passed on to qualityFun, except an argument called prob which is passed on to errorFun instead if present.
参数传递的一部分......将传递给qualityFun,称为prob被传递,而不是如目前errorFun参数除外。
值----------Value----------
Invisibly returns the number of records that were written.
无形地返回了书面记录的数量。
作者(S)----------Author(s)----------
Peter Humburg
参见----------See Also----------
See readError for a possible choice of errorFun and readQualitySample for a simple qualityFun.
看到一个简单的readError errorFun的readQualitySample和qualityFun可能的选择。
举例----------Examples----------
set.seed(1)
## a function to generate random read qualities (in Sanger format)[#函数来生成随机读取素质(桑格格式)]
randomQuality <- function(read, ...){
paste(sample(unlist(strsplit(rawToChar(as.raw(33:126)),"")),
length(read), replace = TRUE), collapse="")
}
## generate a reference sequence[#生成一个参考序列]
chromosome <- DNAString(paste(sample(c("A", "C", "G", "T"),
1e5, replace = TRUE), collapse = ""))
## and a few read positions[#和一些阅读的位置]
reads <- list(sample(100:9900, 5), sample(100:9900, 5))
names <- list(paste("read", 1:5, sep="_"), paste("read", 6:10, sep="_"))
## convert to fastq format[#转换为fastq格式]
pos2fastq(reads, names, sequence=chromosome, qualityFun=randomQuality,
errorFun=readError, file="")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|