Commit 69f0236f authored by Chaos's avatar Chaos
Browse files

modified RNA-seq.R in R

parent 59275e7e
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -477,9 +477,8 @@ sub_volcano_plot <- function(

rnaseqqc <- function(
				count_file,
				sample = NA,
				name = NA,
				group = NA,
				organism = "human",
				count_type = "star",
				plot_type = "mds"
){
@@ -496,10 +495,12 @@ rnaseqqc <- function(
		}
		g.color <- as.character(g.color)
	}

	if(is.na(sample) | length(sample) != length(count_file)){
		sample <- gsub("_ReadsPerGene.out.tab","",count_file)
	if(length(name) == 1){
		if(is.na(name)){
			name <- base_name(count_file,"ReadsPerGene.out.tab")
		}
	}


	if(tolower(count_type) == "star"){
		cols <- c(1, 2)
@@ -526,7 +527,7 @@ rnaseqqc <- function(
			cpm(log = T)

	if(plot_type == "mds"){
		plotMDS(x, labels = sample,col = g.color)
		limma::plotMDS(x, labels = sample,col = g.color)
	}else if(plot_type == "glmds"){
		Glimma::glMDSPlot(x, labels = sample, launch = F,groups = group)
		print("figure saved in ./glimma-plots")