Commit 35e05de8 authored by Chaos's avatar Chaos
Browse files

modified RNA-seq.R in R

parent 1ec568de
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -607,6 +607,7 @@ rnaseq123_multi <- function(
				group,
				compare,
				organism = "human",
				gtf_dt = NULL,
				count_type = "star"
){
	if(is.null(dge_list)){
@@ -636,6 +637,7 @@ rnaseq123_multi <- function(

	x$samples$group <- group

	if(is.null(gtf_dt)){
		if(count_type %in% c("star","featurecounts")){
			gtf_info <- gtf(organism,"gene") %>% 
						as.data.table() %>% 
@@ -647,7 +649,10 @@ rnaseq123_multi <- function(
						.[,.(gene_id = transcript_id,gene_name = transcript_name,type = transcript_type,chr = seqnames,start,end,strand)] |>
						setkey(gene_id,gene_name)
		}

	else if(file.exists(gtf)){
		gtf_info <- gtf_dt %>% 
					setkey(gene_id,gene_name)
	}

	## it will take few minutes to load the gtf_file
	## filter the unneeded rows