diff --git a/README.md b/README.md index 98cf6f4..e7c96af 100644 --- a/README.md +++ b/README.md @@ -125,8 +125,8 @@ weiss2021_vanc %>% ![](tools/readme/weiss_vancomycin_index-1.png) -For healthy children, the medain value of the index is about 0.2, -whereas it is roughly 0.85 across the samples from children with sepsis. +For healthy children, the medain value of the index is about -0.2, +whereas it is roughly -0.85 across the samples from children with sepsis. Let’s look further into how the index was calculated, and check out which bacteria were labeled as susceptible or resistant to vancomycin. @@ -246,7 +246,7 @@ Most taxa in the sample are annotated as susceptible to vancomycin, including the most abundant taxon, *Ruminococcaceae*. One taxon, RF39, is not annotated. Only a few taxa are annotated as resistant to vancomycin, thus it’s not surprising that the vancomycin index for the -sample is negative. +sample is positive. ``` r healthy6_data %>% @@ -257,13 +257,13 @@ healthy6_data %>% #> 1 0.207 ``` -How would we expect the proportions to change if the index increased to -a positive value, say 0.5? We can use `predict_abundance()` to run the +How would we expect the proportions to change if the index decreased to +a negative value, say -0.5? We can use `predict_abundance()` to run the calculation. ``` r healthy6_data %>% - mutate(predicted = predict_abundance(0.5, proportion, susceptibility)) %>% + mutate(predicted = predict_abundance(-0.5, proportion, susceptibility)) %>% rename(observed = proportion) %>% pivot_longer( c(observed, predicted), names_to = "method", values_to = "abundance") %>% @@ -283,11 +283,11 @@ the taxon that’s not annotated, RF39 (near the middle), the abundance has not changed at all. To finish, let’s re-calculate the vancomycin index for our predicted -abundances, so we can verify that it has the expected value of 0.5. +abundances, so we can verify that it has the expected value of -0.5. ``` r healthy6_data %>% - mutate(predicted = predict_abundance(0.5, proportion, susceptibility)) %>% + mutate(predicted = predict_abundance(-0.5, proportion, susceptibility)) %>% summarise(vanc = mirix_vancomycin(predicted, lineage)) #> # A tibble: 1 × 1 #> vanc