Playground
Try anything in R or Python. Plots work too. Your code is not saved, so copy anything you want to keep.
# Python playground: write any Python and press Run (Ctrl/⌘ + Enter)
import math
expression = {"TP53": 12.4, "BRCA1": 8.1, "MYC": 15.7, "GAPDH": 220.0}
for gene, value in sorted(expression.items(), key=lambda kv: -kv[1]):
print(f"{gene:6s} {value:7.1f} log2 = {math.log2(value):5.2f}")
Python 3 with the standard library; numpy, pandas and matplotlib load automatically when you import them (the first import takes a few seconds).
# R playground: write any R and press Run (Ctrl/⌘ + Enter)
expression <- c(TP53 = 12.4, BRCA1 = 8.1, MYC = 15.7, GAPDH = 220)
sort(expression, decreasing = TRUE)
round(log2(expression), 2)
barplot(log2(expression), col = "#1967da", border = NA, main = "log2 expression")
R 4.6 (webR). Base R and graphics work out of the box; webr::install("pkg") installs many CRAN packages compiled for the browser.