Skip to content

Commit

Permalink
Generate UUID for gene_id in transform_input.list method when input c…
Browse files Browse the repository at this point in the history
…lass is numeric
  • Loading branch information
ruthkr committed Mar 20, 2024
1 parent 3b50676 commit 7369e7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/process_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,20 @@ transform_input.list <- function(input, reference, query) {

# Numeric input
if (all(elements_class$reference == "numeric", elements_class$query == "numeric")) {
gene_uuid <- paste0(sample(c(letters[1:6], 0:9), 8, replace = TRUE), collapse = "")

input <- rbind(
# Reference data
data.frame(
gene_id = "A",
gene_id = gene_uuid,
accession = reference,
timepoint = seq_along(input$reference),
replicate = 1,
expression_value = input$reference
),
# Query data
data.frame(
gene_id = "A",
gene_id = gene_uuid,
accession = query,
timepoint = seq_along(input$query),
replicate = 1,
Expand Down

0 comments on commit 7369e7f

Please sign in to comment.