PCRuniversum / chipPCR

Toolkit of helper functions to pre-process amplification data
8 stars 7 forks source link

Error in direct th.cyc test #4

Open Elena983 opened 3 months ago

Elena983 commented 3 months ago

Hi I am trying to use the th.cyc function. Could you please have a look at where may be the issue?

# Sample data for testing th.cyc directly
cyc <- 1:40
fluorescence <- c(10, 15, 20, 25, 30, 35, 40, 45, 50, 55,
                  60, 65, 70, 75, 80, 85, 90, 95, 100, 105,
                  110, 115, 120, 125, 130, 135, 140, 145, 150, 155,
                  160, 165, 170, 175, 180, 185, 190, 195, 200, 205)

# Test th.cyc function
cq_test <- tryCatch({
  th.cyc(cyc, fluorescence, auto = TRUE)@.Data[1]
}, error = function(e) {
  cat("Error in direct th.cyc test:\n")
  print(e)
  return(NA)
})

cat("Direct th.cyc test result:\n")
print(cq_test)

Error in direct th.cyc test: <simpleError in validObject(.Object): invalid class “th” object: superclass "mMatrix" not defined in the environment of the object's class>

kablag commented 3 months ago

I got> print(cq_test) [1] 13.0195 with version 1.0-- Sincerely,Konstantin Blagodatskikh.   12.06.2024, 15:42, "devSJR" @.>: On the first sight, it looks like a bigger issue that went unnoticed. There appears to be one code block missing. The code is available in older commits, but not in the latest. I need to locate the source of the problem. I will mitigate the issue but cannot name a time frame.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.>

Elena983 commented 3 months ago

Yeah, I got 1.0-2

devSJR commented 3 months ago

Currently, it seems more like there are some quirks in the code that I do not understand. Such issues should be caught by unit tests and so on. @Elena983 what is the use case for you? Maybe, I can propose an alternative solution meanwhile.

Elena983 commented 3 months ago

I found the function utilizing your package in the vignette, '0.3.9 Creating custom functions' You can have a look at it using example data from https://rdml.org/rdml_v_1_0.html