Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Derivative Plots Not Displayed After Checking "Show Derivative" in Analysis Tab #198

Open
5 tasks
BollepalliPranitha opened this issue Oct 8, 2024 · 3 comments
Assignees

Comments

@BollepalliPranitha
Copy link
Collaborator

BollepalliPranitha commented Oct 8, 2024

First Derivative Plots Not Displayed After Checking "Show Derivative" in Analysis Tab

Basic Summary
In the Analysis tab, when the checkbox titled "Show derivative" is selected, the first derivative plots are not being displayed. This issue prevents users from visualizing the derivative plots, which are crucial for certain analyses.

What Must Be Changed
Investigate and resolve the issue where the first derivative plots are not rendered when the "Show derivative" checkbox is checked.
Ensure that the derivative plots are correctly generated and displayed when the checkbox is selected.
Verify that no other functionalities are affected by this change.

Expected Outcome
Once the issue is resolved, the first derivative plots should be visible in the Analysis tab whenever the "Show derivative" checkbox is selected. Users should be able to view and interact with the derivative plots without encountering errors.

Acceptance Criteria

  • Derivative Plot Rendering- The first derivative plots should be displayed immediately upon selecting the "Show derivative" checkbox.
  • Checkbox Functionality- Ensure that checking and unchecking the "Show derivative" box toggles the display of the derivative plots as expected.
  • No Impact on Other Features- The fix should not interfere with other functionalities in the Analysis tab or elsewhere in the software.

Subtasks

  • Provide detailed analysis and debugging logic, and suggestions for fixes
  • Derivative Plot Rendering
@kate-holdener
Copy link
Contributor

@BollepalliPranitha @srepalli3 can you provide exact detailed steps (with screenshots) for replicating this issue, including the data to upload.

@BollepalliPranitha
Copy link
Collaborator Author

@kate-holdener
Dataset to upload:
AYGU-1_MeltR.csv
1. Input the following details in the file section
No Blanks
Wavelength – 260
Nucleic acid type – RNA
Sequence –GACUAGUU
Molecular state - Homoduplex
image
image
2.click on Upload dataset
image
3. After the results are displayed, Go to Analysis/Graphs tab
image
4.click on sample 1 , show derivative
image
Derivatives are not shown

check for sample 3
image
derivatives are dispalyed

Old dataset to which the derivates worked :
test.csv

@kate-holdener
Copy link
Contributor

@srepalli3 @BollepalliPranitha
Running this through a debugger in RStudio, for sample 1, I see the following value for derivativeYData[[1]]:

[[1]]
  [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [44] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
 [87] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[130] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[173] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[216] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[259] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[302] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[345] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[388] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[431] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[474] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[517] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[560] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
[603] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA

derivativeYData is calculated as:

derivativeYData[[sampleNum]] <<- data$dA.dT / (data$Pathlength * data$Ct) / upper + min(data$Absorbance)

Looking at individual values within this calculation, I see the following variables set to NA:

upper
min(data$Absorbance)

While data$Absorbance has some NA values, some of the values are floating point numbers. I am guessing that the min function treats NA as the smallest thing. I am guessing the same happens with the max function, because in the following expression evaluates to NA:

upper <- max(data$dA.dT) / max(data$Ct) + coeff

While data$dA.dT and data$Ct have some NA and some real values, the max function returns NA.

When looking at the same data on plots that work, there are no NA values in the data, which is why they work. Use a debugger in RStudio to see this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
3 participants