Skip to content

Instantly share code, notes, and snippets.

@xie186
xie186 / README.md
Last active August 13, 2020 03:21
Example pattern image for patternomaly

color_info = [
          pattern.draw('plus', '#ff2f00'),
          pattern.draw('cross', '#67f0d2'),
          pattern.draw('dash', '#28b781'),
          pattern.draw('cross-dash', '#4b9374'),
@xie186
xie186 / .gitignore
Created April 10, 2020 20:15
Github ignore for project folder
# Ignore everything
*
# But not these files...
!*.pl
!*.py
!*.R
!*.sbatch
!*.README
!README
@xie186
xie186 / README.md
Last active March 9, 2020 21:29
Quick reference of Slurm
sbatch test.sb
squeue -u xie186
squeue -u xie186 -l
@xie186
xie186 / README.md
Last active May 16, 2024 01:42
Convert gene expression table to matrix.mtx

MTX data

%%MatrixMarket matrix coordinate ***real*** general
%
32738 2700 2286884

This line 13406 1562 6512772 tells the matrix reader that your matrix has 13406 rows, 1562 columns and 6512772 non-zeros values.

@xie186
xie186 / README.md
Created December 19, 2019 19:03
scRNA-seq conda yaml file
change "name" to the name you want


@xie186
xie186 / README.md
Last active August 25, 2021 13:02
How to install biobakery using conda
@xie186
xie186 / clusterprofiler_enrichDAVID.R
Last active November 1, 2019 02:34
GO and KEGG enrichment analysis of gene with ENSEMBL gene IDs
args <- commandArgs();
for(i in 1:length(args)){
if(args[i] == "--input") input <- args[i+1]
if(args[i] == "--output") out <- args[i+1]
if(args[i] == "--figure") fig <- args[i+1]
}
#####################################################
## https://stackoverflow.com/questions/20241065/r-barplot-wrapping-long-text-labels
@xie186
xie186 / Reference
Last active August 22, 2019 18:29
Takes hamming distance output from Mascher et al., 2013a, and a genetic map. Places each imputed marker in the most likely position in the map.
Dense genotyping-by-sequencing linkage maps of two Synthetic W7984×Opata reference populations provide insights into wheat structural diversity
https://www.nature.com/articles/s41598-018-38111-3#MOESM15