From 9e0a6fbc3676af01f8a240d780aee23b0b70b12b Mon Sep 17 00:00:00 2001 From: Simeon <51403284+simeross@users.noreply.github.com> Date: Fri, 27 Oct 2023 21:26:36 +0200 Subject: [PATCH] ORFik addition --- DESCRIPTION | 1 + NAMESPACE | 1 + R/find_longest_orf.R | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d286e2b..37f6494 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,6 +32,7 @@ Imports: ggplot2, ggtree, magrittr, + ORFik, phangorn, purrr, readr, diff --git a/NAMESPACE b/NAMESPACE index 484c11a..cbd2680 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 07b7eac..8f959d3 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))], -- GitLab