Skip to content

Commit

Permalink
vectorise find_isoform bam existance check
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverVoogd committed Jul 31, 2023
1 parent d094dae commit 23320f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/find_isoform.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ find_isoform_bambu <- function(annotation, genome_fa, genome_bam, outdir, config
#' @importFrom reticulate import_from_path
#' @importFrom Rsamtools indexFa
find_isoform_flames <- function(annotation, genome_fa, genome_bam, outdir, config) {
if (!file.exists(paste0(genome_bam, ".bai"))) {
stop(c("Cannot find corresponding bam file ", genome_bam, ".bai. Cancelling find_isoform."))
if (!all(file.exists(paste0(genome_bam, ".bai")))) {
stop(c("Cannot find corresponding bam file(s) ", paste0(genome_bam, ".bai"), ". Cancelling find_isoform."))
}
isoform_annotation <- file.path(outdir, "isoform_annotated.gff3")
tss_stat <- file.path(outdir, "tss_tes.bedgraph")
Expand Down

0 comments on commit 23320f0

Please sign in to comment.