如何解决这些错误:x的插槽需要使用唯一的名称填充,或者下标包含越界索引,使用predORF?

如何解决这些错误:x的插槽需要使用唯一的名称填充,或者下标包含越界索引,使用predORF?,r,bioinformatics,dna-sequence,genome,R,Bioinformatics,Dna Sequence,Genome,我对这个函数predORF有一些问题 sqa <- c("CAGGGCACCTGGCCTTGGGATGCGCCTCCTGCCCGCTGAGCCCAGGGGCCGCTATGGCCCTTCTGGCCATGCTGGCGCTGCAGACAGCTCTCTACCTAGTAGGCTTCTTCTACCCGCCGGGAGGCATATGGCGCTGGATCACCCGGGAC") print(sqa) 我犯了这个错误 Error in predORF(dnastring

我对这个函数predORF有一些问题

  sqa <- c("CAGGGCACCTGGCCTTGGGATGCGCCTCCTGCCCGCTGAGCCCAGGGGCCGCTATGGCCCTTCTGGCCATGCTGGCGCTGCAGACAGCTCTCTACCTAGTAGGCTTCTTCTACCCGCCGGGAGGCATATGGCGCTGGATCACCCGGGAC") 
  print(sqa)   
我犯了这个错误

  Error in predORF(dnastring, n = 1, type = "grl", mode = "orf", strand = "sense",  : 
  Sequence name slot of x need be populated with unique names.
    
  Error in predORF(dna n = 1, type = "grl", mode = "orf", strand = "sense",  : 
  Sequence name slot of x need be populated with unique names.
    
当我定义它的长度时,我得到:

    predORF(dna[:149], n = 1, type = "grl", 
    mode = "orf", strand = "sense", 
    longest_disjoint=FALSE, 
    startcodon = c("ATG"), 
    stopcodon = c("TAA"))

  Error in predORF(dnastring[1:149], n = 1, type = "grl", mode = "orf",  : 
  Sequence name slot of x need be populated with unique names.
    predORF(dna[:149], n = 1, type = "grl", 
    mode = "orf", strand = "sense", 
    longest_disjoint=FALSE, 
    startcodon = c("ATG"), 
    stopcodon = c("TAA"))

  Error: subscript contains out-of-bounds indices
当我使用dnastingset格式时:

    predORF(dna, n = 1, type = "grl", 
    mode = "orf", strand = "sense", 
    longest_disjoint=FALSE, 
    startcodon = c("ATG"), 
    stopcodon = c("TAA"))
我犯了这个错误

  Error in predORF(dnastring, n = 1, type = "grl", mode = "orf", strand = "sense",  : 
  Sequence name slot of x need be populated with unique names.
    
  Error in predORF(dna n = 1, type = "grl", mode = "orf", strand = "sense",  : 
  Sequence name slot of x need be populated with unique names.
    
当我定义它的长度时,我得到:

    predORF(dna[:149], n = 1, type = "grl", 
    mode = "orf", strand = "sense", 
    longest_disjoint=FALSE, 
    startcodon = c("ATG"), 
    stopcodon = c("TAA"))

  Error in predORF(dnastring[1:149], n = 1, type = "grl", mode = "orf",  : 
  Sequence name slot of x need be populated with unique names.
    predORF(dna[:149], n = 1, type = "grl", 
    mode = "orf", strand = "sense", 
    longest_disjoint=FALSE, 
    startcodon = c("ATG"), 
    stopcodon = c("TAA"))

  Error: subscript contains out-of-bounds indices
我如何解决这个问题


提前谢谢

问题是predORF需要命名序列作为输入。见下文:

library(Biostrings)
library(systemPipeR)

sqa <- c("ATGTAA")
sqb <- c("ATGGCCTAA")
dna <- DNAStringSet(c(seq_a = sqa, seq_b = sqb), use.names = T) 
predORF(dna, n = 1, type = "grl", 
        mode = "orf", strand = "sense", 
        longest_disjoint=FALSE, 
        startcodon = c("ATG"), 
        stopcodon = c("TAA"))
库(生物串)
图书馆(systemPipeR)
sqa