Skip to content

Instantly share code, notes, and snippets.

View liutiming's full-sized avatar

Tim Liu liutiming

View GitHub Profile
<details style="margin-bottom:10px;">
<summary>
Session info
</summary>
``` r
sessioninfo::session_info()
#> - Session info --------------------------------------------------------------
#> hash: motorway, flag: Ethiopia, hand with fingers splayed: medium skin tone
#>
@liutiming
liutiming / deep_learning_with_pytorch_imagesegmentation-1.ipynb
Last active September 17, 2022 15:23
Deep_Learning_with_PyTorch_ImageSegmentation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
## 20220612_samples.qc.rename.autosome_ancestryplot.R for KING Ancestry plot, by Zhennan Zhu and Wei-Min Chen
rm(list=ls(all=TRUE))
library(dplyr)
library(e1071)
options(scipen = 999)
prefix <- "20220612_samples.qc.rename.autosome"
pc <- read.table(paste0(prefix, "pc.txt"), header = TRUE)
phe <- read.table(paste0(prefix, "_popref.txt"), header = TRUE, stringsAsFactors = FALSE)
Population <- c(as.character(phe$Population), rep(NA, (nrow(pc) - nrow(phe))))
dat <- cbind(pc, Population)
@liutiming
liutiming / css-only-order-process-steps.markdown
Created July 24, 2021 12:14
CSS only order process steps

CSS only order process steps

It's been a while. Just a nice process bar here where you can click on the different steps and be presented with information. The box at the top will also animate depending on the steps.

A Pen by Jamie Coulter on CodePen.

License.

Building DAG of jobs...
Using shell: /usr/local/bin/bash
Provided cluster nodes: 500
Job counts:
count jobs
1 targets
1 try_expand
2
[Wed Sep 30 20:12:35 2020]
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32744 bytes for ChunkPool::allocate
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
Building DAG of jobs...
Using shell: /usr/local/bin/bash
Provided cluster nodes: 500
Job counts:
count jobs
1 add_column_to_bib
1 targets
2
[Sun Sep 27 07:51:11 2020]
@liutiming
liutiming / lsf.yaml
Created August 24, 2020 06:13
lsf.yaml for snakemake profile trial run
__default__:
- "-G team281"
- "-R "select[mem>30000] rusage[mem=30000]" -M 30000"
- "-q normal"
- "-e /nfs/users/nfs_t/tl11/analysis/w3/snakemake/error.log"
- "-o /nfs/users/nfs_t/tl11/analysis/w3/snakemake/output.log"
- "-J snakemake_trial"