Commit 78d62aef authored by fc-ibb105's avatar fc-ibb105
Browse files

upgrade RNAseq and bump version to 0.3.8

parent 1aeadcbf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
Package: chaos.tools
Type: Package
Title: Tools for Chao
Version: 0.3.7
Version: 0.3.8
Author: Chao Fang
Maintainer: Chao Fang <FC-IBB105@outlook.com>
Description: The package contains some useful functions that I use to analyze high-throughput sequencing data.
+54 −9
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ c.rnaseq.old <- function(
	.[,TSS_end := TSS_start + 1]
}

c.rnaseq <- function(
c.rnaseq.core <-	function(
						dge_list = NULL,
						count_files,
						group,
@@ -214,6 +214,51 @@ c.rnaseq <- function(
	}
}

c.rnaseq <- function(
				dge_list = NULL,
				count_files,
				group,
				compare = NULL,
				organism = "human",
				gtf_dt = NULL,
				count_type = "star",
				result = "DE",
				mode = "single"
){
	if(tolower(mode) %in% c("single","s")){
		group_file_dt <- data.table(count_files,group)

		lapply(
			compare,
			\(x){
					sub_group_file_dt <- group_file_dt[group %in% unlist(strsplit(compare,"-"))]

					c.rnaseq.core(
						dge_list = dge_list,
						count_files = sub_group_file_dt$count_files,
						group = sub_group_file_dt$group,
						compare = x,
						organism = organism,
						gtf_dt = gtf_dt,
						count_type = count_type,
						result = result
					)
				}
		) |>
		rbindlist()
	}else if(tolower(mode) %in% c("multi","m")){
		c.rnaseq.core(
			dge_list = dge_list,
			count_files = count_files,
			group = group,
			compare = compare,
			organism = organism,
			gtf_dt = gtf_dt,
			count_type = count_type,
			result = result
		)
	}
}

de.dt <-	function(
				.data,