jpquast / ggplate

Create Layout Plots of Biological Culture Plates and Microplates
https://jpquast.github.io/ggplate/
Other
90 stars 6 forks source link

Plate row order messed up #23

Closed ltschmitt closed 4 months ago

ltschmitt commented 4 months ago

Describe the bug Hi, thank you very much for this package!

I updated the package today to resolve the letter issue from the previous issue report. I also saw that you fixed the inverted rows, but I am afraid that the reverted row issue is not quite resolved.

When the dataframe does not have all the rows, the position of the wells are still messed up. test

Reproduction

library(ggplate)
#> 📊 Welcome to ggplate version 0.1.3! 📈
#>                             
#> 🖍 Have fun plotting your data! 💻
library(tidyverse)

plate = structure(list(Campaign = c("CAM039", "CAM040", "CAM041", "CAM042", 
"CAM043", "CAM044", "CAM045", "CAM046", "CAM047", "CAM048", "CAM049"
), `Position Coordinates` = c("A1", "B1", "C1", "D1", "E1", "F1", 
"G1", "H1", "A2", "B2", "C2")), row.names = c(NA, -11L), class = c("tbl_df", 
"tbl", "data.frame"))

plate %>% plate_plot( position = `Position Coordinates`, value = Campaign, label = `Position Coordinates`, plate_size = 96, plate_type = "round", scale = 2)

plate %>% filter(grepl('A|B|C',`Position Coordinates`)) %>% plate_plot( position = `Position Coordinates`, value = Campaign, label = `Position Coordinates`, plate_size = 96, plate_type = "round", scale = 2)

Created on 2024-06-17 with reprex v2.1.0

Marie269 commented 4 months ago

Hello @jpquast! Thanks again so much for the package & for fixing the row label bug (I greatly appreciate it)!

Unfortunately, the new version installed from git hub today (0.1.3) still seems to have issues with the positioning on my side too. Instead of being inverted like the previous issue in 0.1.2, now all the wells just seem to be shifted down (If I have row B, C, & D filled, those positions end up being in N, O, and P, respectively).

Screenshot 2024-06-17 at 9 56 51 AM
jpquast commented 4 months ago

Thanks you two again for spotting this! As far as I can see it is fixed now in the GitHub version. At least the code now works as I intended it to work previously. Would be great if you could test it and give me feedback before I submit it to CRAN 😓.

Marie269 commented 4 months ago

@jpquast That did the trick! Thank you again so much!

ltschmitt commented 4 months ago

Thank you for this really fast fix! It works!