Commit f4f2d324 authored by fc-ibb105's avatar fc-ibb105
Browse files

modified gtf.R in R

parent f5047d54
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ gtf <- function(
				paste0(".",.,collapse = "")

	rds_file <-	paste0(
					chaos_info("data_dir"),
					c.info("data_dir"),
					"/",
					ref,
					".gencode.",
@@ -50,7 +50,7 @@ gtf <- function(
	}else{
		if(length(type) == 0){type <- NULL}
		gtf <- BiocIO::import(gtf_file,feature.type = type)
		chaos_create_dir(chaos_info("data_dir"))
		chaos_create_dir(c.info("data_dir"))
        saveRDS(gtf,rds_file,compress = "xz")
		print(paste0(rds_file," saved"))
		gtf
@@ -63,7 +63,7 @@ txdb <- function(
			ref = NA
){
	txdb_file <-	file.path(
						chaos_info("data_dir"),
						c.info("data_dir"),
						paste0(
							c.basename(gtf_file,".gz"),
							".txdb"
@@ -73,7 +73,7 @@ txdb <- function(
	if(file.exists(txdb_file)){
		loadDb(txdb_file)
	}else{
		chaos_info("data_dir") |> chaos_create_dir()
		c.info("data_dir") |> chaos_create_dir()
		txdb <-	gtf_file |>
				makeTxDbFromGFF(
					dataSource = c.basename(gtf_file,".gz"),