Skip to content
Snippets Groups Projects
Commit 9e0a6fbc authored by Simeon's avatar Simeon
Browse files

ORFik addition

parent 4418dc8a
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ Imports:
ggplot2,
ggtree,
magrittr,
ORFik,
phangorn,
purrr,
readr,
......
......@@ -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)
......
......@@ -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))],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment