전체 글58 [Azure, jupyter] Azure 클라우드에서 jupyter 서버열고 외부에서 접속하는 방법 X를 이용하여 X forwarding을 하면서 분석을 할 수도 있지만 jupyter를 이용하여 접근하는 것이 더 깔끔할 것 같아 설정해 보았다. 우선 conda 를 이용해서 jupyter-lab을 설치한다. 그다음 jupyter 설정 파일을 만든다. jupyter-lab --generate-config jupyter_lab_config.py 를 실행한다. 이렇게 해서 jupyter 용 configure 파일을 만든 다음 config.py 에서 다음을 변경한다. '*'는 모든 ip 로부터의 접근을 허용한다는 의미이므로 ip를 제한하고 싶으면 해당 ip 만 적어주도록 한다. ## The IP address the Jupyter server will listen on. # Default: 'localhost'.. 2021. 3. 22. [pandas, matplotlib] bed 파일을 읽어 들여서 모두 한번에 line plot 하기 코드 import pandas as pd import matplotlib.pyplot as plt import glob def gen_readcnt_df(file_list): """ file_list: bed 파일에 대한 리스트 bed file 형식: chrname시작끝영역내read의 갯수 특별히 bed 에는 header 행은 없는 상태임 """ res = None for bed in file_list: colname = bed.split("/")[-1].split(".")[0] aa = pd.read_csv(bed, sep="\t", header=None, index_col=(0,1,2), names=("chrn","init","end",colname)) if res is None: res = aa e.. 2021. 3. 22. 이전 1 ··· 12 13 14 15 다음