Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SimRAD用户:fasta导入以防止insilico.digest strsplit错误_R_Bioconductor_Strsplit - Fatal编程技术网

SimRAD用户:fasta导入以防止insilico.digest strsplit错误

SimRAD用户:fasta导入以防止insilico.digest strsplit错误,r,bioconductor,strsplit,R,Bioconductor,Strsplit,我正在尝试使用下面的代码对包SimRAD中的RADseq运行进行硅内消化。我认为问题在于数据的加载-我不断得到以下错误: strsplit中的错误(DNAseq,split=recognition\u code,fixed=FALSE,perl=FALSE): 非字符参数 在我的Fasta文件中,我的Fasta头是: gi 32456060 emb BX526834微小隐孢子虫6号染色体 我把所有的都拿走了,和|之前在文件名中,正如我读到的那样|尤其可能导致strsplit错误 不幸的是,我发现

我正在尝试使用下面的代码对包SimRAD中的RADseq运行进行硅内消化。我认为问题在于数据的加载-我不断得到以下错误:

strsplit中的错误(DNAseq,split=recognition\u code,fixed=FALSE,perl=FALSE): 非字符参数

在我的Fasta文件中,我的Fasta头是: gi 32456060 emb BX526834微小隐孢子虫6号染色体 我把所有的都拿走了,和|之前在文件名中,正如我读到的那样|尤其可能导致strsplit错误

不幸的是,我发现的SimRAD文档中没有一个处理过这个问题,我在论坛上发现的所有strsplit错误都与相当不同的示例类型相关,我无法确定要更改或修改什么以防止错误

以下是包含所需软件包的代码:

    ###-----Start Code
    source("http://bioconductor.org/biocLite.R")
    biocLite("Biostrings")
    biocLite("ShortRead")

    install.packages("~/Downloads/SimRAD_0.95.tgz", repos = NULL)

    library(Biostrings)
    library(ShortRead)
    library(seqinr)
    library(SimRAD)

    #Restriction Enzyme 1
    #MseI #
    MseIcs_5p <- "T"
    MseIcs_3p <- "TAA"
    #Restriction Enzyme 2
    #EcoRI#
    EcoRIcs_5p <- "G"
    EcoRIcs_3p <- "AATTC"

    ##these are two alternative means I've tried to read in a fasta file 
    ##I believe this is the the problem line - either a new line for
    ##importing or #some subsequent line is needed to prevent the error that    
    ##follows
    CryptoParChr6 <- read.fasta(file = "filepath.fasta")
    CryptoParChr6 <- readDNAStringSet("filepath.fasta", "fasta")

    ##the error comes in at this line
    CryptoParChr6.dig <- insilico.digest(CryptoParChr6, MseIcs_5p,  
            MseIcs_3p, EcoRIcs_5p, EcoRIcs_3p, verbose = TRUE)

    ###-----End Code
###------开始代码
来源(“http://bioconductor.org/biocLite.R")
生物晶石(“生物串”)
生物晶石(“速读”)
install.packages(“~/Downloads/SimRAD_0.95.tgz”,repos=NULL)
图书馆(生物串)
图书馆(速读)
图书馆(seqinr)
图书馆(SimRAD)
#限制性内切酶1
#MseI#

MseIcs_5p您的问题与
SimRAD
包本身几乎没有关系。正如在
?insilico.digest
中明确指出的,第一个参数必须是字符串(或其向量)。例如,
read.fasta
输出
SeqFastadna
对象列表。因此,您必须提取序列本身:

myFasta     <- read.fasta(file = "filepath.fasta", as.string = 1)
mySequences <- unlist(myFasta)
myDigest    <- insilico.digest(myFasta, MseIcs_5p, MseIcs_3p, EcoRIcs_5p, EcoRIcs_3p, verbose = TRUE)
myFasta