728x90

๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ 128

[Python] sys.path ๋ชจ๋“ˆ ์‚ฌ์šฉ, ์ƒ๋Œ€๊ฒฝ๋กœ

sys ๋ชจ๋“ˆ์„ ์ด์šฉํ•ด ์ƒ๋Œ€๊ฒฝ๋กœ ์„ค์ • ๊ฐ€๋Šฅ import sys sys.path.append('๋‚ด๊ฒฝ๋กœ') ์œ„ ์ฝ”๋“œ๊ฐ€ ๋“ค์–ด๊ฐ€๋ฉด ๋‚ด ๊ฒฝ๋กœ๊ฐ€ ํŒŒ์ผ ์‹คํ–‰ ์œ„์น˜๊ฐ€ ๋˜๊ณ  ๋‹ค๋ฅธ ํŒŒ์ผ์„ import ํ•  ๋•Œ from ~ import ~๋ฅผ ์‚ฌ์šฉํ•ด ์ƒ๋Œ€๊ฒฝ๋กœ๋กœ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๋‹ค. ex) parent ํด๋”์— child ํด๋”๊ฐ€ ์กด์žฌํ•˜๊ณ , child ํด๋” ์•ˆ์— myfuncํ•จ์ˆ˜๋ฅผ ๋‹ด์€ example.py ์žˆ๋‹ค๋ฉด import sys sys.path.append('C:/Parent') from child.example import myfunc ์œ„์ฒ˜๋Ÿผ myfuncํ•จ์ˆ˜๋ฅผ ์ƒ๋Œ€๊ฒฝ๋กœ๋กœ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ๋‹ค. ์ƒ๋Œ€๊ฒฝ๋กœ๋กœ ์ž‘์„ฑํ•˜๋ฉด ์ ˆ๋Œ€๊ฒฝ๋กœ๋กœ ๊ฒฝ๋กœ๋ฅผ ๋‹ค ์จ์ฃผ์ง€ ์•Š๊ณ ๋„ ํŽธํ•˜๊ฒŒ ํŒŒ์ผ์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ์ง€๋งŒ, ํŒŒ์ผ ์œ„์น˜๊ฐ€ ๋ฐ”๋€๋‹ค๊ฑฐ๋‚˜ ํ•˜๋ฉด ๋ถˆํŽธํ•ด์งˆ ์ˆ˜ ์žˆ๋‹ค.

[Deep Learning] Google Cloud TPU(CPU, GPU, NPU, TPU ๊ฐœ๋…)

CPU, GPU, NPU, TPU ๋ชจ๋‘ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์–ด ์—ฐ์‚ฐ์ฒ˜๋ฆฌ ๊ธฐ๋Šฅ์„ ์ˆ˜ํ–‰ํ•˜๋Š” Processing Unit์ด๋‹ค. ํ•˜์ง€๋งŒ ๋”ฅ๋Ÿฌ๋‹ ๋ชจ๋ธ ํ•™์Šต ๋ฐ ์ถ”๋ก  ์‹œ CPU๋ณด๋‹ค๋Š” ๋‹ค๋ฅธ ์œ ๋‹›์„ ํ†ตํ•ด ์—ฐ์‚ฐ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ์ผ์ด ๋งŽ๊ธฐ ๋•Œ๋ฌธ์— ๊ฐœ๋…์„ ์•Œ๊ณ ๊ฐ€์•ผํ•œ๋‹ค. CPU(Centralized Processing Unit) ์ฝ”์–ด๊ฐ€ ๋ช‡ ๊ฐœ์ธ์ง€, ํด๋ก ์Šคํ”ผ๋“œ๊ฐ€ ์–ผ๋งˆ๋‚˜ ๋˜๋Š”์ง€๊ฐ€ ์„ฑ๋Šฅ์˜ ์ง€ํ‘œ. ๊ณ ์„ฑ๋Šฅ ์ปดํ“จํ„ฐ์ผ์ˆ˜๋ก ์ฝ”์–ด์˜ ์ˆ˜๊ฐ€ ๋งŽ๋‹ค → multi-core, hyper-threading GPU(Graphic Processing Unit) CPU์™€ ๋น„์Šทํ•œ ์ ์ด ๋งŽ์ง€๋งŒ, CPU์™€ ๋‹ฌ๋ฆฌ ๊ทธ๋ž˜ํ”ฝ ๊ด€๋ จ ์ž‘์—…์ด๋‚˜ ๋ณ‘๋ ฌ์ฒ˜๋ฆฌ์— ๋งค์šฐ ํšจ๊ณผ์ ์ด๋‹ค. → ๋Œ€๊ทœ๋ชจ ๋ณ‘๋ ฌ ๊ณฑ์…ˆ NPU(Neural Processing Unit) ์ธ๊ณต์ง€๋Šฅ ๋ชจ๋ธ์˜ ์ธ๊ณต์‹ ๊ฒฝ๋ง ์—ฐ์‚ฐ์„ ํšจ์œจ์ ์œผ๋กœ..

[GitHub] ์ƒˆ๋กœ์šด ๋ธŒ๋žœ์น˜(branch) ๋งŒ๋“ค๊ธฐ

ํ˜‘์—… ์‹œ ์—ฌ๋Ÿฌ ๋ช…์ด ๋™์‹œ์— ๋‹ค๋ฅธ ์ž‘์—…์„ ํ•˜๋ ค๋ฉด branch๋ฅผ ๋งŒ๋“ค์–ด์•ผํ•œ๋‹ค. ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•˜๋ฉด ํ•œ ํ”„๋กœ์ ํŠธ๋ฅผ ์—ฌ๋Ÿฌ ๋ช…์ด์„œ ์„œ๋กœ ๋‹ค๋ฅด๊ฒŒ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค. CMD์—์„œ ์ž‘์—… 1. Branch ํ™•์ธ git branch ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค๊ธฐ ์ „์—๋Š” master ๋ธŒ๋žœ์น˜๋งŒ ์กด์žฌํ•œ๋‹ค. git branch -r : ์›๊ฒฉ ์ €์žฅ์†Œ์˜ branch ๋ฆฌ์ŠคํŠธ ํ™•์ธ git branch -a : ๋กœ์ปฌ, ์›๊ฒฉ ์ €์žฅ์†Œ์˜ branch ๋ฆฌ์ŠคํŠธ ํ™•์ธ git push origin --delete [๋ธŒ๋žœ์น˜๋ช…] : ์›๊ฒฉ ๋ธŒ๋žœ์น˜ ์‚ญ์ œ 2. Branch ์ƒ์„ฑ ๋ฐ ์ด๋™ git branch [๋ธŒ๋žœ์น˜๋ช…] ์˜ˆ์‹œ๋กœ feature๋ผ๋Š” ์ด๋ฆ„์˜ ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค์—ˆ๋‹ค. ์ƒ์„ฑ ํ›„ ๋‹ค์‹œ git branch ๋ช…๋ น์–ด๋กœ ํ™•์ธํ•˜๋ฉด feature ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ ์™„๋ฃŒ! ์ด์ œ ์ƒ์„ฑํ•œ ๋ธŒ๋žœ์น˜๋กœ ์ด..

Git 2021.02.09

[Linux] ๋Œ€์šฉ๋Ÿ‰ ํŒŒ์ผ ๋ถ„ํ• ํ•˜๊ธฐ (split ์‚ฌ์šฉ)

๋Œ€์šฉ๋Ÿ‰ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์—์„œ ํŒŒ์ผ์„ ๋ฐ›๊ฑฐ๋‚˜, ๋Œ€์šฉ๋Ÿ‰ ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ํŒŒ์ผ์„ ๋ถ„ํ• ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค. csvํŒŒ์ผ๋„ ๊ฐ€๋Šฅํ•˜๊ณ , ํŒŒ์ผ ํ™•์žฅ๋ช…์ด ์—†๋Š” ํŒŒ์ผ ๋“ฑ ๋ชจ๋“  ํŒŒ์ผ์— ๋Œ€ํ•ด ๊ฐ€๋Šฅํ•˜๋‹ค. 1. ํŒŒ์ผ ์‚ฌ์ด์ฆˆ๋กœ ๋ถ„ํ•  # 100kb ๋‹จ์œ„๋กœ ๋ถ„ํ•  split -b 100k [ํŒŒ์ผ๋ช…] # 100mb ๋‹จ์œ„๋กœ ๋ถ„ํ•  split -b 100m [ํŒŒ์ผ๋ช…] 2. ํŠน์ • ๋ผ์ธ ์ˆ˜๋กœ ๋ถ„ํ•  # 10000์ค„ ๋‹จ์œ„๋กœ ๋ถ„ํ•  split -l 10000 [ํŒŒ์ผ๋ช…] # 1000000์ค„ ๋‹จ์œ„๋กœ ๋ถ„ํ•  split -l 1000000 [ํŒŒ์ผ๋ช…]

Linux 2021.02.09

[MySQL] ๋Œ€์šฉ๋Ÿ‰ ํ…Œ์ด๋ธ” csv, txt ํŒŒ์ผ ํ˜•ํƒœ๋กœ ๋‚ด๋ณด๋‚ด๊ธฐ & ๋ถˆ๋Ÿฌ์˜ค๊ธฐ

txt ํŒŒ์ผ๋กœ ๋‚ด๋ณด๋‚ด๊ธฐ select * from [ํ…Œ์ด๋ธ”๋ช…] into outfile '[ํŒŒ์ผ๋ช…].txt' character set utf8mb4 fields terminated by ',', optionally enclosed by '"' escaped by '\\' lines terminated by '\n'; csv ํŒŒ์ผ๋กœ ๋‚ด๋ณด๋‚ด๊ธฐ select * from [ํ…Œ์ด๋ธ”๋ช…] into outfile '[ํŒŒ์ผ๋ช…].csv' character set utf8mb4 fields terminated by ',', optionally enclosed by '"' escaped by '\\' lines terminated by '\n'; txt ํŒŒ์ผ ํ…Œ์ด๋ธ”๋กœ ์ฝ์–ด์˜ค๊ธฐ load data infile '[ํŒŒ์ผ๋ช…].txt' ..

DB(Database)/MySQL 2021.02.09

Small molecule kinase inhibitor ์†Œ๋ถ„์ž ํ‚ค๋‚˜์•„์ œ ์–ต์ œ์ œ, ํ‹ฐ๋กœ์‹  ํ‚ค๋‚˜์•„์ œ ์–ต์ œ์ œ

Small Molecule Kinase Inhibitor ์†Œ๋ถ„์ž ํ‚ค๋‚˜์•„์ œ ์–ต์ œ์ œ ์‹ ํ˜ธ์ „๋‹ฌ๊ฒฝ๋กœ๋ฅผ ํ‘œ์ ์œผ๋กœ ํ•ด ๋„“์€ ์˜๋ฏธ๋กœ ์‹ ํ˜ธ์ „๋‹ฌ๊ฒฝ๋กœ ์–ต์ œ์ œ๋ผ๊ณ ๋„ ํ•จ ์•”์„ธํฌ์˜ ์„ฑ์žฅ, ๋ถ„ํ™” ๋ฐ ์ƒ์กด์— ์žˆ์–ด ์‹ ํ˜ธ์ „๋‹ฌ๊ฒฝ๋กœ์˜ ํ™œ์„ฑํ™”๊ฐ€ ์ค‘์š”ํ•œ ์—ญํ• ์„ ํ•˜๋Š”๋ฐ, ์ด ๊ฒฝ๋กœ๋ฅผ ํ™œ์„ฑํ™”์‹œํ‚ค๋Š” ์ค‘์š”ํ•œ ๋งค๊ฐœ ํšจ์†Œ๋“ค์ธ ํ‹ฐ๋กœ์‹  ํ‚ค๋‚˜์ œ, ํ”„๋กœํ…Œ์ธ ํ‚ค๋‚˜์ œ ๋“ฑ์˜ ํ™œ์„ฑ์„ ์–ต์ œํ•˜๋Š” ํ‘œ์  ์น˜๋ฃŒ์ œ Small molecule: ์ƒ๋ฌผํ•™์  ํ‘œ์ (๋‹จ๋ฐฑ์งˆ or ํ•ต์‚ฐ)๊ณผ ๊ฒฐํ•ฉํ•ด ์„ธํฌ ์‹ ํ˜ธ์ „๋‹ฌ ๋“ฑ ํ‘œ์ ์˜ ํ™œ๋™ ๋˜๋Š” ๊ธฐ๋Šฅ์„ ๋ณ€ํ™”์‹œํ‚ด, effector(์ž‘์šฉ์ธ์ž)๋กœ์„œ์˜ ์—ญํ•  ๊ฐ€๋Šฅ Kinase ํ‚ค๋‚˜์•„์ œ, ํ‚ค๋„ค์ด์Šค, ์ธ์‚ฐํ™”ํšจ์†Œ ATP: ์„ธํฌ ๋‚ด์˜ ํ™”ํ, ์—๋„ˆ์ง€๊ฐ€ ๋ณ€ํ™˜๋œ ํ˜•ํƒœ → ATP๋Š” ๋‹จ๋ฐฑ์งˆ์˜ ์ธ์‚ฐํ™” ๊ณผ์ •์„ ๊ฑฐ์ณ ์„ธํฌ ๋‚ด์˜ ์‹ ์ง„๋Œ€์‚ฌ ์กฐ์ ˆ ATP์™€ ๊ฐ™์€ ๊ณ ์—๋„ˆ์ง€ ๋ถ„์ž์˜ ์ธ์‚ฐ๊ธฐ๋ฅผ ํŠน..

Bioinfomatics 2021.02.09

SMILES ํ‘œ๊ธฐ๋ฒ•

SMILES (Simplified Molecular Inpute Line Entry System) ์กฐ์ง์ ์ธ ํ™”ํ•™๋ช…์„ ์‚ฌ์šฉํ•˜๋Š” ๋Œ€์‹ , ๊ฐ„๊ฒฐํ•œ ๋ฐฉ๋ฒ•์œผ๋กœ ๋ถ„์ž๋ฅผ ํ‘œํ˜„ํ•˜๋Š” ๋ฐฉ๋ฒ•. ์ƒˆ๋กœ์šด ์ข…๋ฅ˜์˜ ํ™”ํ•™ ๊ตฌ์กฐ๋ฅผ ๋น ๋ฅด๊ณ  ์‰ฝ๊ฒŒ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ทœ์น™ 6๊ฐ€์ง€ ๊ฐ ์›์ž๋Š” ํ‘œ์ค€ ์›์†Œ๊ธฐํ˜ธ๋กœ ๋‚˜ํƒ€๋‚ธ๋‹ค. ์ˆ˜์†Œ ์›์ž๋Š” ํ‘œ๊ธฐ๋ฅผ ์ƒ๋žตํ•œ๋‹ค. ์ด์›ƒ์— ์œ„์น˜ํ•œ ์›์ž๋Š” ์„œ๋กœ ๊ฒฐํ•ฉ๋˜์–ด ์žˆ๋‹ค. ์ด์ค‘๊ฒฐํ•ฉ์€ "="์œผ๋กœ, ์‚ผ์ค‘๊ฒฐํ•ฉ์€ "#"์œผ๋กœ ํ‘œ๊ธฐํ•œ๋‹ค. ๊ฒฐํ•ฉ ๊ฐ€์ง€๋Š” ๊ด„ํ˜ธ๋กœ ํ‘œ๊ธฐํ•œ๋‹ค. ๊ณ ๋ฆฌ ๊ตฌ์กฐ๋Š” ์„œ๋กœ ์—ฐ๊ฒฐ๋˜์–ด ์žˆ๋Š” ์›์ž์— ์ˆซ์ž๋กœ ํ‘œ์‹œํ•œ๋‹ค. ์ถœ์ฒ˜: en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system Simplified molecular-input line-entry system - Wik..

Bioinfomatics 2021.02.09

[Data Analysis] ๋ฐ์ดํ„ฐ ๋ถ„์„ ๊ณผ์ •, ์ „์ฒ˜๋ฆฌ์˜ ์ค‘์š”์„ฑ

๋ฐ์ดํ„ฐ ๋ถ„์„ ๊ณผ์ •(Data Analysis Process) 1. Goal Definition ๊ฐ๊ด€์ , ๊ตฌ์ฒด์ ์œผ๋กœ ๋ถ„์„ ๋Œ€์ƒ ์ •์˜(=๋ฌธ์ œ ์ •์˜) ํ•ด๋‹น ๋„๋ฉ”์ธ์— ๋Œ€ํ•œ ์ดํ•ด ํ•ด๋‹น ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ์ดํ•ด 2. Data Searching & Collecting ๋ฌธ์ œ ์ •์˜ ํ›„ ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ ๊ฒ€์ƒ‰ ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘ ๋ฐ ๋ฐ์ดํ„ฐ ํŒŒ์•… 3. Data Preparation ๋ฐ์ดํ„ฐ์˜ noise๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  ์›ํ•˜๋Š” ํ˜•ํƒœ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณ€ํ™˜ํ•˜๋Š” Data preprocessing(๋ฐ์ดํ„ฐ ์ „์ฒ˜๋ฆฌ ๊ณผ์ •)ํฌํ•จ ์ตœ์ข… ๋ชจ๋ธ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ๋ฐ์ดํ„ฐ ์ค€๋น„ ๋‹จ๊ณ„ ๊ด€๋ จ ๋ฐ์ดํ„ฐ๋ผ๋ฆฌ ๊ด€๊ณ„ ์„ค์ • ๋ฐ ๋ฐ์ดํ„ฐ ์ดํ•ด, ๋ฐ์ดํ„ฐ ๋ณ‘ํ•ฉ 4. Modeling ์–ด๋–ป๊ฒŒ ๋ชจ๋ธ ์„ค๊ณ„ํ• ์ง€ ๊ตฌ์„ฑ R, Python ๋“ฑ ์ด์šฉํ•ด ๋จธ์‹ ๋Ÿฌ๋‹ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋“ฑ ๋‹ค์–‘ํ•œ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ ์šฉ 5. Evaluatio..

728x90