Skip to content

Instantly share code, notes, and snippets.

View mbk0asis's full-sized avatar

Byungkuk Min mbk0asis

  • Korea Research Institute of Bioscience and Biotechnology (KRIBB)
  • Daejeon, S.Korea
  • 12:42 (UTC +09:00)
View GitHub Profile
@mbk0asis
mbk0asis / ER
Last active September 7, 2016 00:30
R code used to analyse Endoplasmic Reticulum genes
cntNorm_ER <- read.csv("/home/bio1/00-NGS/RNAseq/single_ICM_TE/DESeq/cntNorm_ER.csv",row.names = 1)
head(cntNorm_ER)
colnames(cntNorm_ER)=c("ii1","ii2","ii3","ii4","ii5","ii6","ii7",
"ii8","ii9","ii10","ii11","ii12","ii13","ii14",
"ii15","ii16","ii17","ii18","ii19","ii20","ii21",
"ti1","ti2","ti3","ti4","ti5","ti6","ti7",
"ti8","ti9","ti10","ti11","ti12","ti13","ti14",
"ti15","ti16","ti17","ti18","ti19","ti20","ti21",
"in1","in2","in3","in4","in5","in6","in7",
@mbk0asis
mbk0asis / DESeq2
Last active September 1, 2016 10:14
#source("http://bioconductor.org/biocLite.R")
#biocLite(c("DESeq2","gplots","pcaExplorer","bovine.db"))
#biocLite("calibrate")
#biocLite("AnnotationFuncs")
library(DESeq2)
#library(pcaExplorer)
#library(bovine.db)
library(ggplot2)
library(gplots)
@mbk0asis
mbk0asis / heatmap.2 cluster information
Created May 27, 2016 00:51
identifying members of clusters in heatmap.2
library(gplots)
dta<-mouse_epi_HTT
breaks=c(seq(-2,-0.5,length=100),seq(-0.5,0.5,length=100),seq(0.5,2,length=100)) # manual range setting
my_color <- colorRampPalette(c("blue","white","red"))(n = 299)
#rc <- rainbow(nrow(dta), start=0, end=.3)
#cc <- rainbow(ncol(dta), start=0, end=.1)
@mbk0asis
mbk0asis / mp_primer_v2.sh
Last active November 14, 2017 16:58
Batch bisulfite primer design tool version 2 (NEW : Multiple results per template, allowed to set number of C's within a primer)
#!/bin/bash
printf "\n *** BIS BATCH PRIMER version 2.0 ***"
printf "\n\n !!! 'Primer3 & fastx-toolkit' must be installed on the system.\n\n !!! Edit parameters (e.g. sizes, Tm, and etc) before start\n\n "
printf "\n\n Usage : \n ./mp_primer.sh FASTA PARAMETER \n\n"
printf " >>> input FASTA = "$1
printf " \n >>> parameters = "$2
printf "\n\n\n ()()() Running... \n\n"
if [ -f $1 -a -f $2 ]; then
@mbk0asis
mbk0asis / mp_primer
Created April 26, 2016 06:46
mp_primer
#!/bin/bash
clear
printf "\n *** MULTIPLEX PCR PRIMER GENERATOR ***"
printf "\n\n !!! 'Primer3 & fastx-toolkit' must be installed on the system.\n\n !!! Both FASTA & .param files must be in this directory \n\n !!! Edit parameters (e.g. size, Tm, and etc) before start\n\n "
printf "\n\n Usage : \n ./mp_primer.sh FASTA PARAMETER \n\n\n Enter to continue... "
read
@mbk0asis
mbk0asis / NanoOK
Last active April 26, 2016 07:22
NanoOK
# installation & prerequites
$ sudo apt-get update
$ sudo apt-get install last r-base r-cran-ggplot2 hdf5-tools \
texlive texlive-latex-extra default-jre git
# Insert following two lines in .profile
export NANOOK_DIR=/path/to/NanoOK
export PATH=/path/to/NanoOK/bin:$PATH
$ source .profile
@mbk0asis
mbk0asis / DESeq
Last active April 27, 2016 02:09
library(DESeq)
library(LSD)
library(ggplot2)
library(gridExtra)
library(RColorBrewer)
# open a count file
setwd('/home/bio1/00-NGS/RNAseq/bov/GSE44023_Chitwood_et_al/DESeq')
setwd('/home/bio1/00-NGS/Cancers/cancer_met_Kyuheum')
countsTable<- read.csv("final.final.csv",row.names=1)
#!/bin/bash
clear
printf '\n\n # cov2bedGraph_highCpG # \n\n # This will convert .cov files from "bismark_methylation_extractor" into .bedGraph files \n\n # Methylation percent will be calculated in selected windows containing specified number of CpGs \n\n # Change reference genome directory before start'
printf '\n\n\n\n\n\n <><><> Sliding Window Parameters <><><> \n\n'
printf '\n\n >>> Enter window size in bp : \n\n'
read win
printf '\n\n >>> Enter slide size in bp : \n\n'
read slide
# replace 100th character (strings and/or numbers) to "M"
$ sed 's/./M/100' input
###############################
$ awk '{ if ($0 ~ /^>/) { print $0; } \ # if the line starts with ">", print all
else { printf("%s%c%s\n", substr($0, 1, 2), "X", substr($0, 4, length($0))); } }' \ # else
$ trim_galore *
$ bismark_genome_preparation --bowtie2 /genome/dir/
$ bismark -u 10000 --non_directional --bowtie2 -p 8 path/to/BSgenome/dir/ Read.fq --score_min L,0,-1
# '-u' = optional option, map only randomly chosen 10000 reads
# bismark_methylation_extractor