notebook
I’m a goldfish when it comes to reusing code snippets and utility functions. This notebook serves as my knowledge repository, where I document and share the techniques and command lines I frequently use but often forget, saving me from endless googling.
Categories
- R 12
- bash 9
- dataviz 8
- gallery 6
- data wrangling 5
- web development 4
- macOS 3
- alias 2
- css 2
- git 2
- slurm 2
- compute cluster 2
- vtqc 2
- html 2
- color 2
- markdown 1
- fastqc 1
- bioinfo 1
- ngs (next-generation sequencing) 1
- highcharts 1
- prettyprint 1
Notes per category
R
color palette from wesanderson
R package
The wesanderson R package offers a variety of beautiful color palettes inspired by Wes Anderson’s films, which can bring a unique and appealing aesthetic to ...
how to use pivot_wider()
in R?
In data analysis, it’s common to encounter datasets that need reshaping to make them suitable for analysis or visualization. The tidyr package in R provides ...
how to use pivot_longer()
in R?
In data analysis, it’s common to encounter datasets that need reshaping to make them suitable for analysis or visualization. The tidyr package in R provides ...
customizing heatmap with complexHeatmap
In this post, we will explore two features to customize heatmaps: customize the border of the heatmap cell display text inside each cell
get color palette with viridisLite
Choosing the right color palette is essential for effective and accessible data visualizations. The viridisLite package in R offers several color palettes: v...
combining data frames by row using dplyr::bind_rows
When working with multiple data frames in R, it is often necessary to combine them into a single data frame for analysis. The dplyr package offers a convenie...
stunning boxplots with ggplot2
Creating visually appealing boxplots in R can be easily achieved using the ggplot2 package. Here, we demonstrate how to use ggplot2 along with viridisLite an...
pretty summary table of a dataframe with gt_plt_summary
from gtExtra
R package
The gtExtras R package helps create beautiful data tables. One useful function is gt_plt_summary, which generates a summary plot for a dataFrame.
removing NA values with na.omit
in R
When working with data in R, you may encounter missing values (NAs) that need to be removed to perform certain analyses. The na.omit function is a convenient...
custom colors in heatmap with ComplexHeatmap
and colorRamp2
in R
When creating heatmaps with the ComplexHeatmap package in R, controlling the color scheme is crucial for visualizing the data effectively. The colorRamp2 fun...
merging several dataframes using plyr::join_all
in R
Merging multiple dataframes is simple with the join_all function in the plyr R package. Here’s a quick guide:
add an interactive pause in your R script
When writing R scripts, there are times when you might want to pause the execution to allow the user to read output or perform an intermediate task before co...
bash
verifying file integrity using md5sum
Ensuring file integrity is crucial, especially when transferring or downloading files. One way to verify this in Linux is by using the md5sum -c command, whi...
useful slurm commands
SLURM (Simple Linux Utility for Resource Management) is a powerful and widely used job scheduler for high-performance computing (HPC) systems. It helps manag...
essential git commands and my favorite aliases
I rely heavily on Git for version control in my projects. Over time, I’ve found certain Git commands to be indispensable and have created aliases to streamli...
a script to run fastqc on a slurm server
Hello Dr Moss,
create a symbolic link
Symbolic links (symlinks) are pointers to files or directories, helping you manage files efficiently.
access to external HD through terminal
To access your external hard drive through the terminal on macOS, you can follow these steps:
exploring directory structure with the tree
command
The tree command is a handy tool for visualizing directory structures in Unix-based systems. When combined with the --du -h options, it also displays disk us...
untrack specific files in Git
When working on a project with Git, there are times when you may want to stop tracking certain files that are already being tracked. This might be necessary ...
remove .DS_Store
files
If you’re a macOS user, you might be familiar with the hidden .DS_Store files that macOS creates in every directory to store custom attributes of a folder su...
dataviz
color palette from wesanderson
R package
The wesanderson R package offers a variety of beautiful color palettes inspired by Wes Anderson’s films, which can bring a unique and appealing aesthetic to ...
customizing heatmap with complexHeatmap
In this post, we will explore two features to customize heatmaps: customize the border of the heatmap cell display text inside each cell
get color palette with viridisLite
Choosing the right color palette is essential for effective and accessible data visualizations. The viridisLite package in R offers several color palettes: v...
stunning boxplots with ggplot2
Creating visually appealing boxplots in R can be easily achieved using the ggplot2 package. Here, we demonstrate how to use ggplot2 along with viridisLite an...
pretty summary table of a dataframe with gt_plt_summary
from gtExtra
R package
The gtExtras R package helps create beautiful data tables. One useful function is gt_plt_summary, which generates a summary plot for a dataFrame.
custom colors in heatmap with ComplexHeatmap
and colorRamp2
in R
When creating heatmaps with the ComplexHeatmap package in R, controlling the color scheme is crucial for visualizing the data effectively. The colorRamp2 fun...
gallery
customizing heatmap with complexHeatmap
In this post, we will explore two features to customize heatmaps: customize the border of the heatmap cell display text inside each cell
get color palette with viridisLite
Choosing the right color palette is essential for effective and accessible data visualizations. The viridisLite package in R offers several color palettes: v...
stunning boxplots with ggplot2
Creating visually appealing boxplots in R can be easily achieved using the ggplot2 package. Here, we demonstrate how to use ggplot2 along with viridisLite an...
pretty summary table of a dataframe with gt_plt_summary
from gtExtra
R package
The gtExtras R package helps create beautiful data tables. One useful function is gt_plt_summary, which generates a summary plot for a dataFrame.
data wrangling
how to use pivot_wider()
in R?
In data analysis, it’s common to encounter datasets that need reshaping to make them suitable for analysis or visualization. The tidyr package in R provides ...
how to use pivot_longer()
in R?
In data analysis, it’s common to encounter datasets that need reshaping to make them suitable for analysis or visualization. The tidyr package in R provides ...
combining data frames by row using dplyr::bind_rows
When working with multiple data frames in R, it is often necessary to combine them into a single data frame for analysis. The dplyr package offers a convenie...
removing NA values with na.omit
in R
When working with data in R, you may encounter missing values (NAs) that need to be removed to perform certain analyses. The na.omit function is a convenient...
merging several dataframes using plyr::join_all
in R
Merging multiple dataframes is simple with the join_all function in the plyr R package. Here’s a quick guide:
web development
add horizontal lines in HTML
with <hr>
Horizontal lines help divide content and create sections, improving readability. HTML provides an easy way to add horizontal lines using the <hr> (hori...
how to comment in a css file
Purpose of comments Comments in a CSS file are used to provide explanations or annotations within the code. They are helpful for: Describing the purpose o...
macOS
access to external HD through terminal
To access your external hard drive through the terminal on macOS, you can follow these steps:
show hidden files on Mac via Finder
To show hidden files on your Mac using Finder, simply press Cmd + Shift + .
remove .DS_Store
files
If you’re a macOS user, you might be familiar with the hidden .DS_Store files that macOS creates in every directory to store custom attributes of a folder su...
alias
essential git commands and my favorite aliases
I rely heavily on Git for version control in my projects. Over time, I’ve found certain Git commands to be indispensable and have created aliases to streamli...
remove .DS_Store
files
If you’re a macOS user, you might be familiar with the hidden .DS_Store files that macOS creates in every directory to store custom attributes of a folder su...
css
add horizontal lines in HTML
with <hr>
Horizontal lines help divide content and create sections, improving readability. HTML provides an easy way to add horizontal lines using the <hr> (hori...
how to comment in a css file
Purpose of comments Comments in a CSS file are used to provide explanations or annotations within the code. They are helpful for: Describing the purpose o...
git
essential git commands and my favorite aliases
I rely heavily on Git for version control in my projects. Over time, I’ve found certain Git commands to be indispensable and have created aliases to streamli...
untrack specific files in Git
When working on a project with Git, there are times when you may want to stop tracking certain files that are already being tracked. This might be necessary ...
slurm
useful slurm commands
SLURM (Simple Linux Utility for Resource Management) is a powerful and widely used job scheduler for high-performance computing (HPC) systems. It helps manag...
a script to run fastqc on a slurm server
Hello Dr Moss,
compute cluster
useful slurm commands
SLURM (Simple Linux Utility for Resource Management) is a powerful and widely used job scheduler for high-performance computing (HPC) systems. It helps manag...
a script to run fastqc on a slurm server
Hello Dr Moss,
vtqc
Back to top ↑html
add horizontal lines in HTML
with <hr>
Horizontal lines help divide content and create sections, improving readability. HTML provides an easy way to add horizontal lines using the <hr> (hori...
embed linkedin badge on a webpage
Add this script first on the webpage
color
color palette from wesanderson
R package
The wesanderson R package offers a variety of beautiful color palettes inspired by Wes Anderson’s films, which can bring a unique and appealing aesthetic to ...
get color palette with viridisLite
Choosing the right color palette is essential for effective and accessible data visualizations. The viridisLite package in R offers several color palettes: v...
markdown
superscript and subscript in markdown
Superscript To create superscript text in Markdown, you can use the <sup> tag: 1<sup>er</sup> This will render as: 1er
fastqc
a script to run fastqc on a slurm server
Hello Dr Moss,
bioinfo
a script to run fastqc on a slurm server
Hello Dr Moss,
ngs (next-generation sequencing)
a script to run fastqc on a slurm server
Hello Dr Moss,
highcharts
Back to top ↑prettyprint
pretty summary table of a dataframe with gt_plt_summary
from gtExtra
R package
The gtExtras R package helps create beautiful data tables. One useful function is gt_plt_summary, which generates a summary plot for a dataFrame.