{"id":72367,"date":"2026-11-17T13:34:39","date_gmt":"2026-11-17T05:34:39","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=72367"},"modified":"2026-11-17T13:34:39","modified_gmt":"2026-11-17T05:34:39","slug":"ysx-sc-practice-091-dotplot-fraction-average","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/ysx-sc-practice-091-dotplot-fraction-average\/","title":{"rendered":"\u540c\u4e00\u5f20 DotPlot\uff0c\u70b9\u5f88\u5c0f\u3001\u989c\u8272\u5374\u5f88\u6df1\uff0c\u8be5\u600e\u4e48\u8bfb\uff1f"},"content":{"rendered":"<div style=\"max-width:820px;margin:0 auto;color:#263a47;font-size:17px;line-height:1.85;overflow-wrap:break-word\">\n<p>\u4e00\u5f20\u5355\u7ec6\u80de\u70b9\u56fe\u91cc\uff0cCD4 T \u7ec6\u80de\u65c1\u7684 GP9 \u5c0f\u5f97\u50cf\u58a8\u70b9\uff0c\u989c\u8272\u5374\u5f88\u6df1\u3002\u770b\u56fe\u7684\u4eba\u53ef\u80fd\u4f1a\u8bf4\uff0c\u8fd9\u7fa4\u7ec6\u80de\u5f3a\u70c8\u8868\u8fbe GP9\u3002\u771f\u5b9e\u8ba1\u6570\u7ed9\u4e86\u4e00\u4e2a\u66f4\u7ec6\u7684\u7b54\u6848\uff1a\u4e94\u5343\u4e94\u767e\u516d\u5341\u9897\u88ab\u6807\u6210 CD4 T \u7684\u7ec6\u80de\u91cc\uff0c\u53ea\u6709\u4e09\u5341\u4e09\u9897\u8bfb\u5230\u8fc7\u8fd9\u4e2a\u57fa\u56e0\u3002\u9633\u6027\u7ec6\u80de\u4e2d\u7684\u6807\u51c6\u5316\u5747\u503c\u7ea6\u5341\u56db\u70b9\u56db\u516b\uff0c\u628a\u5176\u4f59\u4e94\u5343\u591a\u9897\u4e5f\u653e\u56de\u53bb\uff0c\u5168\u7fa4\u5747\u503c\u53ea\u5269\u96f6\u70b9\u96f6\u516b\u516d\u3002\u6df1\u989c\u8272\u4ece\u54ea\u91cc\u6765\uff1f\u4e0b\u9762\u6211\u4eec\u4ece\u8fd9\u4e09\u5341\u4e09\u9897\u6761\u7801\u5f00\u59cb\uff0c\u4eb2\u624b\u91cd\u5efa\u4e00\u5f20\u70b9\u56fe\uff0c\u5e76\u753b\u51fa\u516b\u4f4d\u4f9b\u8005\u5404\u81ea\u7684\u7ed3\u679c\u3002<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1240\" height=\"800\" style=\"width:100%;height:auto;display:block;border-radius:12px\" alt=\"\u70b9\u53ea\u6709\u4e00\u70b9\u5927\uff0c\u989c\u8272\u4e3a\u4ec0\u4e48\u6df1\uff1f\uff0c\u628a DotPlot \u62c6\u56de\u5206\u5b50\u548c\u5206\u6bcd\u30025,560 \u9897 CD4 T \u7ec6\u80de\u4e2d\uff0c\u53ea\u6709 33 \u9897\u68c0\u51fa GP9\uff1b\u9633\u6027\u5e73\u5747 14.48\uff0c\u5168\u7fa4\u5e73\u5747\u4ec5 0.086\uff1b\u8fd9\u4e2a\u5c0f\u70b9\u7684\u989c\u8272\u5206\u6570\u4ecd\u8fbe\u5230 2.09\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/ysx-sc-practice-091-dotplot-fraction-average.png?resize=1240%2C800&#038;ssl=1\" \/><\/p>\n<p><a download style=\"display:inline-block;margin:3px;padding:4px 10px;border:1px solid #bad0dd;border-radius:5px\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/ysx-sc-practice-091-dotplot-fraction-average.zip\">\u4e0b\u8f7d\u5b8c\u6574\u4ee3\u7801\u3001\u793a\u4f8b\u6570\u636e\u4e0e\u53c2\u8003\u8f93\u51fa\uff08ZIP\uff09<\/a> \u00b7 <a download style=\"display:inline-block;margin:3px;padding:4px 10px;border:1px solid #bad0dd;border-radius:5px\" href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/ysx-sc-practice-091-dotplot-fraction-average.pdf\">\u4e0b\u8f7d\u56fe\u6587\u64cd\u4f5c\u624b\u518c\uff08PDF\uff09<\/a><\/p>\n<h2>\u70b9\u5927\u5c0f\u5bf9\u5e94\u54ea\u4e00\u7fa4\u7ec6\u80de<\/h2>\n<p>\u6570\u636e\u6765\u81ea Kang \u7b49\u4eba\u7684\u516c\u5f00\u5916\u5468\u8840\u5b9e\u9a8c\u3002\u7ec3\u4e60\u53ea\u53d6\u5bf9\u7167\u6761\u4ef6\uff0c\u6309\u539f\u5bf9\u8c61\u7684\u8c31\u7cfb\u6807\u7b7e\u548c\u4f9b\u8005\u6807\u8bc6\u6574\u7406\uff0c\u5171\u4e00\u4e07\u4e8c\u5343\u4e09\u767e\u4e00\u5341\u4e94\u4e2a\u7ec6\u80de\u3002\u6bcf\u4e2a\u6761\u7801\u4fdd\u7559\u4e5d\u4e2a\u5f85\u753b\u57fa\u56e0\u7684\u539f\u59cb\u8ba1\u6570\uff0c\u4ee5\u53ca\u539f\u5bf9\u8c61\u6574\u5f20\u77e9\u9635\u7684\u5206\u5b50\u603b\u6570\u3002\u8fd0\u884c\u65f6\u5148\u7528\u67d0\u57fa\u56e0\u539f\u8ba1\u6570\u662f\u5426\u5927\u4e8e\u96f6\u5b9a\u4e49\u672c\u6b21\u6d4b\u91cf\u7684\u9633\u6027\uff0c\u518d\u7528\u9633\u6027\u7ec6\u80de\u6570\u9664\u4ee5\u8be5\u7ec4\u6709\u8d44\u683c\u7eb3\u5165\u7684\u5168\u90e8\u7ec6\u80de\u6570\u3002\u68c0\u51fa\u7387\u63cf\u8ff0\u7684\u662f\u5728\u8fd9\u79cd\u6df1\u5ea6\u3001\u5efa\u5e93\u65b9\u5f0f\u548c\u7b5b\u9009\u6761\u4ef6\u4e0b\uff0c\u80fd\u5728\u591a\u5c11\u6761\u7801\u91cc\u8bfb\u5230\u76ee\u6807\uff0c\u4e0d\u7b49\u4e8e\u7ec4\u7ec7\u91cc\u5b9e\u9645\u4ea7\u751f\u8fc7\u8fd9\u79cd\u86cb\u767d\u7684\u7ec6\u80de\u6bd4\u4f8b\u3002<a href=\"https:\/\/doi.org\/10.1038\/nbt.4042\">Kang \u7b49\u591a\u4f9b\u8005\u5b9e\u9a8c<\/a><\/p>\n<p>\u8fd9\u91cc\u6709\u4e00\u4e2a\u5f88\u5bb9\u6613\u5ffd\u7565\u7684\u9677\u9631\u3002\u82e5\u4e3a\u4e86\u6587\u4ef6\u5c0f\u53ea\u5bfc\u51fa\u4e5d\u4e2a\u57fa\u56e0\uff0c\u518d\u7528\u8fd9\u4e5d\u5217\u4e4b\u548c\u4f5c\u4e3a\u6bcf\u9897\u7ec6\u80de\u7684\u5168\u5e93\u6df1\u5ea6\uff0c\u90a3\u4e48\u4e5d\u8005\u4e2d\u67d0\u4e00\u4e2a\u9ad8\u8868\u8fbe\u65f6\uff0c\u5176\u4ed6\u57fa\u56e0\u4f1a\u88ab\u52a8\u4e0b\u964d\u3002\u7ec3\u4e60\u53e6\u7559\u5b8c\u6574\u8ba1\u6570\u603b\u91cf\uff0c\u907f\u514d\u628a\u5c55\u793a\u9762\u677f\u8bef\u5f53\u6210\u6574\u5e93\u3002\u540c\u6837\uff0c\u6bd4\u8f83\u4e0d\u540c\u7ec4\u65f6\u5148\u56fa\u5b9a\u7528\u4e8e\u4f5c\u56fe\u7684\u6761\u7801\u96c6\uff1b\u5982\u679c A \u57fa\u56e0\u53ea\u5728\u4e00\u90e8\u5206\u6d4b\u5e8f\u6837\u672c\u6709\u673a\u4f1a\u88ab\u68c0\u6d4b\uff0c\u5e94\u53e6\u6807\u54ea\u4e9b\u6837\u672c\u6d4b\u8fc7\u3002\u67d0\u4e2a\u57fa\u56e0\u4e0d\u5728\u539f\u59cb\u6d4b\u91cf\u9762\u677f\u91cc\uff0c\u4e0d\u80fd\u628a\u6574\u7ec4\u4e00\u5f8b\u8865\u96f6\uff0c\u7136\u540e\u7528\u6570\u5b57\u96f6\u89e3\u91ca\u4e3a\u65e0\u8868\u8fbe\u3002<\/p>\n<h2>\u989c\u8272\u7ecf\u8fc7\u4e24\u6b21\u5904\u7406\uff0c\u5148\u7b97\u7b2c\u4e00\u6b21<\/h2>\n<p>\u5728\u6bcf\u9897\u7ec6\u80de\u5185\uff0c\u7528\u76ee\u6807\u57fa\u56e0\u8ba1\u6570\u9664\u4ee5\u5168\u5e93\u5206\u5b50\u6570\uff0c\u518d\u4e58\u4e00\u4e07\u3002\u6309\u7fa4\u6c42\u8fd9\u4e9b\u7ebf\u6027\u503c\u7684\u7b97\u672f\u5747\u503c\uff0c\u6240\u6709\u96f6\u503c\u90fd\u53c2\u4e0e\u3002\u82e5\u8d77\u70b9\u662f\u5e38\u89c1\u7684\u5bf9\u6570\u5f52\u4e00\u5c42\uff0c\u5148\u7528\u53cd\u53d8\u6362\u56de\u5230\u7ebf\u6027\u5c3a\u5ea6\u518d\u7b97\uff0c\u6700\u540e\u624d\u5bf9\u7fa4\u5747\u503c\u53d6\u81ea\u7136\u5bf9\u6570\u52a0\u4e00\u3002\u4e0d\u80fd\u5148\u628a\u7ec6\u80de\u5bf9\u6570\u503c\u5e73\u5747\uff0c\u518d\u628a\u7ed3\u679c\u5f53\u6210\u540c\u4e00\u4e2a\u91cf\u3002\u5bf9\u5206\u5e03\u5747\u5300\u7684\u57fa\u56e0\uff0c\u4e24\u8005\u6709\u65f6\u63a5\u8fd1\uff1b\u5bf9\u5c11\u6570\u6761\u7801\u975e\u5e38\u9ad8\u3001\u7edd\u5927\u591a\u6570\u4e3a\u96f6\u7684\u57fa\u56e0\uff0c\u5dee\u522b\u80fd\u5f88\u5927\u3002\u968f\u5305\u4ee3\u7801\u628a\u4e24\u79cd\u6700\u503c\u5f97\u5bf9\u7167\u7684\u6570\u5b57\u653e\u5728\u4e00\u8d77\uff1a\u5168\u90e8\u7ec6\u80de\u7684\u7ebf\u6027\u5747\u503c\uff0c\u4ee5\u53ca\u4ec5\u5728\u9633\u6027\u7ec6\u80de\u4e2d\u8ba1\u7b97\u7684\u7ebf\u6027\u5747\u503c\u3002<\/p>\n<pre style=\"max-width:100%;overflow:auto;padding:14px;box-sizing:border-box;background:#f1f6fa;line-height:1.6;font-size:0.9em\"><code class=\"language-python\">def summarise(cells,genes,group):\n    records=[]\n    for key,g in cells.groupby(group):\n        key=key if isinstance(key,tuple) else (key,)\n        for gene in genes:\n            y=10000*g[gene]\/g.total_umi\n            pos=g[gene]&gt;0\n            records.append((*key,gene,len(g),int(pos.sum()),pos.mean(),y.mean(),y[pos].mean() if pos.any() else np.nan))\n    t=pd.DataFrame(records,columns=[*group,&quot;gene&quot;,&quot;cells&quot;,&quot;positive_cells&quot;,&quot;fraction_positive&quot;,&quot;mean_all_linear&quot;,&quot;mean_positive_linear&quot;])\n    t[&quot;log1p_average&quot;]=np.log1p(t.mean_all_linear)\n    def zscore(v):\n        sd=v.std(ddof=1)\n        return (v-v.mean())\/sd if sd&gt;0 else np.zeros(len(v))\n    t[&quot;scaled_colour&quot;]=t.groupby(&quot;gene&quot;).log1p_average.transform(zscore).clip(-2.5,2.5)\n    return t\n<\/code><\/pre>\n<p>\u5982\u679c\u540c\u4e00\u7ec4\u7684\u6bcf\u4e2a\u9633\u6027\u6761\u7801\u6743\u91cd\u76f8\u540c\uff0c\u90a3\u4e48\u5168\u7fa4\u5747\u503c\u5e94\u8fd1\u4f3c\u7b49\u4e8e\u9633\u6027\u6bd4\u4f8b\u4e58\u9633\u6027\u5747\u503c\u3002\u7528 GP9 \u7684\u4e09\u5341\u4e09\u9664\u4ee5\u4e94\u5343\u4e94\u767e\u516d\u5341\uff0c\u518d\u4e58\u5341\u56db\u70b9\u56db\u516b\uff0c\u5c31\u7ea6\u7b49\u4e8e\u96f6\u70b9\u96f6\u516b\u516d\u3002\u8fd9\u4e2a\u7b80\u5355\u4e58\u6cd5\u6bd4\u731c\u4f5c\u56fe\u51fd\u6570\u9ed8\u8ba4\u8bbe\u7f6e\u66f4\u53ef\u9760\u3002\u9047\u5230\u8868\u4e2d\u4e09\u4e2a\u6570\u5bf9\u4e0d\u4e0a\uff0c\u5148\u67e5\u5206\u6bcd\u6709\u6ca1\u6709\u88ab\u8868\u8fbe\u7f3a\u5931\u3001\u53cc\u7ec6\u80de\u8fc7\u6ee4\u6216\u6837\u672c\u5408\u5e76\u6539\u53d8\uff0c\u518d\u67e5\u6570\u503c\u662f\u5426\u5df2\u53d6\u8fc7\u5bf9\u6570\u3002\u6ca1\u6709\u4e00\u4e2a\u9633\u6027\u7ec6\u80de\u7684\u7ec4\uff0c\u5168\u7fa4\u5747\u503c\u53ef\u4ee5\u662f\u96f6\uff0c\u9633\u6027\u5747\u503c\u5219\u65e0\u4ece\u8ba1\u7b97\u3002\u8f93\u51fa\u4e2d\u7279\u610f\u628a\u540e\u8005\u7559\u4e3a\u7a7a\u503c\uff0c\u4ee5\u514d\u628a\u65e0\u89c2\u5bdf\u4f2a\u9020\u6210\u4e00\u4e2a\u6d4b\u5230\u7684\u8868\u8fbe\u91cf\u3002<\/p>\n<div style=\"overflow:auto\">\n<table style=\"width:100%;border-collapse:collapse\">\n<thead>\n<tr>\n<th style=\"padding:9px;text-align:left;background:#dcefff\">\u5728\u672c\u7ec4\u68c0\u67e5\u7684\u57fa\u56e0<\/th>\n<th style=\"padding:9px;text-align:left;background:#dcefff\">\u9633\u6027\u6761\u7801 \/ \u7ec4\u5185\u6761\u7801<\/th>\n<th style=\"padding:9px;text-align:left;background:#dcefff\">\u5168\u7fa4\u7ebf\u6027\u5747\u503c<\/th>\n<th style=\"padding:9px;text-align:left;background:#dcefff\">\u4ec5\u9633\u6027\u5747\u503c<\/th>\n<th style=\"padding:9px;text-align:left;background:#dcefff\">\u57fa\u56e0\u5185\u7f29\u653e\u989c\u8272<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">CD4 T \u7fa4 GP9<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">33 \/ 5,560<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">0.086<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">14.48<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">2.09<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">CD4 T \u7fa4 PF4<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">111 \/ 5,560<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">0.542<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">27.13<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">1.95<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">\u6811\u7a81\u7ec6\u80de FCER1A<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">58 \/ 258<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">2.019<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">8.98<\/td>\n<td style=\"padding:9px;vertical-align:top;border-bottom:1px solid #d6e0e7\">2.47<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>\u4e3a\u4ec0\u4e48\u4f4e\u5747\u503c\u4ecd\u7136\u80fd\u5f97\u5230\u6df1\u8272<\/h2>\n<p>\u4e3a\u4e86\u753b\u51fa\u5404\u4e2a\u57fa\u56e0\u5728\u4e0d\u540c\u7c7b\u522b\u91cc\u7684\u76f8\u5bf9\u5dee\u522b\uff0c\u70b9\u56fe\u5e38\u628a\u6bcf\u4e2a\u57fa\u56e0\u7684\u7fa4\u5747\u503c\u5355\u72ec\u6807\u51c6\u5316\u3002\u5148\u5bf9\u540c\u4e00\u57fa\u56e0\u7684\u6240\u6709\u7ec4\u5747\u503c\u53d6\u5bf9\u6570\uff0c\u518d\u51cf\u53bb\u8de8\u7ec4\u5747\u503c\uff0c\u9664\u4ee5\u8de8\u7ec4\u6807\u51c6\u5dee\uff0c\u6700\u540e\u622a\u65ad\u989c\u8272\u8303\u56f4\u3002GP9 \u5728\u8fd9\u5f20\u8868\u91cc\u5373\u4f7f\u7edd\u5bf9\u8868\u8fbe\u4e0d\u9ad8\uff0c\u4ecd\u53ef\u80fd\u6bd4\u5b83\u5728\u5176\u4ed6\u7c7b\u522b\u4e2d\u7684\u6570\u503c\u504f\u9ad8\uff0c\u6240\u4ee5\u5bf9\u5e94\u6df1\u8272\u3002\u53e6\u4e00\u4e2a\u666e\u904d\u9ad8\u8868\u8fbe\u7684\u57fa\u56e0\u5373\u4fbf\u6709\u5927\u5f97\u591a\u7684\u539f\u5747\u503c\uff0c\u82e5\u5728\u5404\u7ec4\u90fd\u5dee\u4e0d\u591a\uff0c\u4e5f\u672a\u5fc5\u66f4\u6df1\u3002\u8bfb\u56fe\u65f6\u53ef\u4ee5\u5728\u540c\u4e00\u4e2a\u57fa\u56e0\u5185\u90e8\u6bd4\u8f83\u7fa4\u95f4\u76f8\u5bf9\u5f3a\u5f31\uff1b\u5982\u679c\u8981\u8de8\u57fa\u56e0\u6bd4\u8f83\u5206\u5b50\u4e30\u5ea6\uff0c\u5c31\u56de\u5230\u7ebf\u6027\u5747\u503c\u548c\u68c0\u51fa\u6bd4\u4f8b\u4e24\u5217\u3002<a href=\"https:\/\/satijalab.org\/seurat\/reference\/dotplot\">Seurat DotPlot \u7684\u7edf\u8ba1\u91cf\u4e0e\u7f29\u653e\u9009\u9879<\/a><\/p>\n<p>\u8fd8\u6709\u4e00\u4e2a\u53ef\u81ea\u884c\u9a8c\u8bc1\u7684\u73b0\u8c61\u3002\u5982\u679c\u5220\u53bb\u4e24\u4e2a\u7ec6\u80de\u7c7b\u578b\uff0c\u518d\u8ba9\u7ed8\u56fe\u51fd\u6570\u4ece\u5934\u7f29\u653e\uff0c\u5269\u4f59\u7fa4\u7684\u57fa\u56e0\u5747\u503c\u539f\u5c01\u4e0d\u52a8\uff0c\u989c\u8272\u5374\u4f1a\u6539\u53d8\u3002\u56e0\u4e3a\u7f29\u653e\u4f7f\u7528\u4e86\u8fdb\u5165\u8be5\u6b21\u56fe\u7684\u6240\u6709\u7ec4\uff0c\u5220\u53bb\u4e86\u53c2\u7167\uff0c\u5747\u503c\u548c\u6807\u51c6\u5dee\u5c31\u90fd\u53d8\u4e86\u3002\u8de8\u4f9b\u8005\u6bd4\u8f83\u65f6\u540c\u6837\u5982\u6b64\u3002\u5982\u679c\u5404\u753b\u5404\u7684\u56fe\uff0c\u6bcf\u5f20\u56fe\u6309\u81ea\u5df1\u7684\u6700\u5927\u6700\u5c0f\u503c\u4e0a\u8272\uff0c\u6df1\u7ea2\u4e0e\u6df1\u7ea2\u672a\u5fc5\u4ee3\u8868\u540c\u7b49\u6570\u503c\u3002\u6211\u4eec\u7684\u4f9b\u8005\u5206\u9762\u4f7f\u7528\u4e00\u4efd\u8054\u5408\u7f29\u653e\u4e0e\u56fa\u5b9a\u7684\u8272\u8f74\uff0c\u53e6\u4e00\u5f20\u6c47\u603b\u56fe\u57fa\u4e8e\u5168\u4f53\u7c7b\u578b\u5355\u72ec\u7f29\u653e\uff0c\u9605\u8bfb\u65f6\u9700\u5206\u522b\u7406\u89e3\u3002\u82e5\u8981\u5728\u4e24\u4efd\u4e0d\u540c\u9879\u76ee\u95f4\u6bd4\u8f83\uff0c\u6700\u597d\u989d\u5916\u9644\u4e0a\u56fa\u5b9a\u989c\u8272\u8303\u56f4\u7684\u672a\u7f29\u653e\u5747\u503c\u56fe\u3002<\/p>\n<pre style=\"max-width:100%;overflow:auto;padding:14px;box-sizing:border-box;background:#f1f6fa;line-height:1.6;font-size:0.9em\"><code class=\"language-sh\">python -m pip install -r requirements.txt\npython run.py --input example --out results\n<\/code><\/pre>\n<h2>\u67e5\u8fd9\u4e09\u5341\u4e09\u9897\u6761\u7801\uff0c\u5230\u5e95\u96c6\u4e2d\u5728\u54ea\u91cc<\/h2>\n<p>\u8bfb\u8005\u53ef\u4ee5\u628a\u9010\u7ec6\u80de\u539f\u8868\u6309\u7c7b\u578b\u548c\u57fa\u56e0\u539f\u59cb\u8ba1\u6570\u8fc7\u6ee4\uff0c\u7136\u540e\u6309\u4f9b\u8005\u7edf\u8ba1\u9633\u6027\u4e0e\u5168\u90e8\u6761\u7801\u3002\u516b\u540d\u4f9b\u8005\u7684\u603b\u91cf\u5dee\u522b\u53ef\u80fd\u5f88\u5927\uff0c\u76f4\u63a5\u5408\u5e76\u76f8\u5f53\u4e8e\u8ba9\u7ec6\u80de\u591a\u7684\u4f9b\u8005\u5360\u66f4\u9ad8\u6743\u91cd\u3002\u5982\u679c\u67d0\u4e2a\u4f9b\u8005\u8d21\u732e\u4e86\u5927\u591a\u6570\u9633\u6027\uff0c\u5728\u70b9\u56fe\u4e0b\u9762\u5217\u51fa\u5b83\u7684\u6bd4\u4f8b\u3001\u7edd\u5bf9\u9633\u6027\u6570\u4ee5\u53ca\u5176\u4ed6\u4f9b\u8005\u7684\u68c0\u6d4b\u6df1\u5ea6\uff0c\u5c31\u6bd4\u7b3c\u7edf\u58f0\u79f0\u201c\u5728 CD4 T \u4e2d\u9ad8\u8868\u8fbe\u201d\u6e05\u695a\u3002\u63a5\u7740\u770b\u540c\u4e00\u6279\u6761\u7801\u4e2d PPBP\u3001PF4\u3001CD3D \u7b49\u57fa\u56e0\u662f\u5426\u5171\u540c\u51fa\u73b0\uff0c\u68c0\u51fa\u662f\u5426\u53ea\u6709\u4e00\u4e2a\u5206\u5b50\uff0c\u591a\u4e2a\u8840\u5c0f\u677f\u6807\u8bb0\u662f\u5426\u843d\u5728\u540c\u4e00\u9897\u7ec6\u80de\u3002\u8fd9\u6837\u7684\u7ed3\u679c\u53ef\u4ee5\u652f\u6301\u540e\u7eed\u590d\u6838\u73af\u5883 RNA\u3001\u7ec6\u80de\u9ecf\u8fde\u6216\u53cc\u7ec6\u80de\uff0c\u4e0d\u80fd\u5355\u9760\u4e00\u5f20\u70b9\u56fe\u88c1\u5b9a\u662f\u54ea\u79cd\u539f\u56e0\u3002<\/p>\n<pre style=\"max-width:100%;overflow:auto;padding:14px;box-sizing:border-box;background:#f1f6fa;line-height:1.6;font-size:0.9em\"><code class=\"language-python\">import pandas as pd\nx = pd.read_csv(&quot;example\/counts.tsv.gz&quot;, sep=&quot;\\t&quot;)\nt = x[x.cell_type.eq(&quot;CD4 T cells&quot;)]\nprint(t.assign(positive=t.GP9.gt(0)).groupby(&quot;donor&quot;).positive.agg([&quot;sum&quot;,&quot;size&quot;,&quot;mean&quot;]))\nprint(t.loc[t.GP9.gt(0), [&quot;barcode&quot;,&quot;donor&quot;,&quot;GP9&quot;,&quot;PPBP&quot;,&quot;PF4&quot;,&quot;CD3D&quot;]].head())\n<\/code><\/pre>\n<p>\u82e5\u51c6\u5907\u628a\u56fe\u653e\u8fdb\u8bba\u6587\uff0c\u53ef\u4ee5\u7ed9\u6838\u5fc3\u7ed3\u679c\u589e\u52a0\u4e00\u4e2a\u5c0f\u8868\uff0c\u5217\u51fa\u6bcf\u79cd\u7ec6\u80de\u7c7b\u578b\u6709\u591a\u5c11\u72ec\u7acb\u4f9b\u8005\u53ef\u89c2\u5bdf\uff0c\u4f9b\u8005\u95f4\u68c0\u51fa\u6bd4\u4f8b\u7684\u4e2d\u4f4d\u6570\u548c\u8303\u56f4\uff0c\u4ee5\u53ca\u81f3\u5c11\u89c2\u5bdf\u5230\u82e5\u5e72\u9633\u6027\u7ec6\u80de\u7684\u4f9b\u8005\u6570\u3002\u8fd9\u4e2a\u5c0f\u8868\u56de\u7b54\u53e6\u4e00\u4e2a\u5728\u6c47\u603b\u56fe\u4e0a\u770b\u4e0d\u5230\u7684\u95ee\u9898\uff1a\u4e00\u4e2a\u70b9\u7531\u591a\u6570\u4f9b\u8005\u8d21\u732e\uff0c\u8fd8\u662f\u51e0\u4e4e\u53ea\u6765\u81ea\u4e00\u4efd\u7ec6\u80de\u5f88\u591a\u7684\u6807\u672c\u3002\u5bf9\u6570\u91cf\u6781\u5c11\u7684\u7c7b\u522b\uff0c\u751a\u81f3\u4e00\u9897\u65b0\u589e\u6761\u7801\u90fd\u80fd\u660e\u663e\u6539\u53d8\u70b9\u5927\u5c0f\u3002\u628a\u89c2\u5bdf\u5230\u7684\u539f\u59cb\u8ba1\u6570\u4e0e\u6bd4\u4f8b\u4e00\u8d77\u5199\u51fa\u6765\uff0c\u80fd\u8ba9\u8bfb\u8005\u81ea\u884c\u5224\u65ad\u7cbe\u5ea6\u3002<\/p>\n<p>\u56de\u770b\u6811\u7a81\u7ec6\u80de\u7684\u4f8b\u5b50\uff0c\u4e5f\u80fd\u907f\u514d\u628a\u8fd9\u5957\u89e3\u91ca\u53ea\u8bb0\u6210\u201c\u989c\u8272\u6df1\u90fd\u662f\u5047\u8c61\u201d\u3002\u4e24\u767e\u4e94\u5341\u516b\u9897\u91cc\u6709\u4e94\u5341\u516b\u9897\u68c0\u51fa FCER1A\uff0c\u9633\u6027\u5747\u503c\u63a5\u8fd1\u4e5d\uff0c\u5168\u7fa4\u5747\u503c\u7ea6\u4e8c\u3002\u5b83\u7684\u70b9\u9762\u79ef\u660e\u663e\u5927\u4e8e\u524d\u9762\u90a3\u4e2a\u53ea\u6709\u4e09\u5341\u4e09\u9897\u9633\u6027\u7684\u4f8b\u5b50\uff0c\u4ecd\u503c\u5f97\u68c0\u67e5\u4e0d\u540c\u4f9b\u8005\u4e2d\u7684\u91cd\u590d\u60c5\u51b5\u3002\u5982\u679c\u4e24\u7ec4\u57fa\u56e0\u7684\u7f29\u653e\u989c\u8272\u63a5\u8fd1\uff0c\u53ef\u4ee5\u628a\u6bcf\u4e2a\u9633\u6027\u7ec6\u80de\u7684\u539f\u8ba1\u6570\u753b\u6210\u5c0f\u63d0\u7434\u65c1\u7684\u6296\u52a8\u70b9\uff0c\u5217\u51fa\u4e00\u5206\u5b50\u4e0e\u591a\u5206\u5b50\u5404\u6709\u591a\u5c11\u6761\u7801\u3002\u8fd9\u4e2a\u8865\u56fe\u56de\u7b54\u9633\u6027\u7ec6\u80de\u5185\u90e8\u7684\u4fe1\u53f7\u662f\u5426\u7a33\u5b9a\uff0c\u6bd4\u6bd4\u8f83\u4e24\u9897\u70b9\u8c01\u84dd\u5f97\u66f4\u6df1\u591a\u63d0\u4f9b\u4e86\u4e00\u5c42\u5b9e\u9645\u8bc1\u636e\u3002<\/p>\n<p>\u6700\u540e\u4e00\u4e2a\u7ec6\u8282\u662f\u70b9\u9762\u79ef\u3002\u6709\u4e9b\u8f6f\u4ef6\u9ed8\u8ba4\u7528\u534a\u5f84\u6620\u5c04\u6bd4\u4f8b\uff0c\u672c\u4f8b\u7528\u6563\u70b9\u9762\u79ef\u6620\u5c04\uff1b\u56e0\u6b64\u6570\u503c\u5b8c\u5168\u76f8\u540c\uff0c\u4e24\u4e2a\u7248\u672c\u7684\u70b9\u770b\u8d77\u6765\u4e5f\u53ef\u80fd\u5927\u5c0f\u4e0d\u540c\u3002\u6c47\u62a5\u65f6\u5148\u5728\u56fe\u4f8b\u6807\u51fa\u5206\u5b50\u548c\u5206\u6bcd\uff0c\u5728\u6700\u5173\u952e\u7684\u4e00\u4e24\u4e2a\u70b9\u65c1\u6807\u4e0a\u9633\u6027\u6570\u548c\u603b\u6570\uff0c\u907f\u514d\u89c2\u4f17\u7528\u8089\u773c\u4f30\u8ba1\u7edd\u5bf9\u767e\u5206\u6bd4\u3002\u7ed9\u5408\u4f5c\u8005\u7684\u8bfb\u56fe\u987a\u5e8f\u53ef\u4ee5\u4ece\u8fd9\u4e09\u6b65\u5f00\u59cb\uff1a\u70b9\u6709\u591a\u5e38\u89c1\u3001\u5168\u7fa4\u7a76\u7adf\u6709\u591a\u5c11\u5206\u5b50\u3001\u76f8\u5bf9\u5176\u4ed6\u7ec4\u4e3a\u4ec0\u4e48\u504f\u9ad8\u3002\u7b49\u5230\u9700\u8981\u5728\u51e0\u5341\u79cd\u4e9a\u7fa4\u548c\u4e00\u6574\u6279\u4f9b\u8005\u95f4\u91cd\u753b\u591a\u4e2a\u57fa\u56e0\u9762\u677f\u65f6\uff0c\u518d\u6839\u636e\u539f\u77e9\u9635\u5927\u5c0f\u548c\u9700\u8981\u4fdd\u7559\u7684\u5206\u5c42\u7ed3\u679c\u9009\u62e9<a href=\"https:\/\/www.biocloudservice.com\/wordpress\/compute-services\/\">\u4e91\u751f\u4fe1\u79d1\u7814\u670d\u52a1\u5668\u79df\u8d41<\/a>\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7528 Kang \u516c\u5f00 PBMC \u539f\u59cb\u8ba1\u6570\uff0c\u624b\u7b97\u70b9\u5927\u5c0f\u3001\u5168\u7fa4\u5747\u503c\u548c\u57fa\u56e0\u5185\u7f29\u653e\u8272\uff0c\u518d\u753b\u516b\u4f4d\u4f9b\u8005\u7684\u5206\u9762\u56fe\u3002<\/p>\n","protected":false},"author":1,"featured_media":72364,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[71],"tags":[],"class_list":["post-72367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-single-cell"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/ysx-sc-practice-091-dotplot-fraction-average.png?fit=1240%2C800&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/72367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/comments?post=72367"}],"version-history":[{"count":1,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/72367\/revisions"}],"predecessor-version":[{"id":73729,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/72367\/revisions\/73729"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/72364"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=72367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=72367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=72367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}