4.13学习笔记

1.k-medoids聚类算法

https://www.cnblogs.com/feffery/p/8595315.html 还是比较好理解的,在之前又复习了一下kmeans,它是根据重心来不断移动中心点。

它能够削弱异常值的影响,需要遍历每一个点,在第一次计算出分类结果后,在每个类中遍历除预先确定的中心点外的点,计算类中所有点之间的准则函数,这里的准则函数也就是到所有点的平均距离吧,然后计算出来之后,得出来新的中心点,然后再根据距离重新分类。

再利用刚刚看到的kmeans的一个例子,计算过程也是很好理解,假设最一开始选取p1和p2,那么一轮过后中心点可能就会变为p1和p4了。

3.chromVAR

https://www.jianshu.com/p/ba31c94acc92

预测染色质可及性相关的转录因子,我还是看不懂它在做什么。。。

4.表观遗传组学

https://www.illumina.com.cn/techniques/popular-applications/epigenetics.html

在这个平台的介绍中可以发现,关键的包括这三个:

 ATAC-seq它是表观遗传学分析的终要部分,表观遗传都是和DNA相关的,而RNA-seq是转录组学数据?所以这两个是不一样的,好吧。

表观遗传是DNA水平,转录组学是RNA水平,好吧。

5.FACS

https://www.dxy.cn/bbs/newweb/pc/post/6598064

FACS(fluorescence activated cell sorting)即荧光激活细胞分离法,也即流式细胞仪细胞分选法。

应该就是用来分离不同类型的细胞的。

6.找到了多组学数据

https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE66581

包括RNA-ATAC-CHIP,但是是bedgraph文件,我当然不会分析了,算了。不是我的领域。

2020-4-15学习笔记——————————————

1.from enum import Flag, auto

https://docs.python.org/zh-cn/3.7/library/enum.html 官方文档就讲的不错。

我自己使用到的例子:

from enum import Flag, auto
class Color(Flag):#
    RED = auto()#1,这样的话就会默认是False
    BLUE = auto()#2
    GREEN = auto()#4
    WIHTE=auto()#8
    BLACK=auto()#16
    EXP = auto()#...
    LOG = auto()
    SCALE = auto()
    PROB = auto()
    BIN = auto()
    def __iter__(self):#加上这个函数之后才是可以迭代的对象
        for method in list(Color)[:]:
            if method in self:
                yield method

method=(Color.RED|Color.BLACK)#可以有选择地设置枚举值
for m in method:
    if m==Color.RED:
        print('hh')
    if m==Color.BLACK:
        print('ok')

2.python inspect

https://docs.python.org/zh-cn/3.7/library/inspect.html

检查对象,

 2020-4-16______

1.对于一维的混合高斯拟合

from sklearn.mixture import GaussianMixture
import numpy as np
a=np.random.randn(10)
a=a.reshape(10,1)
gmm = GaussianMixture(n_components=2,covariance_type='diag')
gmm.fit(a)
print(gmm.means_.ravel())
#输出:
[-1.89298407  0.30989813]
>>> gmm.means_
array([[-1.89298407],
       [ 0.30989813]])

如果是对一列进行拟合,那么返回的means就是一个值而已。

2.np.newaxis

https://www.jianshu.com/p/78e1e281f698

x1 = np.array([1, 2, 3, 4, 5])
# the shape of x1 is (5,)
x1_new = x1[:, np.newaxis]
# now, the shape of x1_new is (5, 1)
# array([[1],
#        [2],
#        [3],
#        [4],
#        [5]])
x2_new = x1[np.newaxis,:]
# now, the shape of x2_new is (1, 5)
# array([[1, 2, 3, 4, 5]])

就是增加一个列,这么简单。

------------恢复内容结束------------

原文地址:https://www.cnblogs.com/BlueBlueSea/p/12695305.html