mirror of
				https://github.com/johrpan/ubigen.git
				synced 2025-10-26 19:57:24 +01:00 
			
		
		
		
	Remove mean expression from score
This commit is contained in:
		
							parent
							
								
									d495af011a
								
							
						
					
					
						commit
						780e608ee1
					
				
					 2 changed files with 4 additions and 25 deletions
				
			
		|  | @ -2,15 +2,11 @@ | ||||||
| #' @noRd | #' @noRd | ||||||
| server <- function(input, output) { | server <- function(input, output) { | ||||||
|   ranked_data <- reactive({ |   ranked_data <- reactive({ | ||||||
|     total_weight <- abs(input$cross_sample_weight) + |     total_weight <- abs(input$cross_sample_weight) + abs(input$sd_expression) | ||||||
|       abs(input$mean_expression) + |  | ||||||
|       abs(input$sd_expression) |  | ||||||
| 
 |  | ||||||
|     data <- data.table::copy(ubigen::genes) |     data <- data.table::copy(ubigen::genes) | ||||||
| 
 | 
 | ||||||
|     data[, score := |     data[, score := | ||||||
|       (input$cross_sample_weight * get(input$cross_sample_metric) + |       (input$cross_sample_weight * get(input$cross_sample_metric) + | ||||||
|         input$mean_expression * mean_expression_normalized + |  | ||||||
|         input$sd_expression * sd_expression_normalized) / |         input$sd_expression * sd_expression_normalized) / | ||||||
|         total_weight] |         total_weight] | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										23
									
								
								R/ui.R
									
										
									
									
									
								
							
							
						
						
									
										23
									
								
								R/ui.R
									
										
									
									
									
								
							|  | @ -36,35 +36,18 @@ ui <- function() { | ||||||
|             min = -1.0, |             min = -1.0, | ||||||
|             max = 1.0, |             max = 1.0, | ||||||
|             step = 0.01, |             step = 0.01, | ||||||
|             value = 1.0 |             value = 0.5 | ||||||
|           ), |  | ||||||
|           sliderInput( |  | ||||||
|             "mean_expression", |  | ||||||
|             verticalLayout( |  | ||||||
|               strong("Mean expression"), |  | ||||||
|               div(paste0( |  | ||||||
|                 "Average of the gene's expression across all ", |  | ||||||
|                 "samples." |  | ||||||
|               )) |  | ||||||
|             ), |  | ||||||
|             min = -1.0, |  | ||||||
|             max = 1.0, |  | ||||||
|             step = 0.01, |  | ||||||
|             value = 1.0 |  | ||||||
|           ), |           ), | ||||||
|           sliderInput( |           sliderInput( | ||||||
|             "sd_expression", |             "sd_expression", | ||||||
|             verticalLayout( |             verticalLayout( | ||||||
|               strong("Standard deviation"), |               strong("Standard deviation"), | ||||||
|               paste0( |               "Standard deviation of the gene's expression across all samples." | ||||||
|                 "Standard deviation of the gene's expression ", |  | ||||||
|                 "across all samples." |  | ||||||
|               ) |  | ||||||
|             ), |             ), | ||||||
|             min = -1.0, |             min = -1.0, | ||||||
|             max = 1.0, |             max = 1.0, | ||||||
|             step = 0.01, |             step = 0.01, | ||||||
|             value = -1.0 |             value = -0.5 | ||||||
|           ) |           ) | ||||||
|         ), |         ), | ||||||
|         mainPanel( |         mainPanel( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue