Skip to content

Instantly share code, notes, and snippets.

View darcyabjones's full-sized avatar

Darcy Jones darcyabjones

  • Toulouse, France
View GitHub Profile
@darcyabjones
darcyabjones / INFEST_select_slope_splines.R
Created April 11, 2025 07:50
A script that helps you select a good slope from INFEST results. No-one actually used it but i'm saving it for the future.
library("tidyverse")
library("ggrepel")
library("mclust")
library("mcp")
library("segmented")
library("splines")
find_segments <- function(
response,
@darcyabjones
darcyabjones / rlang_okabeito_theme.R
Created April 4, 2025 08:05
A file to setup a nice ggplot theme using Okabe-Ito (discrete/categorical) and Spectral colours (continuous).
# Just download it and `source rlang_okabeito_theme.R` to get your plots looking FAB-U-LOUS.
ggplot2::theme_set(
ggplot2::theme_bw() +
ggplot2::theme(
strip.background = element_rect(
color="black", fill="white", linewidth=0, linetype="solid"
),
rect = element_rect(
@darcyabjones
darcyabjones / RCL.R
Created April 2, 2025 15:29
Tools to help perform consensus multi-resolution clustering as described in https://doi.org/10.1101/2022.10.09.511493
# This is code to perform consensus clustering from a set of clusters from e.g. leiden clustering
# https://www.biorxiv.org/content/biorxiv/early/2022/10/11/2022.10.09.511493.full.pdf
# The basic use is as follows
#
#P1 <- factor(c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4))
#P2 <- factor(c(1, 1, 2, 1, 2, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4))
#P3 <- factor(c(1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 3, 4, 4))
#
#clustering_sets <- list("P1" = P1, "P2" = P2, "P3" = P3)
@darcyabjones
darcyabjones / molarity.ipynb
Created January 11, 2024 15:25
A handy notebook to perform molarity conversions using Sympy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darcyabjones
darcyabjones / LTR_presentation.ipynb
Last active March 17, 2025 16:21
A quick introduction to learning to rank models.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.