Chinese

Python模仿ggplot2的绘图包:plotnine

1 安装 2 使用 Python中有一个模仿R ggplot2语法创建的绘图包,plotnine.官网在这: https://plotnine.readthedocs.io/en/stable/ 1 安装 pip install plotinie 2 使用 from plotnine import * from plotnine.data import mtcars mtcars.head() ## name

SAM test用于差异标志物的选择

参考文献1,2. 示例代码: # Function to compute the smooth threshold curve smooth.threshold=function(x,ta,s0,df){ xp=x[x>(ta*s0)]; xn=x[x<(-ta*s0)]; dp=xp/ta-s0; dn=xn/(-ta)-s0; dp=s0/dp; dp=ta*(1+dp); dn=s0/dn; dn=ta*(1+dn); fp=pt(dp,df=df); fn=pt(dn,df=df); yp=-log10(2*(1-fp)); yn=-log10(2*(1-fn)); return(cbind(c(xn,xp),c(yn,yp))); } # Get data library(cp4p); data(LFQRatio2); tabl=LFQRatio2; ## Warning: package 'cp4p' was built under R version 3.6.1 ## Loading required package: MESS ## Warning: package 'MESS' was built under R version 3.6.1 ## Loading required

Python包及模块的导入

1 模块(module) 2 包(package) 3 常规导入 4 使用from语句导入 5 使用as语句 6 我倾向的方式 1 模块(module) 模块一般是一个

Python NumPy包总结

1 安装 2 Numpy中的数据格式 3 Numpy array基础 3.1 Array的属性 3.2 Array索引:获得其中单个元素 3.3 Array切片:获得一个subarra

Python pandas包总结

1 安装pandas 2 Pandas数据结构介绍 2.1 series 2.2 DataFrame(数据框) 2.2.1 数据框的索引和切片操作 2.3 索引(index)对象 2.3.1 Index as immutable array 2.3.2 i