Skip to content

Instantly share code, notes, and snippets.

View chansigit's full-sized avatar
🏔️
working

Sijie Chen chansigit

🏔️
working
  • Stanford University
  • CA
  • 18:19 (UTC -07:00)
View GitHub Profile
@timedreamer
timedreamer / save_pheatmap_pdf.R
Created January 7, 2021 22:18
Save pheatmap figure into pdf
# An R function to save pheatmap figure into pdf
# This was copied from Stackflow: https://stackoverflow.com/questions/43051525/how-to-draw-pheatmap-plot-to-screen-and-also-save-to-file
save_pheatmap_pdf <- function(x, filename, width=7, height=7) {
stopifnot(!missing(x))
stopifnot(!missing(filename))
pdf(filename, width=width, height=height)
grid::grid.newpage()
grid::grid.draw(x$gtable)
@smhanov
smhanov / description.md
Last active November 7, 2023 11:52
Pipeline multiprocessing for python with generators

Pipeline multiprocessing in Python with generators

Similar to mpipe, this short module lets you string together tasks so that they are executed in parallel.

The difference is that it lets you use generators, functions which yield results instead of returning them. Each yielded item gets passed to the next stage.

You can specify that one or more copies of the workers operate on the input queue.

Things that can be in a stage

@nachocab
nachocab / immgen.tsv
Last active October 17, 2023 15:49
Human-readable version of IMMGEN annotation codes
activated_T_cells T.8Nve.Sp.OT1 spleen OT1 tg Naïve CD8 OT-I tg 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d6.LisOva spleen OT1 tg effectors CD8 day 6 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d8.LisOva spleen OT1 tg effectors CD8 day 8 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d10.LisOva spleen OT1 tg effectors CD8 day 10 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d15.LisOva spleen OT1 tg effectors CD8 day 15 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Mem.Sp.OT1.d45.LisOva spleen OT1 tg Memory CD8 day 45 Listeria.OVA 4- 8+ 45.1+ OT-I tg