highly variable gene | 高变异基因的选择 | feature selection | 特征选择
在做单细胞的时候,有很多基因属于noise,就是变化没有规律,或者无显著变化的基因。在后续分析之前,我们需要把它们去掉。
以下是一种找出highly variable gene的方法:
The feature selection procedure is based on the largest difference between the observed coefficient of variation (CV) and the predicted CV (estimated by a non-linear noise model learned from the data) See Figure S1C. In particular, Support Vector Regression (SVR, Smola and Vapnik, 1997) was used for this purpose (scikit-learn python implementation, default parameters with gamma = 0.06; Pedregosa et al., 2011).
#Pre-filtering
df_f = df_merge.copy()
df_f = df_f.ix[sum(df_f>=1, 1)>=5,:] # is at least 1 in X cells
df_f = df_f.ix[sum(df_f>=2, 1)>=2,:] # is at least 2 in X cells
df_f = df_f.ix[sum(df_f>=3, 1)>=1,:] # is at least 2 in X cells #Fitting
mu = df_f.mean(1).values
sigma = df_f.std(1, ddof=1).values
cv = sigma/mu
score, mu_linspace, cv_fit , params = fit_CV(mu,cv, 'SVR', svr_gamma=0.005) #Plotting
def plot_cvmean():
figure()
scatter(log2(mu),log2(cv), marker='o', edgecolor ='none',alpha=0.1, s=5)
mu_sorted = mu[argsort(score)[::-1]]
cv_sorted = cv[argsort(score)[::-1]]
scatter(log2(mu_sorted[:thrs]),log2(cv_sorted[:thrs]), marker='o', edgecolor ='none',alpha=0.15, s=8, c='r')
plot(mu_linspace, cv_fit,'-k', linewidth=1, label='$Fit$')
plot(linspace(-9,7), -0.5*linspace(-9,7), '-r', label='$Poisson$')
ylabel('log2 CV')
xlabel('log2 mean')
grid(alpha=0.3)
xlim(-8.6,6.5)
ylim(-2,6.5)
legend(loc=1, fontsize='small')
gca().set_aspect(1.2) plot_cvmean() #Adjusting plot

对每一个基因在不同细胞中的表达量的mean和CV散点图,通过SVR拟合出noise的曲线。
通过the largest difference between the observed coefficient of variation (CV) and the predicted CV (estimated by a non-linear noise model learned from the data)就能找出highly variable gene了。

highly variable gene | 高变异基因的选择 | feature selection | 特征选择的更多相关文章
- 选择屏幕(Selection Screen)
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- ISLR系列:(4.1)模型选择 Subset Selection
Linear Model Selection and Regularization 此博文是 An Introduction to Statistical Learning with Applicat ...
- 选择排序 Selection Sort
选择排序 Selection Sort 1)在数组中找最小的数与第一个位置上的数交换: 2)找第二小的数与第二个位置上的数交换: 3)以此类推 template<typename T> / ...
- 排序算法 - 选择排序(selection sort)
选择排序(Selection sort)跟插入排序一样,也是O(n^2)的复杂度,这个排序方式也可以用我们的扑克牌来解释. 概念 桌面上有一堆牌,也是杂乱无章的,现在我们想将牌由小到大排序,如果使用选 ...
- 简单选择排序 Selection Sort 和树形选择排序 Tree Selection Sort
选择排序 Selection Sort 选择排序的基本思想是:每一趟在剩余未排序的若干记录中选取关键字最小的(也可以是最大的,本文中均考虑排升序)记录作为有序序列中下一个记录. 如第i趟选择排序就是在 ...
- 排序算法--选择排序(Selection Sort)_C#程序实现
排序算法--选择排序(Selection Sort)_C#程序实现 排序(Sort)是计算机程序设计中的一种重要操作,也是日常生活中经常遇到的问题.例如,字典中的单词是以字母的顺序排列,否则,使用起来 ...
- 跳跃空间(链表)排序 选择排序(selection sort),插入排序(insertion sort)
跳跃空间(链表)排序 选择排序(selection sort),插入排序(insertion sort) 选择排序(selection sort) 算法原理:有一筐苹果,先挑出最大的一个放在最后,然后 ...
- 【ABAP系列】SAP ABAP选择屏幕(SELECTION SCREEN)事件解析
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP ABAP选择屏幕(SEL ...
- android 开发高仿QQ表情选择、输入框
首先大家看效果: 用到的文件有(源码文件有,只包含表情.输入框等有关文件,工程项目是公司项目,恕不公开啦): res: drawable/face_del_icon.xml drawable/iv_f ...
随机推荐
- Ubuntu 18.04.1更改屏幕分辨率
- 【python004-分支循环】
一.条件分支 1.第一个改进要求:游戏猜错的时候程序提示用户当前的输入比答案大了还是小了 python的比较操作符: > 左边大于右边 >= 左边大于等于右边 ...
- iOS App架构相关
一) 我们可以定义一个好的架构应该具备的特点: 任务均衡分摊给具有清晰角色的实体 可测试性通常都来自与上一条(对于一个合适的架构是非常容易) 易用性和低成本维护 二) 传统的MVC模式.:三个实体间相 ...
- ssm项目中 数据库和资源的备份
备份 备份很重要 数据库的备份 mysqldump -u用户名 -p密码 所需要备份的数据库 > ~/backup/sql/o2o`date +%Y%m%d%H%M%S`.sql 资源的备份 t ...
- (zhuan) Speech and Natural Language Processing
Speech and Natural Language Processing obtain from this link: https://github.com/edobashira/speech-l ...
- 解决 dpkg: warning: files list file for package 'x' missing 问题
参考: dpkg: warning: files list file for package 'x' missing 解决 dpkg: warning: files list file for pac ...
- 【译】第43节---EF6-自定义约定
原文:http://www.entityframeworktutorial.net/entityframework6/custom-conventions-codefirst.aspx Code-Fi ...
- 简易Samba服务器配置
Samba的作用是在Linux和windows之间通过网络进行资源共享.下面是简单的一个文件共享例子: 1.安装samba.samba-client服务 yum install samba samba ...
- 理解 Redis(8) - Ordered set 值
ordered set 是根据 score值有序排列的数据集合. 首先还是清空数据, 并清屏, 此步骤省略~~~~ 新建一条 ordered set 数据 myset1, 并存入4个字符串, scor ...
- hdu 3829 Cat VS Dog 二分图匹配 最大点独立集
Cat VS Dog Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others) Prob ...