Skip to content

Instantly share code, notes, and snippets.

View joowkim's full-sized avatar

J Kim joowkim

  • Ohio, USA
View GitHub Profile
@joowkim
joowkim / ParseFastQ.py
Created May 18, 2016 04:15 — forked from xguse/ParseFastQ.py
Simple Python FastQ Parser class
class ParseFastQ(object):
"""Returns a read-by-read fastQ parser analogous to file.readline()"""
def __init__(self,filePath,headerSymbols=['@','+']):
"""Returns a read-by-read fastQ parser analogous to file.readline().
Exmpl: parser.next()
-OR-
Its an iterator so you can do:
for rec in parser:
... do something with rec ...
# /usr/bin/bash
Line=0
for item in *.gz
do Line=`zcat $item | wc -l`
echo $item $((Line/4))
done
####### wrapper shell file ######
bash ReadCountFQ.sh > read.log
rename -v 's/_S\d+_L001_R(\d+)_001/_$1/' *.gz
import sys
fastaDict = {}
def fastaParser(infile):
currentGene = ""
with open(infile) as f:
for line in f:
def reverse_complement(dna_seq):
return dna_seq[::-1].translate(str.maketrans('ACGT', 'TGCA'))
@joowkim
joowkim / .vimrc
Created December 14, 2016 07:56 — forked from sooop/.vimrc
Just My $VIMRC
"===============================================================================
"FILE: myvimrc
"CREATED BY: sooop
"LAST UPDATEd: 2014. 04. 23.
"DESCRIPTION:
" my vimrc settting
" github repository : https://github.com/sooop/myvimrc.git
"===============================================================================
/*
* ------------------------------------------------------------
* "THE BEERWARE LICENSE" (Revision 42):
* <author> wrote this code. As long as you retain this
* notice, you can do whatever you want with this stuff. If we
* meet someday, and you think this stuff is worth it, you can
* buy me a beer in return.
* ------------------------------------------------------------
*/
Sublime Text 3 추천 설정
{
"font_face": "D2Coding",
"highlight_line": true,
"highlight_modified_tabs": true,
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": true
@joowkim
joowkim / cube_root.r
Created January 3, 2017 05:22
cube_root
cube_root <- function(cube, power) {
return (power ^ (1/cube))
}
@joowkim
joowkim / Round.go
Last active January 17, 2017 08:04
func Round(v float64, decimals int) float64 {
var pow float64 = 1
for i:=0; i<decimals; i++ {
pow *= 10
}
return float64(int((v * pow) + 0.5)) / pow
}