Folder structure:
__init__.py is a blank file.
├── RandInit_HMM_Py
│ ├── __init__.py
│ ├── demoRunPkg.py
│ ├── demoRunIn.py
|.. ├── helper.py
| # load libs | |
| library(monocle) | |
| library(HSMMSingleCell) | |
| library(rsvd) | |
| library(ggplot2) | |
| library(ggpubr) | |
| # load data | |
| data("HSMM_expr_matrix") | |
| data("HSMM_sample_sheet") |
| set.seed(1234) | |
| g <- sample_gnp(n=10, 0.15) #make_ring(10) | |
| V(g)$name <- letters[1:10] | |
| plot(g) | |
| rm_e <- combinations(n=3, r=2, v=c('b', 'i', 'c')) | |
| rm_e_do <- apply(rm_e, 1, function(r) are.connected(g, r[1], r[2])) | |
| rm_e <- rm_e[rm_e_do, ] %>% apply(., 1, paste, collapse='|') | |
| par(mfrow=c(1, 2)) | |
| plot(g) | |
| plot(g - edge(rm_e)) |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| @contact: Yun Yan ([email protected]) | |
| """ | |
| from ruffus import * | |
| from helper import * |
Folder structure:
__init__.py is a blank file.
├── RandInit_HMM_Py
│ ├── __init__.py
│ ├── demoRunPkg.py
│ ├── demoRunIn.py
|.. ├── helper.py
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| - multiprossing 101 | |
| - whether multiprocessing could contain subprocess work | |
| @contact: Yun Yan ([email protected]) | |
| """ | |
| import subprocess | |
| from multiprocessing import Pool | |
| import os |