Skip to content

Commit

Permalink
Ref parsing WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mariya committed Sep 18, 2024
1 parent 7059c36 commit 7511132
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/preprocessing/2_parse_ref.r
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")

0 comments on commit 7511132

Please sign in to comment.