{"id":294,"date":"2024-10-16T18:06:32","date_gmt":"2024-10-16T10:06:32","guid":{"rendered":"https:\/\/www.kz-hub.tech\/?p=294"},"modified":"2024-10-16T18:13:23","modified_gmt":"2024-10-16T10:13:23","slug":"select-%e7%aa%81%e5%8f%98-cnv%e7%9b%b8%e5%85%b3%e6%80%a7%e7%ae%97%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.kz-hub.tech\/index.php\/2024\/10\/16\/select-%e7%aa%81%e5%8f%98-cnv%e7%9b%b8%e5%85%b3%e6%80%a7%e7%ae%97%e6%b3%95\/","title":{"rendered":"SELECT\u2014\u2014\u7a81\u53d8\/CNV\u76f8\u5173\u6027\u7b97\u6cd5"},"content":{"rendered":"<p><a href=\"http:\/\/ciriellolab.org\/select\/select.html\">SELECT R\u5305\u53ca\u6d4b\u8bd5\u6570\u636e\u4e0b\u8f7d\u94fe\u63a5<\/a><\/p>\n<p>\u6ce8\u610f 1.6 \u7248\u672c\u7684SELECT\u9700\u8981\u4fee\u6539\u6e90\u4ee3\u7801\uff0c\u5728select_APC_threshold.R \u7684get_thresh.2 &lt;- function(x, A) \u51fd\u6570\u7b2c\u4e00\u884c\u6dfb\u52a0x &lt;- as.data.frame(x)\uff0c\u5426\u5219\u4f1a\u62a5\u9519<\/p>\n<p><a href=\"https:\/\/pubmed.ncbi.nlm.nih.gov\/28756993\/#:~:text=Cancer%20evolves%20through%20the%20emergence%20and%20selection%20of,these%20evolutionary%20dependencies%20and%20their%20impact%20remain%20unclear.\">SELECT \u539f\u6587\u94fe\u63a5  2017 Cancer Cell<\/a><\/p>\n<h3>\u4f7f\u7528\u4ee3\u7801<\/h3>\n<pre><code class=\"language-R\">## 1. \u8bfb\u5165maf\u6587\u4ef6 ####\nIBC_nonIBC_maf &lt;- read.maf(&quot;\/home\/zhoukaiwen\/IBC\/WES\/somatic\/all.maf&quot;)\n\n## 2. \u6784\u5efagam ####\nmaf2gam &lt;- function(maf_file){ # \u8bbe\u7f6e\u51fd\u6570\u8f6cmaf\u683c\u5f0f\u4e3a\u7a81\u53d8\u77e9\u9635 ####\n  maf_file_df &lt;- data.frame(matrix(nrow = length(unique(maf_file@data$Tumor_Sample_Barcode)), ncol = length(unique(maf_file@data$Hugo_Symbol))))\n  rownames(maf_file_df) &lt;- unique(maf_file@data$Tumor_Sample_Barcode)\n  colnames(maf_file_df) &lt;- unique(maf_file@data$Hugo_Symbol)\n  maf_file_df[is.na(maf_file_df)] &lt;- &quot;FALSE&quot;\n  for (i in 1:nrow(maf_file@data)) {\n    # \u68c0\u67e5\u884c\u540d\u548c\u5217\u540d\u662f\u5426\u5b58\u5728\u4e8e A \u4e2d\n    if (maf_file@data$Tumor_Sample_Barcode[i] %in% rownames(maf_file_df) &amp;&amp; maf_file@data$Hugo_Symbol[i] %in% colnames(maf_file_df)) {\n      maf_file_df[as.character(maf_file@data$Tumor_Sample_Barcode[i]), as.character(maf_file@data$Hugo_Symbol[i])] &lt;- &quot;TRUE&quot;\n    }\n  }\n  return(maf_file_df)\n}\n\nIBC_nonIBC_maf_df &lt;- maf2gam(IBC_nonIBC_maf)\n\n## 3. \u6784\u5efa\u6837\u672c\u5206\u7c7b\u6570\u636e\u6846 ####\nsample_class &lt;- data.frame(TumorType = rep(&quot;IBC&quot;,39),SampleType=rep(&quot;Tumor&quot;,39))\nrownames(sample_class) &lt;- rownames(IBC_nonIBC_maf_df)\nsample_class$TumorType[grepl(&quot;nonIBC&quot;,rownames(sample_class))] &lt;- &quot;nonIBC&quot;\nsample_class$SampleType[grepl(&quot;-S&quot;,rownames(sample_class))] &lt;- &quot;Skin&quot;\n\n## 4. \u6784\u5efa\u57fa\u56e0\u7ec4\u53d8\u5f02\u7c7b\u578b\u6570\u636e\u6846 ####\nalteration_class &lt;- data.frame(SampleID = colnames(IBC_nonIBC_maf_df),\n                               alteration_type = rep(&quot;Mutation&quot;,length(colnames(IBC_nonIBC_maf_df))))\nrownames(alteration_class) &lt;- alteration_class$SampleID\nalteration_class$SampleID &lt;- NULL\n\n# 5. \u81ea\u5df1\u6784\u5efaAL\u6587\u4ef6\u7528\u4e8e\u5206\u6790 ####\n## 5.1 \u8f93\u5165\u6587\u4ef61\uff1a\u7a81\u53d8\u77e9\u9635\uff0c\u884c\u540d\u4e3a\u6837\u672c\u540d\uff0c\u5217\u540d\u4e3a\u57fa\u56e0\u540d\uff0cTRUE\u4e3a\u6709\u7a81\u53d8\uff0cFALSE\u4e3a\u65e0\u7a81\u53d8\nIBC_al = new.AL(as.matrix(IBC_nonIBC_maf_df))\n\n## 5.2 \u8f93\u5165\u6587\u4ef62\uff1a\u6837\u672c\u5206\u7ec4\u8868\uff0c\u884c\u540d\u4e3a\u6837\u672c\u540d\uff0c\u5217\u4e3a\u5206\u7ec4\u4fe1\u606f\uff0c\u53ef\u4ee5\u5728al$samples\u4e0b\u4f7f\u7528\u591a\u79cd\u5206\u7ec4\u65b9\u5f0f\nIBC_al$samples$sample_id &lt;- rownames(sample_class)\nIBC_al$samples$tumor_type = sample_class[rownames(IBC_al$am),]$TumorType\nnames(IBC_al$samples$tumor_type)&lt;-rownames(sample_class)\nIBC_al$samples$sample_type &lt;- sample_class[rownames(IBC_al$am),]$SampleType\nnames(IBC_al$samples$sample_type) &lt;- rownames(sample_class)\n\n## 5.3 \u8f93\u5165\u6587\u4ef63\uff1a\u57fa\u56e0\u7684\u53d8\u5f02\u7c7b\u578b\u8868\uff0c\u884c\u540d\u4e3a\u57fa\u56e0\u540d\uff0c\u5217\u4e3a\u57fa\u56e0\u7ec4\u53d8\u5f02\u7c7b\u578b\uff08MUTATION\/CNA_AMP\/CNA_DEL\uff09\nIBC_al$alterations$alteration_id &lt;- rownames(alteration_class)\nIBC_al$alterations$alteration_type &lt;- alteration_class[colnames(IBC_al$am),]\nnames(IBC_al$alterations$alteration_type) &lt;- rownames(alteration_class)\n\nView(IBC_al)\n\n## 6. Run SELECT ####\nIBC_alpi = select(M=IBC_al$am, \n                  sample.class=IBC_al$samples$tumor_type, \n                  alteration.class=IBC_al$alterations$alteration_type, \n                  folder=&#039;select_pancan23_IBC\/&#039;, \n                  n.cores=4)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>SELECT R\u5305\u53ca\u6d4b\u8bd5\u6570\u636e\u4e0b\u8f7d\u94fe\u63a5 \u6ce8\u610f 1.6 \u7248\u672c\u7684SELECT\u9700\u8981\u4fee\u6539\u6e90\u4ee3\u7801\uff0c\u5728select_APC_&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-294","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":2,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"predecessor-version":[{"id":296,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/posts\/294\/revisions\/296"}],"wp:attachment":[{"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kz-hub.tech\/index.php\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}