-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
library(Rsubread) | ||
library(sva) | ||
library(ballgown) | ||
|
||
# Function to get the directory of the current script | ||
get_script_dir <- function() { | ||
cmdArgs <- commandArgs(trailingOnly = FALSE) | ||
match <- grep("--file=", cmdArgs) | ||
if (length(match) > 0) { | ||
return(dirname(normalizePath(sub("--file=", "", cmdArgs[match])))) | ||
} else { | ||
return(dirname(normalizePath(sys.frames()[[1]]$ofile))) | ||
} | ||
} | ||
|
||
# Define a constant REF_GENOME relative to the script's directory | ||
script_dir <- get_script_dir() | ||
REF_GENOME <- file.path(script_dir, "../../data/reference/Homo_sapiens.GRCh38.103.gtf") | ||
|
||
# Print the constant REF_GENOME | ||
cat("Reference Genome Path:", REF_GENOME, "\n") |