Study

Bymunije

4 minute read

"tab_size": 4,
"translate_tabs_to_spaces": true

2. 个性化设置

{
	"color_scheme": "Packages/Predawn/predawn.tmTheme",
	"font_face": "Microsoft Yahei Mono",
	"font_size": 11,
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"ignored_packages":
	[
	],
	"line_padding_top": 3,
	"show_encoding": true,
	"show_line_endings": true,
	"theme":…
Bymunije

3 minute read

write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",eol = "\n", na = "NA", dec = ".", row.names = TRUE,col.names = TRUE, qmethod = c("escape", "double"))

函数Write.table()的选项值及说明:

Bymunije

1 minute read

sudo apt-get install gdebi-core
sudo apt-get install libapparmor1

1.3.1) 下载目前最新版1.1.383

wget -P /home/user/software https://download2.rstudio.org/rstudio-server-1.1.383-amd64.deb
sudo gdebi /home/user/software/rstudio-server-1.1.383-amd64.deb

1.3.2) 下载旧版本

wget http://download2.rstudio.org/rstudio-server-0.97.551-amd64.deb
gdebi rstudio-server-0.97.551-amd64.deb

安装完成后,Rstudio Server会自动启动运行

Bymunije

2 minute read

1)cd到你的本地项目根目录下(或者cd加空格再把项目的文件夹直接拖进终端里,然后回车)

Bymunije

3 minute read

scp user@hostip:server_file local_path #文件
scp -r user@hostip:server_folder local_path #文件夹

awk

1.Summary

  • $0:整行
  • 从1开始计数
  • 只能有一对单引号
  • 语句结束加分号(;)
  • 注意文件保存格式在linux和window的区别

2. Note

  • BEGIN:从第一行开始
  • FS:输入字段分隔符,默认空格
  • OFS:输出字段分隔符,默认空格
  • ||/&&: 或/与
<!-- -->
cat file.txt | awk 'BEGIN {FS="\t";OFS="\t"} {if ($20 == "%" || $20 == "%%") {$23 = $14; print $0} else if ($20 != "%" && $20 != "%%") {$23 = $22; print $0}}' > file2.txt…
Bymunije

6 minute read

split_target = open("Processing_target_nan_split.txt",'w')
with open('Processing_target_nan_withHeader.txt') as Processing_target:
	count = 0
	for line in Processing_target:
		count += 1
		try:
			line = line.replace('\n','')#去掉末尾换行符
			Target = line.split('\t')[7].split(";")[:]#split
			Index_drug = line.split("\t")[0]
			Index_cellLine = line.split("\t")[1]
			AUC = line.split("\t")[2]
			cellLine_name= line.split("\t")[5]
			DrugName…
Bymunije

4 minute read

jupyter notebook --port='20021' --ip='0.0.0.0'
  • 端口范围: SS4:20021-200030 SS1:30021-300030
  • ip: server IP

(2). 设置theme

jt -t monokai -f fira -fs 13 -cellw 90% -ofs 11 -dfs 11 -T -N 
  • fira: 字体
  • -T: 标题栏

(3). 更改主题后输出显示不全

打开custom.css文件: