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

Added batch Correction as an option to processing the data #195

Merged
merged 10 commits into from
Jul 4, 2024

Conversation

PaulJonasJost
Copy link
Collaborator

  • Batch Correction based on a singular column
  • First batch correction -> preprocessing, though basic filtering is done before as well.
  • Keep DESeq from using batch in combination with any factor already chosen
  • added option to switch between processed or batch corrected processed data
  • improved error catching in those two cases
  • to keep in mind: deseq's vet transformation is independent of model matrix, thus batch correction here has for now no effect. This was our current approach, should we change it now?

Copy link
Collaborator

@LeaSeep LeaSeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needed:

  • Note of batch correction to html report
  • Bacth correction as part of preprcoessing in downloadable snippets
  • sva as new package to renv (I updated it locally but there where also other update - would suggest to open a separate issues + PR to first check whether everything works fine with the new updated packakes)
  • When testing - sva puts out interesting info messages : e.g.: Found4batches Adjusting for0covariate(s) or covariate level(s) Standardizing Data across genes Fitting L/S model and finding priors Finding parametric adjustments Adjusting the Data => maybe add to info box of general statistics
  • using batch corrected data on sample correlation does not work (test dada, filtering none, batch experiment)
  • PCA using batch data also did not work

Stopped further checking here

@LeaSeep LeaSeep self-assigned this Jul 2, 2024
Copy link
Collaborator

@LeaSeep LeaSeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still to do:

  • Now on PCAs I get the error [1] "Do LoadingsPlot an issue?" Warning: Error in match.fun: 'ggfun("scales_transform_df")' is not a function, character or symbol 108: stop 107: match.fun 106: lapply 105: ggplotly_build 104: gg2list 103: ggplotly.ggplot 101: renderPlotly [R/pca/server.R#472] 100: func 97: shinyRenderWidget 96: func 83: renderFunc 82: output$PCA-PCA_plot 1: runApp (using 'cell' as batch and 'filter only'

  • Single Gene Vis . shows error on top of sidebar missing value where TRUE/FALSE needed (can't choose batch corrected)

@PaulJonasJost
Copy link
Collaborator Author

  • Now on PCAs I get the error [1] "Do LoadingsPlot an issue?" Warning: Error in match.fun: 'ggfun("scales_transform_df")' is not a function, character or symbol 108: stop 107: match.fun 106: lapply 105: ggplotly_build 104: gg2list 103: ggplotly.ggplot 101: renderPlotly [R/pca/server.R#472] 100: func 97: shinyRenderWidget 96: func 83: renderFunc 82: output$PCA-PCA_plot 1: runApp (using 'cell' as batch and 'filter only'

Could not reproduce this error with test data using cell and filter only... Is it perhaps also a version thing?

  • Single Gene Vis . shows error on top of sidebar missing value where TRUE/FALSE needed (can't choose batch corrected)

Solved this. Was a weird thing.

# Conflicts:
#	program/shinyApp/R/pre_processing/ui.R
#	program/shinyApp/R/sample_correlation/server.R
#	program/shinyApp/ui.R
@PaulJonasJost PaulJonasJost merged commit 0c380b2 into develop Jul 4, 2024
1 check failed
@PaulJonasJost PaulJonasJost deleted the batch_effects branch July 4, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants