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

update

parent ef54e49b
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -371,21 +371,23 @@ c.volcano <- function(
							)
			]

	top.genes <-	sapply(
						c("up","down"),
						\(x)
						{
	top.genes <-	c.comb_dt(compare,c("up","down")) |> 
					apply(
						1,
						\(x){
							dt[
								sub_regulation == x
								compare == x[1] & sub_regulation == x[2]
							][
								order(-abs(log2FC))
							][
								0:top_gene_number,
								gene_name
							]
							] |> 
							as.data.table() %>% 
							.[,.(gene_name = V1,sub_regulation = x[2],compare = x[1])]
						}
					)|>
					as.data.table()
					rbindlist()

	dt[
		,color := sub_regulation