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

Differing Values in QC plots #45

Closed
christopher-mohr opened this issue Aug 4, 2023 · 4 comments · Fixed by #46
Closed

Differing Values in QC plots #45

christopher-mohr opened this issue Aug 4, 2023 · 4 comments · Fixed by #46
Assignees

Comments

@christopher-mohr
Copy link

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a reprex before, start by reading https://www.tidyverse.org/help/#reprex.


Hi, I observed differences in the values in the QC plots like the ``BD` plot on repeated execution. See the code below that was executed multiple times.

library(NACHO)

# load RCC files
nacho_data <- load_rcc(data_directory = input_rcc_path,
                       ssheet_csv = input_samplesheet,
                       id_colname = "RCC_FILE_NAME")

plot_bd <- autoplot(
  object = nacho_data,
  x = "BD",
  colour = "CartridgeID",
  size = 0.5,
  show_legend = TRUE
)

I guess this might be due to the use of position_jitter(width = 0.25) in auto_plot.

position = ggplot2::position_jitter(width = 0.25)

Although a horizontal shift of the data points might be desirable, the default value of the height parameter (seems to be NULL) seems to have an effect and shift the data points verrtically as well.

This difference can be observed executing the code below.

library(ggplot2)

jitter <- position_jitter(width = 0.1)
ggplot(mtcars, aes(am, vs)) +
  geom_point(position = jitter)

jitter2 <- position_jitter(width = 0.1, height = 0.0)
ggplot(mtcars, aes(am, vs)) +
  geom_point(position = jitter2)
2023-08-04_16-49-08 2023-08-04_16-49-25

I guess this is not expected. Please let me know if you need more information.

@mcanouil
Copy link
Owner

mcanouil commented Aug 6, 2023

Thanks for the well detailed report.
CRAN is currently closed for holidays, I'll try to submit a patch in the coming weeks.
The patch should be on the main branch soon.

mcanouil added a commit that referenced this issue Aug 6, 2023
…tical dispersion points (#46)

* Increment version number to 2.0.5

* fix: set `height` in `ggplot2::position_jitter()` to `0` to avoid vertical dispersion points.

Fixes #45
@christopher-mohr
Copy link
Author

Thanks for the well detailed report. CRAN is currently closed for holidays, I'll try to submit a patch in the coming weeks. The patch should be on the main branch soon.

Thanks a lot for the quick fix. :)

@mcanouil
Copy link
Owner

mcanouil commented Aug 7, 2023

FYI, I just submitted v2.0.5 to CRAN.
Hopefully up in few days up to week since CRAN just reopened.

@mcanouil
Copy link
Owner

mcanouil commented Aug 7, 2023

It's on CRAN (https://cran.r-project.org/package=NACHO).
Just have to wait until all packages are built/complied by CRAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants