Combining dependent P-values合并多个检验的p-value

今天在看文章的时候,发现原来p-value也可以合并。比如一个基因在不同组学数据的检验中对应了多个p-value,可以合并成一个。

常用的是Fisher’s method,

![](/wp/f4w/2020/2020-09-11-Fisher method.svg)

-2[ln(P1) + ln(P2) + … + ln(Pi)]符合X2分布(自由度为2k,k为p-value的个数)。

还有Brown’s methods和 Kost’s methods,具体的介绍如下图。

![](/wp/f4w/2020/2020-09-11-Combining dependent P-values.png)

Failed to mount 大容量的RAID组

我们的存储服务器有两组RAID,容量均大于150T,我在mount的时候,提示我

1
2
3
4
5
NTFS signature is missing.
Failed to mount '/dev/sdc': Invalid argument
The device '/dev/sdc' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

是因为没有分区导致的,分区之后就可以了。分区的命令

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 使用parted命令进行分区,等同parted; select /dev/sdc
parted /dev/sdc 

# 创建分区表
mklabel gpt 

# 使用print命令查看当前分区情况
print 

# 留1M的空余空间,目的是为了让数据块整齐,提高磁盘的运行效率, -1表示分区的结尾  意思是划分整个硬盘空间为主分区
mkpart primary 1 -1 

p  # print的简写

# 使用q命令退出, 
quit 

# 退出之后会提示
会提示Information: You may need to update /etc/fstab.


# 格式化分区,为分区写入文件系统,格式为ext4
mkfs –t ext4 /dev/sdc1 # 格式化分区

# 使用blkid命令,找到 UUID,然后编辑 /etc/fstab,实现自动挂载
vim /etc/fstab

UUID=******	directory	ext4	defaults	0	0

确定物理网口对应的名称以及配置静态IP

确定物理网口对应的名称

在一台ubuntu的机器上,有四个物理网口,我想知道每个网口对应的MAC地址。使用ip a可以看到网口的MAC地址和名称,比如列出了ens1f0, ens1f1, ens4f0, ens4f1。 原来的网卡interface都是eth开头,后来改成了enp, ens等。

Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1) Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1) Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0) Names incorporating the interfaces’s MAC address (example: enx78e7d1ea46da) Classic, unpredictable kernel-native ethX naming (example: eth0)

那么如何确定机器上的ens1f0对应的哪个物理网口呢,可以用ethtool来实现,ethtool是用于查询及设置网卡参数的命令。用ethtool -p enos1f1,看哪个网口在闪灯,就能确定这个物理网口对应的名称。记得不要插网线。

1
ethtool -p|--identify DEVNAME   Show visible port identification (e.g. blinking)

如果没有一个网口亮灯,很可能是因为网口不支持,则可以尝试ethtool -t enosf1f1,大概在4秒之后,网口的灯会亮,这个时候就可以确定enos1f1对应的具体的物理网口了。

1
ethtool -t|--test DEVNAME       Execute adapter self test

很简单的一个命令,知道了就很简单,不知道就很难想到。

cosine similarity

在SNV分析中,我们在算signature和样本mutation spectrum之间的相似性时,会用到cosine similarity。cosine similarity (distance)的公式,其实就是两个向量的夹角的cosine值,计算公式如下

它与欧式距离的差别如下图,cosθ就是similarity,而d则是欧氏距离Euclidean distance。

有些时候,距离也算作一种相似性,因为距离越远,说明两个样本越不相似。Euclidean distance和cosine similarity要根据情况来选择,最重要的是,是否要考虑weight or magnitude,参考下图。

在文本挖掘分析的时候,计算两个文本的相似性,我们可以统计每个词出现的次数,然后计算相似性(距离),因为文章有短有长,如果考虑单词出现的次数,那么字数多的文章一定与字数少的文章不一样(欧氏距离),所以如果我们不考虑这个量(magnitude)的时候,用cosine计算更加合适,结果也与欧氏距离不一样。