This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rename -v 's/_S\d+_L001_R(\d+)_001/_$1/' *.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
fastaDict = {} | |
def fastaParser(infile): | |
currentGene = "" | |
with open(infile) as f: | |
for line in f: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reverse_complement(dna_seq): | |
return dna_seq[::-1].translate(str.maketrans('ACGT', 'TGCA')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"=============================================================================== | |
"FILE: myvimrc | |
"CREATED BY: sooop | |
"LAST UPDATEd: 2014. 04. 23. | |
"DESCRIPTION: | |
" my vimrc settting | |
" github repository : https://github.com/sooop/myvimrc.git | |
"=============================================================================== | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ------------------------------------------------------------ | |
* "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. | |
* ------------------------------------------------------------ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cube_root <- function(cube, power) { | |
return (power ^ (1/cube)) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
OlderNewer