Reputation: 33
I am having some problems with this function predORF
sqa <- c("CAGGGCACCTGGCCTTGGGATGCGCCTCCTGCCCGCTGAGCCCAGGGGCCGCTATGGCCCTTCTGGCCATGCTGGCGCTGCAGACAGCTCTCTACCTAGTAGGCTTCTTCTACCCGCCGGGAGGCATATGGCGCTGGATCACCCGGGAC")
print(sqa)
First, I transformed the sequence into the input formats
dnastring = DNAString(sqa)
print(dnastring)
dna <- DNAStringSet(sqa)
print(dna)
When I use DNAstrings format:
predORF(dnabase, n = 1, type = "grl",
mode = "orf", strand = "sense",
longest_disjoint=FALSE,
startcodon = c("ATG"),
stopcodon = c("TAA"))
I got this error
Error in predORF(dnastring, n = 1, type = "grl", mode = "orf", strand = "sense", :
Sequence name slot of x need be populated with unique names.
When I define its length, i got this:
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.
When I use DNAStringSet format:
predORF(dna, n = 1, type = "grl",
mode = "orf", strand = "sense",
longest_disjoint=FALSE,
startcodon = c("ATG"),
stopcodon = c("TAA"))
I got this error
Error in predORF(dna n = 1, type = "grl", mode = "orf", strand = "sense", :
Sequence name slot of x need be populated with unique names.
When I define its length, i got this:
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
How can I solve this issue?
Thanks in advance!
Upvotes: 1
Views: 72
Reputation: 1488
the problem is that predORF needs named sequences as input. See below:
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"))
Upvotes: 2