Commit 784845ae authored by fc-ibb105's avatar fc-ibb105
Browse files

rename gtf to c.gtf

parent bc61efd7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -34,12 +34,12 @@ c.rnaseq <- function(
	x$samples$group <- group

	if(count_type %in% c("star","featurecounts")){
		gtf_info <- gtf(organism,"gene") %>% 
		gtf_info <- c.gtf(organism,"gene") %>% 
					as.data.table() %>% 
					.[,.(gene_id,gene_name,type = gene_type,chr = seqnames,start,end,strand)] |>
					setkey(gene_id,gene_name)
	}else if(count_type == "salmon"){
		gtf_info <- gtf(organism,"transcript") %>% 
		gtf_info <- c.gtf(organism,"transcript") %>% 
					as.data.table() %>% 
					.[,.(gene_id = transcript_id,gene_name = transcript_name,type = transcript_type,chr = seqnames,start,end,strand)] |>
					setkey(gene_id,gene_name)
@@ -703,12 +703,12 @@ c.rnaseq_multi <- function(

	if(is.null(gtf_dt)){
		if(count_type %in% c("star","featurecounts")){
			gtf_dt <-	gtf(organism,"gene") %>% 
			gtf_dt <-	c.gtf(organism,"gene") %>% 
						as.data.table() %>% 
						.[,.(gene_id,gene_name,type = gene_type,chr = seqnames,start,end,strand)] |>
						setkey(gene_id,gene_name)
		}else if(count_type == "salmon"){
			gtf_dt <-	gtf(organism,"transcript") %>% 
			gtf_dt <-	c.gtf(organism,"transcript") %>% 
						as.data.table() %>% 
						.[,.(gene_id = transcript_id,gene_name = transcript_name,type = transcript_type,chr = seqnames,start,end,strand)] |>
						setkey(gene_id,gene_name)
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ dtu_analysis <- function(

	if(!dir.exists(out_dir)){dir.create(out_dir)}

	tx2gene <-	gtf(organism,"transcript") |>
	tx2gene <-	c.gtf(organism,"transcript") |>
				move_columns_to_front(
					columns = c("transcript_name", "gene_name")
				)
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ tx2gene <- function(organism){
					)

	if(!file.exists(tx2gene_file)){
		tx2gene <-	gtf("mouse") |>
		tx2gene <-	c.gtf("mouse") |>
					as.data.frame() |> 
					move_columns_to_front(
						columns = c("transcript_name", "gene_name")
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ gene_density_calc <- function(
				setkey()

	gene_info_raw <-	as.data.table(
							gtf(organism,"gene")
							c.gtf(organism,"gene")
						)[
							.(chr = as.character(seqnames), start, end, gene_name,strand)
						]
+3 −3
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ c.anno <- function(organism,type = NA){
	}
}

gtf <-	function(
c.gtf <-	function(
				organism,
				type = NA
){