python 中Wilcoxon rank-sum 和 R 中的 wilcox.test

参考网页:http://stackoverflow.com/questions/12797658/pythons-scipy-stats-ranksums-vs-rs-wilcox-test


python scipy 中的 ranksums(x,y) 相当于  

R中的 wilcox.text(x,y,exact=FALSE,correct=FALSE)


#### python  code


x=[57.07168,46.95301,31.86423,38.27486,77.89309,76.78879,33.29809,58.61569,18.26473,62.92256,50.46951,19.14473,22.58552,24.14309]

y=[8.319966,2.569211,1.306941,8.450002,1.624244,1.887139,1.376355,2.521150,5.940253,1.458392,3.257468,1.574528,2.338976]

scipy.stats.ranksums(x, y)

(4.415880433163923, 1.0059968254463979e-05)




####  r code

x=c(57.07168,46.95301,31.86423,38.27486,77.89309,76.78879,33.29809,58.61569,18.26473,62.92256,50.46951,19.14473,22.58552,24.14309)

y=c(8.319966,2.569211,1.306941,8.450002,1.624244,1.887139,1.376355,2.521150,5.940253,1.458392,3.257468,1.574528,2.338976)


wilcox.test(x, y, exact=FALSE, correct=FALSE)


   Wilcoxon rank sum test


data:  x and y

W = 182, p-value = 1.006e-05

alternative hypothesis: true location shift is not equal to 0




scipy.stats.ranksums(x, y)[source]

Compute the Wilcoxon rank-sum statistic for two samples.

The Wilcoxon rank-sum test tests the null hypothesis that two sets of measurements are drawn from the same distribution. The alternative hypothesis is that values in one sample are more likely to be larger than the values in the other sample.

This test should be used to compare two samples from continuous distributions. It does not handle ties between measurements in x and y. For tie-handling and an optional continuity correction see scipy.stats.mannwhitneyu.





转载自:http://blog.sciencenet.cn/blog-468005-1022320.html






Identification of tumour-cell-enriched spots and cluster-specific DEGs To distinguish tumour-cell-enriched spots from normal stromal tissues, we integrated information from several sources, on the basis of our previous studies48,49,50. This process involved the following steps. (1) Histopathological review. Our experienced pathologists performed a detailed histopathological examination and annotation of each spot (see ‘Spot-level histopathological annotation’). (2) Inferred CNVs. Tumour-cell-enriched spots typically exhibit extensive CNVs, marked by increased or decreased levels of aneuploidy, which are important characteristics used to distinguish them from normal stromal areas (see ‘Inferring spatial CNVs’). (3) Transcriptional profiles. Tumour-cell-enriched spots often exhibit unique expression profiles, such as the expression of tumour-lineage-specific markers. We identified cluster-specific DEGs using the ‘FindAllMarkers’ function with a two-sided Wilcoxon rank-sum test. Criteria for cluster-specific DEG selection included expression in at least 25% of spots in the more abundant group, a fold change greater than 1.2 and an adjusted P value (by false discovery rate; FDR) lower than 0.05. We then compared cluster-specific DEGs with known PDAC tumour lineage markers to defined tumour-cell-enriched clusters. Our multidisciplinary team reviewed all of the above information. After this comprehensive analysis, we successfully identified a total of 67,990 tumour-cell enriched spots. 文献里提到的这个方法具体代码是什么?最后鉴定到了什么?
最新发布
08-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值