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
  • 04:28 (UTC +09:00)
View GitHub Profile
@mbk0asis
mbk0asis / JVARKIT_compliation
Last active August 16, 2017 08:18
How to compile 'JVARKIT'
# run 'blastn' (-outfmt 5 --> XML outformat)
$ for p in ./*pa.fa;
do
blastn -outfmt 5 \
-query hg_normal_ensembl_cancerGenes_mRNA \
-subject $p \
-out $p.blast;
done
@mbk0asis
mbk0asis / Installing Oracle Java on Ubuntu14.04
Last active February 5, 2016 06:44
Installing Oracle Java on Ubuntu14.04
# Installing Oracle Java on Ubuntu14.04
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
$ sudo apt-get install oracle-java8-set-default
$ java -version
# It will output something like below:
java version “1.7.0_60″ Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
@mbk0asis
mbk0asis / multiplex cancer mutation detection
Last active April 7, 2016 10:36
multiplex cancer mutation detection
#############################################################################################
#
# Cancer Mutation Targeted NGS by Multiplex PCR
# Alignmnet on cDNA using 'Bowtie2'
# Variants analyses using 'GATK'
#
#############################################################################################
# extract cDNA sequences from COSMIC "All_COSMIC_Genes.fasta"
$ 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
# 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
#!/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
@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)
@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 / 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 / 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