{"id":1098458,"date":"2025-01-08T15:21:20","date_gmt":"2025-01-08T07:21:20","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1098458.html"},"modified":"2025-01-08T15:21:23","modified_gmt":"2025-01-08T07:21:23","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%81%9atcga%e6%95%b0%e6%8d%ae%e5%88%86%e6%9e%90-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1098458.html","title":{"rendered":"\u5982\u4f55\u7528python\u505aTCGA\u6570\u636e\u5206\u6790"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24212743\/20140793-b5af-4328-a9c8-0125d89f2545.webp\" alt=\"\u5982\u4f55\u7528python\u505aTCGA\u6570\u636e\u5206\u6790\" \/><\/p>\n<p><p> <strong>\u7528Python\u8fdb\u884cTCGA\u6570\u636e\u5206\u6790\u7684\u65b9\u6cd5\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u6b65\u9aa4\uff1a\u6570\u636e\u83b7\u53d6\u3001\u6570\u636e\u9884\u5904\u7406\u3001\u7279\u5f81\u9009\u62e9\u3001\u6570\u636e\u53ef\u89c6\u5316\u3001\u7edf\u8ba1\u5206\u6790\u548c\u7ed3\u679c\u89e3\u91ca\u3002<\/strong>\u5176\u4e2d\uff0c<strong>\u6570\u636e\u83b7\u53d6<\/strong>\u662f\u6700\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u56e0\u4e3aTCGA\u6570\u636e\u91cf\u5927\u4e14\u590d\u6742\uff0c\u6570\u636e\u9884\u5904\u7406\u5305\u62ec\u4e86\u6570\u636e\u6e05\u6d17\u548c\u6807\u51c6\u5316\u5904\u7406\uff0c\u7279\u5f81\u9009\u62e9\u5219\u662f\u901a\u8fc7\u7b97\u6cd5\u7b5b\u9009\u51fa\u6709\u7528\u7684\u7279\u5f81\u8fdb\u884c\u6df1\u5165\u5206\u6790\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u7528Python\u5b9e\u73b0\u8fd9\u4e9b\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u6570\u636e\u83b7\u53d6<\/h2>\n<\/p>\n<p><p>TCGA (The Cancer Genome Atlas) \u6570\u636e\u5e93\u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u764c\u75c7\u57fa\u56e0\u7ec4\u6570\u636e\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7Python\u5e93\u6765\u8bbf\u95ee\u548c\u4e0b\u8f7d\u8fd9\u4e9b\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u51e0\u79cd\u5e38\u89c1\u7684\u83b7\u53d6\u65b9\u5f0f\uff1a<\/p>\n<\/p>\n<p><h3>1.1 \u4f7f\u7528TCGAbiolinks<\/h3>\n<\/p>\n<p><p>TCGAbiolinks\u662f\u4e00\u4e2aR\u5305\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7rpy2\u5728Python\u4e2d\u8c03\u7528\u5b83\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import rpy2.robjects as robjects<\/p>\n<p>from rpy2.robjects.packages import importr<\/p>\n<h2><strong>\u5bfc\u5165TCGAbiolinks\u5305<\/strong><\/h2>\n<p>TCGAbiolinks = importr(&#39;TCGAbiolinks&#39;)<\/p>\n<h2><strong>\u4e0b\u8f7d\u6570\u636e\uff08\u4f8b\u5982BRCA\u6570\u636e\uff09<\/strong><\/h2>\n<p>robjects.r(&#39;query &lt;- GDCquery(project = &quot;TCGA-BRCA&quot;, data.category = &quot;Transcriptome Profiling&quot;, data.type = &quot;Gene Expression Quantification&quot;)&#39;)<\/p>\n<p>robjects.r(&#39;GDCdownload(query)&#39;)<\/p>\n<p>robjects.r(&#39;data &lt;- GDCprepare(query)&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>1.2 \u4f7f\u7528FireBrowse<\/h3>\n<\/p>\n<p><p>FireBrowse\u662f\u4e00\u4e2aTCGA\u6570\u636e\u7684RESTful API\u63a5\u53e3\uff0c\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7HTTP\u8bf7\u6c42\u83b7\u53d6\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>url = &quot;http:\/\/firebrowse.org\/api\/v1\/Analyses\/Mutation\/MAF&quot;<\/p>\n<p>params = {<\/p>\n<p>    &quot;cohort&quot;: &quot;BRCA&quot;,<\/p>\n<p>    &quot;tcga_participant_barcode&quot;: &quot;TCGA-3C-AAAU&quot;,<\/p>\n<p>    &quot;tool&quot;: &quot;MutSig2CV&quot;,<\/p>\n<p>    &quot;format&quot;: &quot;json&quot;<\/p>\n<p>}<\/p>\n<p>response = requests.get(url, params=params)<\/p>\n<p>data = response.json()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>1.3 \u4f7f\u7528TCGA-Assembler<\/h3>\n<\/p>\n<p><p>TCGA-Assembler\u4e5f\u662f\u4e00\u4e2aR\u5305\uff0c\u53ef\u4ee5\u901a\u8fc7rpy2\u5728Python\u4e2d\u8c03\u7528\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import rpy2.robjects as robjects<\/p>\n<p>from rpy2.robjects.packages import importr<\/p>\n<h2><strong>\u5bfc\u5165TCGA-Assembler\u5305<\/strong><\/h2>\n<p>TCGAAssembler = importr(&#39;TCGAAssembler2&#39;)<\/p>\n<h2><strong>\u4e0b\u8f7d\u6570\u636e<\/strong><\/h2>\n<p>robjects.r(&#39;data &lt;- DownloadRNASeqData(caseList=&quot;BRCA&quot;, assayPlatform=&quot;RNASeqV2&quot;, outputFileName=&quot;BRCA_RNASeqV2Data&quot;)&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e8c\u3001\u6570\u636e\u9884\u5904\u7406<\/h2>\n<\/p>\n<p><p>\u6570\u636e\u9884\u5904\u7406\u662f\u5206\u6790\u7684\u5173\u952e\u6b65\u9aa4\uff0c\u4e3b\u8981\u5305\u62ec\u6570\u636e\u6e05\u6d17\u548c\u6807\u51c6\u5316\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h3>2.1 \u6570\u636e\u6e05\u6d17<\/h3>\n<\/p>\n<p><p>\u6570\u636e\u6e05\u6d17\u5305\u62ec\u53bb\u9664\u7f3a\u5931\u503c\u3001\u53bb\u9664\u5f02\u5e38\u503c\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u8bfb\u53d6\u6570\u636e<\/strong><\/h2>\n<p>data = pd.read_csv(&quot;BRCA_RNASeqV2Data.csv&quot;)<\/p>\n<h2><strong>\u53bb\u9664\u7f3a\u5931\u503c<\/strong><\/h2>\n<p>data = data.dropna()<\/p>\n<h2><strong>\u53bb\u9664\u5f02\u5e38\u503c<\/strong><\/h2>\n<p>data = data[(data[&#39;value&#39;] &gt;= data[&#39;value&#39;].quantile(0.01)) &amp; (data[&#39;value&#39;] &lt;= data[&#39;value&#39;].quantile(0.99))]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2.2 \u6570\u636e\u6807\u51c6\u5316<\/h3>\n<\/p>\n<p><p>\u6570\u636e\u6807\u51c6\u5316\u662f\u6307\u5c06\u6570\u636e\u8f6c\u6362\u5230\u4e00\u4e2a\u6807\u51c6\u8303\u56f4\u5185\uff0c\u4ee5\u4fbf\u540e\u7eed\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.preprocessing import StandardScaler<\/p>\n<h2><strong>\u6807\u51c6\u5316\u6570\u636e<\/strong><\/h2>\n<p>scaler = StandardScaler()<\/p>\n<p>data_scaled = scaler.fit_transform(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e09\u3001\u7279\u5f81\u9009\u62e9<\/h2>\n<\/p>\n<p><p>\u7279\u5f81\u9009\u62e9\u662f\u901a\u8fc7\u7b97\u6cd5\u7b5b\u9009\u51fa\u5bf9\u5206\u6790\u6709\u5e2e\u52a9\u7684\u7279\u5f81\u3002<\/p>\n<\/p>\n<p><h3>3.1 \u901a\u8fc7\u65b9\u5dee\u9009\u62e9<\/h3>\n<\/p>\n<p><p>\u65b9\u5dee\u9009\u62e9\u6cd5\u662f\u6839\u636e\u7279\u5f81\u7684\u65b9\u5dee\u6765\u9009\u62e9\u7279\u5f81\uff0c\u65b9\u5dee\u8d8a\u5927\uff0c\u7279\u5f81\u8d8a\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.feature_selection import VarianceThreshold<\/p>\n<h2><strong>\u9009\u62e9\u65b9\u5dee\u5927\u4e8e0.1\u7684\u7279\u5f81<\/strong><\/h2>\n<p>selector = VarianceThreshold(threshold=0.1)<\/p>\n<p>data_selected = selector.fit_transform(data_scaled)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3.2 \u901a\u8fc7\u76f8\u5173\u7cfb\u6570\u9009\u62e9<\/h3>\n<\/p>\n<p><p>\u76f8\u5173\u7cfb\u6570\u6cd5\u662f\u6839\u636e\u7279\u5f81\u4e0e\u76ee\u6807\u7684\u76f8\u5173\u6027\u6765\u9009\u62e9\u7279\u5f81\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570<\/strong><\/h2>\n<p>correlation = np.corrcoef(data_selected.T)<\/p>\n<h2><strong>\u9009\u62e9\u76f8\u5173\u7cfb\u6570\u5927\u4e8e0.5\u7684\u7279\u5f81<\/strong><\/h2>\n<p>selected_features = np.where(correlation &gt; 0.5)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u56db\u3001\u6570\u636e\u53ef\u89c6\u5316<\/h2>\n<\/p>\n<p><p>\u6570\u636e\u53ef\u89c6\u5316\u662f\u901a\u8fc7\u56fe\u5f62\u5316\u65b9\u5f0f\u5c55\u793a\u6570\u636e\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>4.1 \u57fa\u56e0\u8868\u8fbe\u70ed\u56fe<\/h3>\n<\/p>\n<p><p>\u70ed\u56fe\u53ef\u4ee5\u76f4\u89c2\u5c55\u793a\u57fa\u56e0\u8868\u8fbe\u91cf\u7684\u53d8\u5316\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u7ed8\u5236\u70ed\u56fe<\/strong><\/h2>\n<p>sns.heatmap(data_selected, cmap=&#39;coolwarm&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4.2 PCA\u964d\u7ef4<\/h3>\n<\/p>\n<p><p>\u4e3b\u6210\u5206\u5206\u6790\uff08PCA\uff09\u662f\u4e00\u79cd\u964d\u7ef4\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u9ad8\u7ef4\u6570\u636e\u6620\u5c04\u5230\u4f4e\u7ef4\u7a7a\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.decomposition import PCA<\/p>\n<h2><strong>PCA\u964d\u7ef4<\/strong><\/h2>\n<p>pca = PCA(n_components=2)<\/p>\n<p>data_pca = pca.fit_transform(data_selected)<\/p>\n<h2><strong>\u7ed8\u5236PCA\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>plt.scatter(data_pca[:, 0], data_pca[:, 1])<\/p>\n<p>plt.xlabel(&#39;PC1&#39;)<\/p>\n<p>plt.ylabel(&#39;PC2&#39;)<\/p>\n<p>plt.title(&#39;PCA of Gene Expression Data&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e94\u3001\u7edf\u8ba1\u5206\u6790<\/h2>\n<\/p>\n<p><p>\u7edf\u8ba1\u5206\u6790\u662f\u901a\u8fc7\u6570\u5b66\u65b9\u6cd5\u5bf9\u6570\u636e\u8fdb\u884c\u5206\u6790\uff0c\u4ee5\u4fbf\u53d1\u73b0\u6570\u636e\u4e2d\u7684\u89c4\u5f8b\u3002<\/p>\n<\/p>\n<p><h3>5.1 \u5dee\u5f02\u8868\u8fbe\u5206\u6790<\/h3>\n<\/p>\n<p><p>\u5dee\u5f02\u8868\u8fbe\u5206\u6790\u662f\u6bd4\u8f83\u4e0d\u540c\u6761\u4ef6\u4e0b\u7684\u57fa\u56e0\u8868\u8fbe\u91cf\uff0c\u4ee5\u4fbf\u53d1\u73b0\u5dee\u5f02\u8868\u8fbe\u57fa\u56e0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from scipy.stats import ttest_ind<\/p>\n<h2><strong>\u5206\u7ec4<\/strong><\/h2>\n<p>group1 = data_selected[:50]  # \u5047\u8bbe\u524d50\u4e2a\u6837\u672c\u5c5e\u4e8e\u7ec41<\/p>\n<p>group2 = data_selected[50:]  # \u540e50\u4e2a\u6837\u672c\u5c5e\u4e8e\u7ec42<\/p>\n<h2><strong>\u8ba1\u7b97t\u68c0\u9a8c<\/strong><\/h2>\n<p>t_stat, p_value = ttest_ind(group1, group2, axis=0)<\/p>\n<h2><strong>\u9009\u62e9p\u503c\u5c0f\u4e8e0.05\u7684\u5dee\u5f02\u8868\u8fbe\u57fa\u56e0<\/strong><\/h2>\n<p>diff_genes = np.where(p_value &lt; 0.05)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>5.2 \u751f\u5b58\u5206\u6790<\/h3>\n<\/p>\n<p><p>\u751f\u5b58\u5206\u6790\u662f\u7814\u7a76\u4e8b\u4ef6\u53d1\u751f\u65f6\u95f4\u7684\u7edf\u8ba1\u65b9\u6cd5\uff0c\u5e38\u7528\u4e8e\u764c\u75c7\u60a3\u8005\u7684\u751f\u5b58\u671f\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import lifelines<\/p>\n<h2><strong>\u8bfb\u53d6\u751f\u5b58\u6570\u636e<\/strong><\/h2>\n<p>survival_data = pd.read_csv(&quot;BRCA_survival_data.csv&quot;)<\/p>\n<h2><strong>\u521b\u5efa\u751f\u5b58\u6570\u636e\u96c6<\/strong><\/h2>\n<p>survival_df = survival_data[[&#39;time&#39;, &#39;status&#39;]]<\/p>\n<p>survival_df[&#39;group&#39;] = [&#39;high&#39; if x &gt; 0 else &#39;low&#39; for x in data_selected[:, 0]]  # \u6839\u636e\u7b2c\u4e00\u4e2a\u57fa\u56e0\u8868\u8fbe\u91cf\u5206\u7ec4<\/p>\n<h2><strong>\u7ed8\u5236\u751f\u5b58\u66f2\u7ebf<\/strong><\/h2>\n<p>kmf = lifelines.KaplanMeierFitter()<\/p>\n<p>for group in survival_df[&#39;group&#39;].unique():<\/p>\n<p>    kmf.fit(survival_df[&#39;time&#39;][survival_df[&#39;group&#39;] == group], event_observed=survival_df[&#39;status&#39;][survival_df[&#39;group&#39;] == group], label=group)<\/p>\n<p>    kmf.plot()<\/p>\n<p>plt.title(&#39;Survival Analysis&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u516d\u3001\u7ed3\u679c\u89e3\u91ca<\/h2>\n<\/p>\n<p><p>\u5206\u6790\u7ed3\u679c\u7684\u89e3\u91ca\u662f\u6570\u636e\u5206\u6790\u7684\u91cd\u8981\u90e8\u5206\uff0c\u901a\u8fc7\u5bf9\u7ed3\u679c\u7684\u89e3\u91ca\u53ef\u4ee5\u5f97\u51fa\u6709\u610f\u4e49\u7684\u7ed3\u8bba\u3002<\/p>\n<\/p>\n<p><h3>6.1 \u5dee\u5f02\u8868\u8fbe\u57fa\u56e0<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u5dee\u5f02\u8868\u8fbe\u5206\u6790\uff0c\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0\u54ea\u4e9b\u57fa\u56e0\u5728\u4e0d\u540c\u6761\u4ef6\u4e0b\u6709\u663e\u8457\u53d8\u5316\uff0c\u8fd9\u4e9b\u57fa\u56e0\u53ef\u80fd\u4e0e\u75be\u75c5\u76f8\u5173\u3002<\/p>\n<\/p>\n<p><h3>6.2 \u751f\u5b58\u5206\u6790\u7ed3\u679c<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u751f\u5b58\u5206\u6790\uff0c\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0\u54ea\u4e9b\u57fa\u56e0\u7684\u8868\u8fbe\u91cf\u4e0e\u60a3\u8005\u7684\u751f\u5b58\u671f\u6709\u5173\uff0c\u8fd9\u4e9b\u57fa\u56e0\u53ef\u80fd\u662f\u6f5c\u5728\u7684\u751f\u7269\u6807\u5fd7\u7269\u3002<\/p>\n<\/p>\n<p><h3>6.3 \u53ef\u89c6\u5316\u7ed3\u679c<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u6570\u636e\u53ef\u89c6\u5316\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u89c2\u5730\u5c55\u793a\u57fa\u56e0\u8868\u8fbe\u91cf\u7684\u53d8\u5316\u548c\u964d\u7ef4\u540e\u7684\u6570\u636e\u5206\u5e03\uff0c\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0c\u4f7f\u7528Python\u8fdb\u884cTCGA\u6570\u636e\u5206\u6790\u9700\u8981\u7ecf\u8fc7\u6570\u636e\u83b7\u53d6\u3001\u6570\u636e\u9884\u5904\u7406\u3001\u7279\u5f81\u9009\u62e9\u3001\u6570\u636e\u53ef\u89c6\u5316\u3001\u7edf\u8ba1\u5206\u6790\u548c\u7ed3\u679c\u89e3\u91ca\u7b49\u591a\u4e2a\u6b65\u9aa4\u3002\u6bcf\u4e2a\u6b65\u9aa4\u90fd\u9700\u8981\u4f7f\u7528\u76f8\u5e94\u7684Python\u5e93\u548c\u65b9\u6cd5\uff0c\u901a\u8fc7\u5408\u7406\u7684\u6d41\u7a0b\u548c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u4eceTCGA\u6570\u636e\u4e2d\u6316\u6398\u51fa\u6709\u4ef7\u503c\u7684\u4fe1\u606f\uff0c\u4e3a\u764c\u75c7\u7814\u7a76\u63d0\u4f9b\u652f\u6301\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5f00\u59cb\u4f7f\u7528Python\u8fdb\u884cTCGA\u6570\u636e\u5206\u6790\uff1f<\/strong><br \/>\u5728\u5f00\u59cbTCGA\u6570\u636e\u5206\u6790\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684Python\u5e93\uff0c\u4f8b\u5982Pandas\u3001NumPy\u3001Matplotlib\u548cSeaborn\u3002\u8fd9\u4e9b\u5e93\u5c06\u5e2e\u52a9\u60a8\u5904\u7406\u6570\u636e\u3001\u8fdb\u884c\u7edf\u8ba1\u5206\u6790\u548c\u53ef\u89c6\u5316\u3002\u5efa\u8bae\u60a8\u719f\u6089TCGA\u6570\u636e\u5e93\u7684\u7ed3\u6784\u4ee5\u53ca\u5982\u4f55\u4e0b\u8f7d\u548c\u5904\u7406\u76f8\u5173\u6570\u636e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7GDC Data Portal\u83b7\u5f97TCGA\u6570\u636e\u96c6\u3002<\/p>\n<p><strong>TCGA\u6570\u636e\u5206\u6790\u4e2d\u5982\u4f55\u5904\u7406\u7f3a\u5931\u503c\uff1f<\/strong><br \/>\u5728TCGA\u6570\u636e\u96c6\u4e2d\uff0c\u7f3a\u5931\u503c\u662f\u4e00\u4e2a\u5e38\u89c1\u95ee\u9898\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528Pandas\u5e93\u4e2d\u7684\u51fd\u6570\u8fdb\u884c\u7f3a\u5931\u503c\u5904\u7406\uff0c\u4f8b\u5982<code>dropna()<\/code>\u7528\u4e8e\u5220\u9664\u7f3a\u5931\u503c\uff0c\u6216\u8005\u4f7f\u7528<code>fillna()<\/code>\u586b\u5145\u7f3a\u5931\u503c\u3002\u5177\u4f53\u7684\u5904\u7406\u65b9\u5f0f\u53d6\u51b3\u4e8e\u6570\u636e\u5206\u6790\u7684\u76ee\u7684\u548c\u7f3a\u5931\u503c\u7684\u6bd4\u4f8b\uff0c\u786e\u4fdd\u5728\u5904\u7406\u7f3a\u5931\u503c\u65f6\u8003\u8651\u5176\u5bf9\u7ed3\u679c\u7684\u5f71\u54cd\u3002<\/p>\n<p><strong>\u5982\u4f55\u53ef\u89c6\u5316TCGA\u6570\u636e\u5206\u6790\u7684\u7ed3\u679c\uff1f<\/strong><br \/>\u4f7f\u7528Matplotlib\u548cSeaborn\u7b49\u53ef\u89c6\u5316\u5e93\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u591a\u79cd\u7c7b\u578b\u7684\u56fe\u8868\u6765\u5c55\u793aTCGA\u6570\u636e\u5206\u6790\u7684\u7ed3\u679c\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u6563\u70b9\u56fe\u3001\u7bb1\u7ebf\u56fe\u548c\u70ed\u56fe\u6765\u76f4\u89c2\u5c55\u793a\u6570\u636e\u7684\u5206\u5e03\u548c\u76f8\u5173\u6027\u3002\u786e\u4fdd\u5728\u56fe\u8868\u4e2d\u6dfb\u52a0\u9002\u5f53\u7684\u6807\u9898\u3001\u6807\u7b7e\u548c\u56fe\u4f8b\uff0c\u4f7f\u7ed3\u679c\u66f4\u52a0\u6e05\u6670\u6613\u61c2\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u7528Python\u8fdb\u884cTCGA\u6570\u636e\u5206\u6790\u7684\u65b9\u6cd5\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u6b65\u9aa4\uff1a\u6570\u636e\u83b7\u53d6\u3001\u6570\u636e\u9884\u5904\u7406\u3001\u7279\u5f81\u9009\u62e9\u3001\u6570\u636e\u53ef\u89c6\u5316\u3001\u7edf\u8ba1 [&hellip;]","protected":false},"author":3,"featured_media":1098462,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098458"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1098458"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098458\/revisions"}],"predecessor-version":[{"id":1098463,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1098458\/revisions\/1098463"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1098462"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1098458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1098458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1098458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}