StadlerlabRice / WW-CoV2-project

Plotting qPCR and ddPCR data for WWTPs
0 stars 1 forks source link

LOQ calculation in terms of copies/ul RNA is too complex. Simplify it to droplets only #48

Closed ppreshant closed 2 years ago

ppreshant commented 3 years ago

DZ's LOD calculations in the function append_LOD_info() is taking the wells with 3 droplets treating their copies/ul avg number as the LOD. Is there a better way to calculating this?

code used for the calculation shown here

Pull any rows with 3 droplets a.k.a the LOQ
  threes <- fl %>% filter(Positives == 3)
 If no rows has 3 droplets then the concentration is hard coded to 6
 Otherwise, take the mean of 3 droplet concentrations

 if(dim(threes)[1] == 0) {
    three_copies <- 0.7
  } else {
    three_copies <- mean(threes$`Copy #`)
  }

Here's the summary of LOD method after discussing with Adam Brown and Zach - LOD LOQ detailed calculations

ppreshant commented 2 years ago

Fixed with 40b46ed3ba7078b3cad319f35e616a4619ea9e18 ; 539224f092e24787cc41d4e85c72d07044cc43ca

LOD copies/ul RNA = LOD|droplet / [0.86 nl/droplet x n total droplets x 10/22 fraction of template within droplet] = LOD|droplet / 1e-3 ul/nl x (0.39091 x n)

Briefly the final formula are :

LOD_droplets = 3 + max(negative_controls$PositiveDroplets)
avg_inverse_total_droplet_count <- mean(1/fl$AcceptedDroplets)
LOD = LOD_droplets * 2558.14 * avg_inverse_total_droplet_count # see the LOD googledoc for details