diff --git a/DESCRIPTION b/DESCRIPTION index d286e2b15bea57373934569ba1a715415a8e1f66..37f64947b4c5ca118640cce776e8e0369d3df532 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,6 +32,7 @@ Imports: ggplot2, ggtree, magrittr, + ORFik, phangorn, purrr, readr, diff --git a/NAMESPACE b/NAMESPACE index 484c11a96af070e35733e807df0f1da8c84aeb00..cbd2680d74e8c7c21554c9d42796b987406114a3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -64,6 +64,7 @@ importFrom(DECIPHER,AlignSeqs) importFrom(DECIPHER,DistanceMatrix) importFrom(GenomicRanges,GRanges) importFrom(IRanges,ranges) +importFrom(ORFik,findORFs) importFrom(ape,as.DNAbin) importFrom(cowplot,draw_label) importFrom(cowplot,get_legend) diff --git a/R/find_longest_orf.R b/R/find_longest_orf.R index 07b7eac79857b4929001b062793c95aec750ec15..8f959d3abd36998f069699f8bb05387a36c10abc 100644 --- a/R/find_longest_orf.R +++ b/R/find_longest_orf.R @@ -9,6 +9,7 @@ #' @importFrom Biostrings DNAStringSet #' @importFrom GenomicRanges GRanges #' @importFrom IRanges ranges +#' @importFrom ORFik findORFs #' @import dplyr tibble tidyr #' #' @examples @@ -18,7 +19,7 @@ #' @export find_longest_orf <- function(seqs = DNAStringSet) { # Find ORFs in the sequences, return longest ORF, and convert to a vector - orfs <- findORFs(seqs, longestORF = TRUE, startCodon = startDefinition(6)) %>% + orfs <- ORFik::findORFs(seqs, longestORF = TRUE, startCodon = startDefinition(6)) %>% unlist(use.names = TRUE) # Convert the ORFs to a GRanges object orfs <- GRanges(seqnames = names(seqs)[as.integer(names(orfs))],