cBioPortalのがんゲノムを可視化してみた

*この記事はbioinformatics2019アドベントカレンダー用の記事でした*

今年はじめてbioinfoアドベントカレンダーに登録したのですが、全く間に合いませんでした。
すっかり穴を開けてしまいましたので、できたところまで公開します。最後の方におまけもあります。

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a768017a-5f80-8d2a-12ad-46395a561354.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a1dd17ce-86b0-fe31-68b4-857c3d5eba50.png" width="50%" />
mutations

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b41a6432-9e02-ddbd-db89-e1f1bb033ed3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/18d61d8b-c98e-205f-de66-5f1d15d6226a.png" width="50%" />
RNA expression, Copy number

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5d178774-d2ae-21ff-a585-d98bff0039ef.png)
coadreadのメチル化

**なお、この記事は必ずしも学術的に正確なものではなく、プログラミングの楽しさやグラフの美しさを主題に焦点を当てたものですのでご容赦ください。詳しい人のツッコミは歓迎します**

## がんゲノムのデータがなかなか手に入らないと思ったら

　がんのゲノムがどうなってるか知りたい人はたくさんいると思います。でも実際には、なかなかがんのゲノムを観察するわけにはいきません。それにはいくつかの理由があります。まず、がんは人間の体の一部です。患者さんが、がんの遺伝子のデータを提供したいと思わなければなりません。次に、調べるべきがんの組織があったとして、シークエンサーが可動していて、バイオインフォできる人がいて、予算もあるという施設はそんなに多くはないでしょう。またそういった条件がすべてクリアされていたとしても、解析できる検体の数は非常に限られるのが現状でしょう。

## TCGAのデータちょっとつらい

　そこで、みんな[TCGA](https://www.cancer.gov/about-nci/organization/ccg/research/structural-genomics/tcga)にデータを取りにいくことを考えると思います。TCGAとは、[The Cancer Genome Atlas (TCGA)](https://www.cancer.gov/about-nci/organization/ccg/research/structural-genomics/tcga) というグループで、[がん組織のシークエンスデータを公共に公開](https://portal.gdc.cancer.gov/)しています。でも、これが意外と大変ですよね。シークエンスの生データって1ファイル何GBも容量あります。さらにダウンロードには申請と許可が必要です。早い話、個人がお家でダウンロードするのは難しいと思います。

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f0210b9b-b2e4-61c2-e135-e06b42c3e651.png" width="50%" />
(画像はTCGAのサイトより）

　しかも、仮に生データをダウンロードできたとしても、マッピングを自分で行わなければなりません。今は[STAR](https://github.com/alexdobin/STAR)や[hisat2](https://github.com/DaehwanKimLab/hisat2)など素晴らしいソフトや、[Galaxy](https://galaxyproject.org/)や[CWL](https://www.commonwl.org/)などワークフローがあるから、メモリ128GB積んだRyzenの自作PCとか用意して、マッピングをすること自体は可能かもしれませんが、その解析結果が正しいかどうかなんてちょっと素人にはわかりません……。だから、そういうのは、できれば避けたいところです。もちろん融合遺伝子を探したいとか、目的がはっきりしている人には大きな意味があると思います。

## そこでcBioPortalですよ

　なので、素直に考えたら、[cBioPortal](https://www.cbioportal.org/)のデータを見に行くしかないと思うんですよね。ひょっとしたら中国あたりに、cBioPortalぐらいの規模のデータベースが、私が知らないだけで隠されているのかも知れませんが、今のところ私はそういうものを知らないので、cBioPortalが地球最大のデータベースということになるかと思います。

　cBioPortalの素晴らしいところはたくさんあります。フロントエンドも素晴らしくて、Webアプリとして使うこともできます。

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0725849f-daac-4b82-9b94-fc41ae7457ce.png" width="50%" />
(悪性黒色腫についてcBioPortalでOncoPlotを表示してみたところ)

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4fc4ad95-5939-1e4a-f4e7-d8f578c284ea.png" width="50%" />
(変異の意義もOncoKBなどのデータベースと照らし合わせることができる)

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2cc7267e-d147-d76b-03f9-9aea802786e0.png" width="60%" />
(肝臓がんの全体のデータを表示したところ。この画面から任意の層別化を行い、生存曲線を描くことも可能である）

　cBioPortalはAPIも提供しており、APIにアクセスすることで効率的にデータを検索することができます。dockerを使えば比較的簡単にcBioPortalサーバーを起動することができますので、そうやって使えば大量アクセスを気にする必要もありません。

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4167544c-94b5-383c-f8bf-b1f0d1f76f29.png" width="50%" />
(素晴らしいAPIが提供されている)

<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/34d1e1a6-bf3b-d098-f751-e9bab5b24550.png" width="60%" />
(Dockerを使えばcBioPortalを自分のマシンで動かすことができる。）

　でも、cBioPortalの一番すごいところは、タブ区切りテキスト形式のデータをGithubのdatahubというリポジトリで公開しているところです。タブ区切りテキストならば、エクセルでも開くことができるので、誰でもがんゲノムのデータを見ることができるわけです。

　結論　→　Datahubのデータを見ればよい。

（※cBioPortalは、プロモーター領域の変異などは登録されていないという弱点もあります）

## cBioPortalからPublicのデータを全部ダウンロードする


<img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7682a38e-009f-7c6e-3498-2063aa86ee0b.png" width="50%" />

https://github.com/cBioPortal/datahub

こちらのリポジトリの内容をダウンロードします。READMEを見るとやり方が書いてありますが、[Git LFS](Git Large File Storage (LFS) ) というコマンドラインツールが必要です。Git LFSをインストールして、READMEの通りにします。

git lfsの設定

```bash
git lfs install --skip-repo --skip-smudge
```

リポジトリのクローン

```
git clone https://github.com/cBioPortal/datahub.git
cd datahub
git lfs install --local --skip-smudge
```

public以下のファイルを全て取得する

```
git lfs pull -I public
```

ディレクトリのサイズは全部で **90GB** もあるのでダウンロードには時間がかかります。しかしsraファイルを直接ダウンロードして自分で処理する手間や時間を考えたらほぼ **0GB**に等しいと言って差し支えないでしょう（強弁）。

## がんの変異、RNA発現、コピーナンバー、メチル化のデータをプロットする

　さて、このように大量にデータを入手してみたら、なんとなく全体像を可視化してみたいと思わないでしょうか？

　突然ですが私はRubyが大好きです。Rubyでグラフを描くためのツールGR.rbを自作しています。(正確にはffiを用いた[GR Framework](https://gr-framework.org/)のRubyバインディングです。)　そこで自作のツールを使用して、がんゲノムのデータを大雑把に可視化してみることにしました。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/03f6edd7-7f87-df38-3d5f-c92772323d42.png)
https://qiita.com/kojix2/items/456259f40d5563005cd1

　また、データフレームの代用として、ApachArrowのRubyバインディングであるRedArrowを使用しています。クラスタリングにはRumaleとnumo-linalgを使用しました。いずれもとてもマイナーなツールですので、たぶんこの記事を読んでもよほどRubyについて詳しい方以外は環境を整える時点で大変で、なかなか再現できないだろうなと思います。Rubyでやるメリットはあまりなくて、私の場合は単にRubyが好きだからそうしています。Ruby以外では、JuliaとGR.jl、Pythonとpython-grなどを使うと、比較的簡単に同じような結果が得られると思います。

*でもねえ、やっぱり人間は自分で作ったツールを使いたくなる生き物だから、たとえ不出来でも自分でツールを作った人だけに見えてくる世界もあると思うんだよね。私はそう信じている…*

### Mutation

* X軸 サンプル
* Y軸 遺伝子（ここでは20000にしました）
* Z軸 1遺伝子のなかのmutationの数

```ruby
# frozen_string_literal: true

require 'fileutils'
require 'gr/plot'
require 'arrow'
require 'progress_bar/core_ext/enumerable_with_progress'

FileUtils.mkdir_p 'mutation'

def read_tsv(path)
  Arrow::Table.load(path,
                    format: 'csv',
                    delimiter: "\t".ord)
end

CANCER_TYPES = %w[paad stad kirp laml thym meso uvm hnsc lihc kich chol pcpg blca
                  coadread ov sarc prad lgg lusc thca esca ucs cesc gbm skcm kirc
                  tgct brca ucec dlbc acc luad].freeze

CANCER_TYPES.each_with_progress do |cancer_type|
  path = '../datahub/public/' + cancer_type + '_tcga/data_mutations_extended.txt'

  df = read_tsv(path)
  p cancer_type: cancer_type, n_rows: df.n_rows
  next if cancer_type == 'brca'

  barcodes = df.select_columns('Tumor_Sample_Barcode')[0].uniq
  sampleids = df.select_columns('Hugo_Symbol')[0].uniq
  result = Array.new(20_000) { Array.new(barcodes.size, 0) }
  df.select_columns('Hugo_Symbol', 'Tumor_Sample_Barcode', 'Consequence').each_record do |record|
    id, sb, co = record.to_a
    unless co == 'synonymous_variant'
      result[sampleids.find_index(id)][barcodes.find_index(sb)] += 1
    end
  end
  opts = { title: cancer_type, size: [200, 160], xflip: true, yflip: true }
  GR.heatmap(result, opts.merge(colormap: 6))
  GR.savefig('mutation/' + cancer_type + '_0.png')
  GR.contour(result, opts)
  GR.savefig('mutation/' + cancer_type + '_1.png')
  GR.surface(result, opts.merge(zlim: [0, 15], colormap: 4))
  GR.savefig('mutation/' + cancer_type + '_2.png')
  GR.surface(result, opts.merge(zlim: [0, 15], colormap: 43))
  GR.savefig('mutation/' + cancer_type + '_3.png')
  GR.surface(result, opts.merge(zlim: [0, 15], colormap: 29))
  GR.savefig('mutation/' + cancer_type + '_4.png')
end
```

#### ACC (Adrenocortical carcinoma) 副腎皮質がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/74e59188-a556-613f-fc18-0b2de52b6d1f.png" alt="acc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c1973889-1f79-8577-2be1-372befa622f3.png" alt="acc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1e841ce2-a29a-49d4-8def-7ea80c53e424.png" alt="acc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d8644caa-a8b7-37b7-3b37-75dd23759bd8.png" alt="acc_4.png" width="50%" /></p>

#### BLCA (Bladder Urothelial Carcinoma) 膀胱がん・尿路上皮がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/36a83b48-fb60-2070-b218-ecfdb82559c1.png" alt="blca_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/751b1733-a4e2-2861-a205-7e8296394354.png" alt="blca_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f2915f7e-f567-66bf-1352-22e268b34f31.png" alt="blca_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2bf8f48a-04ee-bebf-cd28-e41ef29ce811.png" alt="blca_4.png" width="50%" /></p>

#### BRCA (Breast invasive carcinoma) 乳がん

※データ量が多すぎるのか、バーチャルメモリエラーと表示されて出力できず。

#### CESC (Cervical squamous cell carcinoma and endocervical adenocarcinoma) 子宮頸がん

※なぜかこのスタディのデータだけ発現変異の多い順にまとめられていないようです

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/433ef42a-a9fc-4205-61f8-baa0e3d810ff.png" alt="cesc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8084117d-9c2b-09a3-27c5-9434b3ec9ae6.png" alt="cesc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f58c84df-060b-e2fc-abbb-12534cacbe67.png" alt="cesc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cfc3eee1-bacd-f3e8-3989-d630c61ecafa.png" alt="cesc_4.png" width="50%" /></p>

#### CHOL (Cholangiocarcinoma) 胆管がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/681b456b-ba8e-bbf7-a6e0-1626951e49fa.png" alt="chol_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/45b284a2-bf82-327a-8e48-21c2dda85577.png" alt="chol_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b5186633-3298-9498-6bc6-e0cb7923e49d.png" alt="chol_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/51b6eb00-4fd7-1af6-9d39-6db9d4c9c3af.png" alt="chol_4.png" width="50%" /></p>

#### COAD READ (Colon adenocarcinoma) (Rectum adenocarcinoma) 大腸がん・直腸がん

※cBioPortalでは、COADとREADをセットにしてCOADREADとして扱っています。

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4ed09816-7bca-62bd-8a8d-4e94a744e448.png" alt="coadread_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cb3c2527-5643-0600-478c-41459e72537d.png" alt="coadread_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2fac371c-466a-d9c1-5ea3-4240a3ea1403.png" alt="coadread_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/66fb73d1-c544-c714-f9e3-3f7ca08f87be.png" alt="coadread_4.png" width="50%" /></p>

#### DLBC (Lymphoid Neoplasm Diffuse Large B-cell Lymphoma) リンパ腫・びまん性大細胞型B細胞性リンパ腫 

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bdb011e0-0fa1-1aaa-5cc3-f7f608ac9d83.png" alt="dlbc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6ec8de00-ba05-a3e1-7bfa-9c7cae2c7b4b.png" alt="dlbc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/24350e39-4ade-e486-4912-c2662906860c.png" alt="dlbc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/04268c4d-0194-9af5-8ae9-3e57eb483e6e.png" alt="dlbc_4.png" width="50%" /></p>

#### ESCA (Esophageal carcinoma) 食道がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/31c80584-8fa0-b744-b204-5022d4f008d1.png" alt="esca_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0f85be7a-dc6d-0a5a-ac69-91c55d61134f.png" alt="esca_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f76a811d-7d49-f3e1-cac3-92ff2555780b.png" alt="esca_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/96a14c52-80c3-c9ba-923a-f5e9d51fa671.png" alt="esca_4.png" width="50%" /></p>

#### GBM (Glioblastoma multiforme) 膠芽腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/94372899-5065-714e-5522-69667d7429e7.png" alt="gbm_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/48c6cec3-bd43-4808-46ae-22b54824ae3d.png" alt="gbm_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9c3058d5-bf1e-45b4-e3f8-c5d8520a386e.png" alt="gbm_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/56086c5b-3d40-327c-6cd8-c5cddbbcb24a.png" alt="gbm_4.png" width="50%" /></p>

#### HNSC (Head and Neck squamous cell carcinoma) 頭頚部がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/34d417cc-10b9-79f0-01b5-eea849a3f9eb.png" alt="hnsc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a0a9b313-f2cc-4fe6-ad52-b15bafe0db70.png" alt="hnsc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ee35248e-c56b-659f-4549-e098fc9d5d63.png" alt="hnsc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9a23e38c-a55d-b244-db92-f2c3a23644d3.png" alt="hnsc_4.png" width="50%" /></p>

#### KICH (Kidney Chromophobe)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9027b92b-1f6e-ab0b-8b20-1a98cefade55.png" alt="kich_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/174664b7-f552-e64e-1bb9-5e777267d7eb.png" alt="kich_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/99350a69-5169-e8ab-891b-254d140b7a67.png" alt="kich_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ebc631a1-eaa9-c353-d6c0-d5e63b99e1ef.png" alt="kich_4.png" width="50%" /></p>

#### KIRC (Kidney renal clear cell carcinoma)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0045b837-61ee-b194-923f-b3a766a8d9e6.png" alt="kirc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f6b1dddf-67b2-efaf-7ffa-1caffac063b1.png" alt="kirc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3ad2b6d2-4617-1a9e-7d78-19d0417890ca.png" alt="kirc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ad3a11b4-3f14-e505-e37e-f5a5199d561e.png" alt="kirc_4.png" width="50%" /></p>

#### KIRP (Kidney renal papillary cell carcinoma)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9d9da02d-b0ac-7dcf-73b3-c3ee7ed09458.png" alt="kirp_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4b6137f6-fff5-5e25-4c61-175c41c9d4f0.png" alt="kirp_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a6896f02-902f-a9b9-d01f-ad4c4a99255c.png" alt="kirp_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d2a2d265-252b-0b2d-6506-4d45ab5f1fd1.png" alt="kirp_4.png" width="50%" /></p>

#### LAML (Acute Myeloid Leukemia) 急性骨髄性白血病

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9df96bc3-1cf7-0327-7317-b794eb5dabe8.png" alt="laml_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/771f8788-7f52-6c49-35d6-4ef8bebf0d61.png" alt="laml_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/93bbdf90-5f78-a9eb-079c-185fd9a53481.png" alt="laml_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b885390f-ded8-211b-e033-98c85368de91.png" alt="laml_4.png" width="50%" /></p>

#### LGG (Lower Grade Glioma) 神経膠腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1b0821ce-b846-4a40-72b5-f7c91823a291.png" alt="lgg_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/28395a60-3cf0-4025-af42-b3b42b1ca370.png" alt="lgg_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3100f0a8-f882-739d-3c5c-298d82251ab9.png" alt="lgg_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/94458556-2dc3-3621-f36f-5e8d059191ea.png" alt="lgg_4.png" width="50%" /></p>

#### LIHC (Liver hepatocellular carcinoma) 肝臓がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/681e7f26-96d5-800c-83d7-81b889c2f850.png" alt="lihc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f0d78cea-e20f-e1f6-f85a-601a59b7a194.png" alt="lihc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dc5f3142-0031-da3d-b748-247073fc7d2d.png" alt="lihc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a6f8283b-b24b-a126-f3df-d0894eaff35d.png" alt="lihc_4.png" width="50%" /></p>

#### LUAD (Lung adenocarcinoma) 肺腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d9e5372b-7785-ae62-e1ce-41e7c5479246.png" alt="luad_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/da265b0a-de38-1e3f-6bf4-1741753c3c23.png" alt="luad_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/74dd9aee-fc33-2040-cbf7-e49c9d34260b.png" alt="luad_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f7c1a564-fc1f-1c42-e9bf-c6a104f12ba9.png" alt="luad_4.png" width="50%" /></p>

#### LUSC (Lung squamous cell carcinoma) 肺扁平上皮がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ae18bf90-0c1a-3ee7-b7a1-0e4a7abbe898.png" alt="lusc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/170b8b3e-e4d7-0edf-2296-40ef502ef44e.png" alt="lusc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/aa04aa3b-552f-611c-6d75-bf175534b81b.png" alt="lusc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/33a152f5-cb5c-0bf7-f37a-ebc02bb53570.png" alt="lusc_4.png" width="50%" /></p>

#### MESO (Mesothelioma) 中皮腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dd0fc500-ed89-1255-8fd2-dcbcf95284ca.png" alt="meso_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f2de3d9c-1ee5-f981-ac55-b2e6cf9011ba.png" alt="meso_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c9384c32-69b5-46bf-e651-8f1a99b8ef8c.png" alt="meso_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8ca5a134-04d9-8191-92a7-cf6a2ad00f99.png" alt="meso_4.png" width="50%" /></p>

#### OV (Ovarian serous cystadenocarcinoma) 卵巣漿液性のう胞腺腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9febc288-91e6-3bfb-ccf7-6eaded6d21fe.png" alt="ov_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bfcb36e8-56ca-c4ad-d2af-1421bcb8c82b.png" alt="ov_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/deec5f6e-92bd-cb37-0d0c-1da1ab896f60.png" alt="ov_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fbd91252-de9e-f539-54ad-b9d9acd4b814.png" alt="ov_4.png" width="50%" /></p>

#### PAAD (Pancreatic adenocarcinoma) 膵臓がん

※ 1つだけ飛び抜けて変異(mutation)が多い症例があります

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7cd75651-79cd-f51a-ad24-5bc0b808b1e6.png" alt="paad_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b50ead23-ac54-bb54-5a06-28ae4d623cf2.png" alt="paad_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/92aca9b4-a61c-e341-35ae-af7035fa068a.png" alt="paad_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bfb7b097-d9bf-476b-e60a-8b77710e40a3.png" alt="paad_4.png" width="50%" /></p>

#### PCPG (Pheochromocytoma and Paraganglioma)　褐色細胞腫 傍神経節腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0b452ea7-427e-855e-3b37-2c40743e4e68.png" alt="pcpg_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ec1ae0a2-0f54-ec55-ba63-afef1610b874.png" alt="pcpg_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6cf5451d-76e4-2d0d-4873-355927ce27c7.png" alt="pcpg_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/46fc34a4-ecb6-1c53-7fa8-9325757cf153.png" alt="pcpg_4.png" width="50%" /></p>

#### PRAD (Prostate adenocarcinoma) 前立腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/705a4044-5387-af02-440f-ee233e0f20af.png" alt="prad_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e7043d55-edb9-d8c3-86ca-2009026a579e.png" alt="prad_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e2d38d8a-fa17-c0bc-4f56-5bb6799b4baa.png" alt="prad_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cbdb6c20-eb4a-7f7e-f7cd-8e7e24fad9b5.png" alt="prad_4.png" width="50%" /></p>

#### SARC (Sarcoma) 肉腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a1282cad-8cd9-0dab-efe9-e53901d02487.png" alt="sarc_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cb0fd391-d0cd-274d-f638-b228378a27b5.png" alt="sarc_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d4b411fd-7108-4c62-0dee-fbdd5c1f0206.png" alt="sarc_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d6e7e7bf-6e8a-2976-29ce-754e93f154cc.png" alt="sarc_4.png" width="50%" /></p>

#### SKCM (Skin Cutaneous Melanoma) 悪性黒色腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2fa0c215-5ef6-dc7a-189f-b3b846ab745b.png" alt="skcm_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/46806b45-1c5b-6971-e7ef-6adabf1510ca.png" alt="skcm_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6053eb80-363a-8de6-a68b-23bec386696f.png" alt="skcm_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d6198da1-0672-2fca-8983-d2605ee10fba.png" alt="skcm_4.png" width="50%" /></p>

#### STAD (Stomach adenocarcinoma) 胃がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0b6c75a9-62fa-3ee0-a984-6cf8971055ac.png" alt="stad_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b305b83f-7b79-731b-8b3d-cd4e98c12961.png" alt="stad_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ae4523ff-f04b-9de3-8a01-9c39cfdf973d.png" alt="stad_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6d58d8cd-e24b-85dd-90d6-ff9bc60ba215.png" alt="stad_4.png" width="50%" /></p>

#### TGCT (Testicular Germ Cell Tumors) 精巣がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4924a444-47e0-f253-b8cc-1ff6d0824d15.png" alt="tgct_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/52cf2623-0a3a-9efe-0e59-1c365792c2f4.png" alt="tgct_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ec621b89-41c1-8aa4-fabb-1e7359299c51.png" alt="tgct_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f345f2c5-cea1-b778-767a-51f2e3ee53b6.png" alt="tgct_4.png" width="50%" /></p>

#### THCA (Thyroid carcinoma) 甲状腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e0985503-360f-ca0a-60d1-848b61ac953e.png" alt="thca_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c77d1565-8682-ec1e-f6cb-7ca593439938.png" alt="thca_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4478a309-2232-19cf-10c3-437ec5f44ec9.png" alt="thca_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ac8c9ed8-00c2-f149-82dd-ae0f5211d7ae.png" alt="thca_4.png" width="50%" /></p>

#### THYM (Thymoma) 胸腺腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6a6b5cc5-b0af-45bd-018c-f30bcfd3818c.png" alt="thym_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/412147ff-33f3-fe8b-9d8a-573f12ad6b3d.png" alt="thym_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a5d04eac-f4d5-02d0-1b3d-7edfcfc90db1.png" alt="thym_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/993bd1f1-74b1-0221-af26-bfdb4fd4dc19.png" alt="thym_4.png" width="50%" /></p>

#### UCEC (Uterine Corpus Endometrial Carcinoma) 子宮体がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4cf47552-5ec7-26c0-1206-71b69fd9a2b5.png" alt="ucec_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e9bdc04e-d3a5-7c2f-b919-d632d0d9fd50.png" alt="ucec_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/240c562c-62d0-4d8f-f748-380200c2c00b.png" alt="ucec_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/58e9beff-31f2-9ebb-6ee1-b7cd1d6a08a7.png" alt="ucec_4.png" width="50%" /></p>

#### UCS (Uterine Carcinosarcoma) 子宮肉腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4842f036-262c-fd2d-0771-9629a1c2ed7e.png" alt="ucs_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/68e5cda3-c2c8-eac4-1d4f-e68601f0adce.png" alt="ucs_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6260b7e0-8804-9f3f-7f3f-511b545d214a.png" alt="ucs_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f949e83e-d318-360c-5441-e8af99cac378.png" alt="ucs_4.png" width="50%" /></p>

#### UVM (Uveal Melanoma) ぶどう膜黒色腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/801c098b-d203-8306-22ca-5caf4445ad17.png" alt="uvm_0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3d04b7e2-58e7-0bef-eb78-02ff9bce671b.png" alt="uvm_1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6ed43df0-662f-18b4-772c-aa723b858060.png" alt="uvm_3.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5d3b03c9-87dc-43a1-c96f-16c79909d3c8.png" alt="uvm_4.png" width="50%" /></p>

### RNA expression

```ruby
# frozen_string_literal: true

require 'fileutils'
require 'gr/plot'
require 'arrow'
require 'progress_bar/core_ext/enumerable_with_progress'

FileUtils.mkdir_p 'rna'

def read_tsv(path)
  Arrow::Table.load(path,
                    format: 'csv',
                    delimiter: "\t".ord)
end

CANCER_TYPES = %w[paad stad kirp laml thym meso uvm hnsc lihc kich chol pcpg blca
                  coadread ov sarc prad lgg lusc thca esca ucs cesc gbm skcm kirc
                  tgct brca ucec dlbc acc luad].freeze

CANCER_TYPES.each_with_progress do |cancer_type|
  path = '../datahub/public/' + cancer_type + '_tcga/data_RNA_Seq_v2_expression_median.txt'

  df = read_tsv(path)

  z = df.select_columns(2..-1).raw_records
  GR.contour(z, size: [120, 100], title: cancer_type, colormap: 4, zlim: [0, 600_000])
  GR.savefig('rna/' + cancer_type + '_contour.png')
  GR.surface(z, size: [120, 100], title: cancer_type, colormap: 4, zlim: [0, 600_000])
  GR.savefig('rna/' + cancer_type + '_surface.png')
end
```

#### ACC (Adrenocortical carcinoma) 副腎皮質がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6dabf0a8-1ca0-7c05-9e83-bb1c1bf56952.png" alt="acc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b5979d5e-fb4a-9d59-5b22-f1efd6cbccf5.png" alt="acc_surface.png" width="50%" /></p>

#### BLCA (Bladder Urothelial Carcinoma) 膀胱がん・尿路上皮がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b7f35102-861f-eeaa-0df8-e529b78c8bfe.png" alt="blca_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/23646105-a53e-642a-3097-420d1101119f.png" alt="blca_surface.png" width="50%" /></p>

#### BRCA (Breast invasive carcinoma) 乳がん

※メモリ不足表示

#### CESC (Cervical squamous cell carcinoma and endocervical adenocarcinoma) 子宮頸がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c8e68f3a-7d8e-79e0-95f8-128877fab995.png" alt="cesc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6fbf6000-979b-6f7d-54da-2f861e0eb9cd.png" alt="cesc_surface.png" width="50%" /></p>

#### CHOL (Cholangiocarcinoma) 胆管がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9f469145-d7f5-5afe-e969-04519aa9322f.png" alt="chol_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7602ca73-e78f-5880-978c-98c18071d33c.png" alt="chol_surface.png" width="50%" /></p>

#### COAD READ (Colon adenocarcinoma) (Rectum adenocarcinoma) 大腸がん・直腸がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/00f1ca45-b1a4-d3c3-abaf-b8024b7cfd8b.png" alt="coadread_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5f473eae-4f2a-07b9-9de1-3d56bb397452.png" alt="coadread_surface.png" width="50%" /></p>

#### DLBC (Lymphoid Neoplasm Diffuse Large B-cell Lymphoma) リンパ腫・びまん性大細胞型B細胞性リンパ腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/aa45999c-8e1c-24e5-4d91-63c57b2853ef.png" alt="dlbc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/68acbdfd-3bcd-839a-8341-5d94c2c6248b.png" alt="dlbc_surface.png" width="50%" /></p>

#### ESCA (Esophageal carcinoma) 食道がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b1ab17be-4201-90b0-243e-e2df33155076.png" alt="esca_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8bca6d31-95a0-c0c8-2ae6-a6a41170b4d9.png" alt="esca_surface.png" width="50%" /></p>

#### GBM (Glioblastoma multiforme) 膠芽腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bc992aca-504f-cabc-5da9-bee462c1acaf.png" alt="gbm_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/70c0a9e7-9986-93d2-ec71-d01b7853a2b6.png" alt="gbm_surface.png" width="50%" /></p>

#### HNSC (Head and Neck squamous cell carcinoma) 頭頚部がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/58c55b35-52e2-35a7-0c1f-af917ecac90c.png" alt="hnsc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/483a4f2b-6744-eb8d-4020-fc2930355701.png" alt="hnsc_surface.png" width="50%" /></p>

#### KICH (Kidney Chromophobe)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/887c9ede-1f91-d666-ef44-7979c8657b23.png" alt="kich_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9a552ec2-0f8d-8724-6293-16e325f2f6c0.png" alt="kich_surface.png" width="50%" /></p>

#### KIRC (Kidney renal clear cell carcinoma)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/402e9f05-2e82-a282-6a23-fd97b20f55cc.png" alt="kirc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/941086ed-c03f-fbb8-75c0-5f82a38f19bd.png" alt="kirc_surface.png" width="50%" /></p>

#### KIRP (Kidney renal papillary cell carcinoma)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6d2517ac-b3d3-2b01-9cdd-a577204144cc.png" alt="kirp_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/502b9cbc-a8f0-f234-4ba1-5e33ce7f3a43.png" alt="kirp_surface.png" width="50%" /></p>

#### LAML (Acute Myeloid Leukemia) 急性骨髄性白血病

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cbef6286-f391-7864-eca7-9d1765a5fd89.png" alt="laml_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d647961a-1535-4c40-2bdc-173173811a07.png" alt="laml_surface.png" width="50%" /></p>

#### LGG (Lower Grade Glioma) 神経膠腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/66c3b67c-3608-9ab3-509a-a12cca5d0ff6.png" alt="lgg_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/08613088-1cbd-f618-d6d8-ce8e442e0219.png" alt="lgg_surface.png" width="50%" /></p>

#### LIHC (Liver hepatocellular carcinoma) 肝臓がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7b94986b-690b-5875-0b1a-f8cef2a82536.png" alt="lihc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b0f341ee-2d8f-2709-0294-a8dca082ca5d.png" alt="lihc_surface.png" width="50%" /></p>

#### LUAD (Lung adenocarcinoma) 肺腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/036adf89-cd6c-2bbe-95dc-e736db841077.png" alt="luad_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6a2c6520-96d0-8911-eb2c-8bc14157d399.png" alt="luad_surface.png" width="50%" /></p>

#### LUSC (Lung squamous cell carcinoma) 肺扁平上皮がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7554ebda-6a17-632a-ce8c-c4371d48c264.png" alt="lusc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3cd4d620-4011-9996-ec2c-978f107035b2.png" alt="lusc_surface.png" width="50%" /></p>

#### MESO (Mesothelioma) 中皮腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5e80228d-f4eb-c261-2e06-4b3c5e6d94b9.png" alt="meso_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c7ab6b7e-73c6-cbe4-736c-3fc9916d256a.png" alt="meso_surface.png" width="50%" /></p>

#### OV (Ovarian serous cystadenocarcinoma) 卵巣漿液性のう胞腺腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1b8a2c2b-26a5-37ea-e3d8-de3dbedc2948.png" alt="ov_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e5c90c11-d89c-6b8a-3537-9c65cb77db0e.png" alt="ov_surface.png" width="50%" /></p>

#### PAAD (Pancreatic adenocarcinoma) 膵臓がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fbfe55e4-8906-2e68-2ba3-faa92c685bcf.png" alt="paad_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0900ab85-bd66-dbb8-9600-5dafe50c7b3a.png" alt="paad_surface.png" width="50%" /></p>

#### PCPG (Pheochromocytoma and Paraganglioma)　褐色細胞腫 傍神経節腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/96f48b3b-2048-d069-1f35-02af959c84bb.png" alt="pcpg_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/72201412-670f-f4bf-bf26-4ca12dd50281.png" alt="pcpg_surface.png" width="50%" /></p>

#### PRAD (Prostate adenocarcinoma) 前立腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ddc2fec7-4636-f54d-dd71-92df02e63efc.png" alt="prad_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d9e8e37a-906a-a84f-3c95-7b3f64ab1170.png" alt="prad_surface.png" width="50%" /></p>

#### SARC (Sarcoma) 肉腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f2e09355-f8e7-648f-bbad-d39233008da5.png" alt="sarc_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6c1bf778-9cea-88ab-7a19-4215908b4a33.png" alt="sarc_surface.png" width="50%" /></p>

#### SKCM (Skin Cutaneous Melanoma) 悪性黒色腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/359020ae-1aa5-7351-b442-604f2a72e844.png" alt="skcm_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1b4b537b-6d8f-3cd3-51f5-62697950e5d6.png" alt="skcm_surface.png" width="50%" /></p>

#### STAD (Stomach adenocarcinoma) 胃がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dae06b99-9457-a4ec-30b3-f93a6527f105.png" alt="stad_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b5005e58-5646-308e-48c1-8fccfb61584f.png" alt="stad_surface.png" width="50%" /></p>

#### TGCT (Testicular Germ Cell Tumors) 精巣がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9e0fe763-7c4a-2a0e-9403-1296dd97abd1.png" alt="tgct_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/26177b46-aa58-0325-8f37-8e8f42699336.png" alt="tgct_surface.png" width="50%" /></p>

#### THCA (Thyroid carcinoma) 甲状腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8f51bec9-29d6-f9b3-3b25-0809e0a20d80.png" alt="thca_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/336c9318-8092-9518-1e46-57b1ae838ab9.png" alt="thca_surface.png" width="50%" /></p>

#### THYM (Thymoma) 胸腺腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ec4eadc8-1681-6344-1cdc-b794feef4fc4.png" alt="thym_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1350ba54-7756-f56e-3e0c-b4056d0eaa25.png" alt="thym_surface.png" width="50%" /></p>

#### UCEC (Uterine Corpus Endometrial Carcinoma) 子宮体がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d6b05161-0ef1-3886-7320-0acd1885729b.png" alt="ucec_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1fc6e8d2-733a-fb50-731e-1c57f715e70b.png" alt="ucec_surface.png" width="50%" /></p>

#### UCS (Uterine Carcinosarcoma) 子宮肉腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1d1eda50-3309-f45b-f847-e8a59f253d38.png" alt="ucs_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8150a0b4-64a8-0cbc-9e16-c499e7330113.png" alt="ucs_surface.png" width="50%" /></p>

#### UVM (Uveal Melanoma) ぶどう膜黒色腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4fefb1f9-58f2-1046-c415-178ac203bda1.png" alt="uvm_contour.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4d5ee5ee-e044-93e1-cfe0-d446aa15ab4c.png" alt="uvm_surface.png" width="50%" /></p>

## コピーナンバー

今回、一番驚いたのはコピーナンバーでした。想像以上に癌腫ごとに特徴が現れていることがわかります。
色違いで2種類の画像を作ったので掲載します。

```ruby
# frozen_string_literal: true

require 'fileutils'
require 'gr/plot'
require 'arrow'
require 'progress_bar/core_ext/enumerable_with_progress'

FileUtils.mkdir_p 'copy_number'

def read_tsv(path)
  Arrow::Table.load(path,
                    format: 'csv',
                    delimiter: "\t".ord)
end

require 'numo/linalg'
require 'rumale'

def cluster(z, a, b)
  samples = Numo::DFloat.cast(z)

  normalizer = Rumale::Preprocessing::StandardScaler.new
  samples_std = normalizer.fit_transform(samples.transpose)
  samples_std = samples_std.transpose

  if a == 1
    xindex = true
  else
    gmm = Rumale::Clustering::KMeans.new(n_clusters: a)
    pca = Rumale::Decomposition::PCA.new(n_components: 50)
    samples_std_pca = pca.fit_transform(samples_std)
    cluster_ids = gmm.fit_predict(samples_std_pca)

    xindex = cluster_ids.sort_index
  end

  if b == 1
    yindex = true
  else
    gmm2 = Rumale::Clustering::KMeans.new(n_clusters: b)
    pca2 = Rumale::Decomposition::PCA.new(n_components: 50)
    samples_std_pca2 = pca2.fit_transform(samples_std.transpose)
    cluster_ids2 = gmm2.fit_predict(samples_std_pca2)

    yindex = cluster_ids2.sort_index
  end

  z3 = Numo::DFloat.cast(z)
  z3 = z3[xindex, yindex]
  z3
end

CANCER_TYPES = %w[paad stad kirp laml thym meso uvm hnsc lihc kich chol pcpg blca
                  coadread ov sarc prad lgg lusc thca esca ucs cesc gbm skcm kirc
                  tgct brca ucec dlbc acc luad].freeze

CANCER_TYPES.each_with_progress do |cancer_type|
  path = '../datahub/public/' + cancer_type + '_tcga/data_CNA.txt'

  df = read_tsv(path)
  p cancer_type: cancer_type, n_rows: df.n_rows, time: Time.now
  next if cancer_type == "brca"

  z = df.select_columns(2..-1).raw_records
  z = cluster(z, 1, 10)
  GR.histogram(z.flatten, size: [120, 100])
  GR.heatmap(z, size: [120, 100])
  GR.savefig('copy_number/' + cancer_type + '_heatmap0.png')
  GR.heatmap(z, size: [120, 100], colormap: 11)
  GR.savefig('copy_number/' + cancer_type + '_heatmap1.png')
  GR.surface(z, size: [120, 100], title: cancer_type)
  GR.savefig('copy_number/' + cancer_type + '_surface0.png')
  GR.surface(z, size: [120, 100], title: cancer_type, colormap: 4)
  GR.savefig('copy_number/' + cancer_type + '_surface1.png')
  GR.surface(z, size: [120, 100], title: cancer_type, colormap: 11)
  GR.savefig('copy_number/' + cancer_type + '_surface2.png')
end
```

#### ACC (Adrenocortical carcinoma) 副腎皮質がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/397979b3-735f-60fd-8f39-9c5aa8633788.png" alt="acc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/627971a1-c732-18ff-53bc-288dce7329a2.png" alt="acc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2d53f1dc-a464-a2c0-f650-3c130e83f606.png" alt="acc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/241e6ff9-6fac-3edf-7ef6-b7dbd3bbeebc.png" alt="acc_surface2.png" width="50%" /></p>

#### BLCA (Bladder Urothelial Carcinoma) 膀胱がん・尿路上皮がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d72e4806-46d5-887f-e94e-10ddc9c72a91.png" alt="blca_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5ef0bd32-4582-6a07-2964-269812410060.png" alt="blca_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0ab5eb76-9ad4-5e04-e77f-c4ca3becfd84.png" alt="blca_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5cc72dee-2345-f406-bc07-5b016653679b.png" alt="blca_surface2.png" width="50%" /></p>

#### BRCA (Breast invasive carcinoma) 乳がん

※なし

#### CESC (Cervical squamous cell carcinoma and endocervical adenocarcinoma) 子宮頸がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/adad3f84-48f1-3fc1-9d62-782d8d1efe84.png" alt="cesc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2a2fbc88-c924-084c-0bd6-6553e59f9f86.png" alt="cesc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7731b840-6150-177e-b3eb-044ed0386d64.png" alt="cesc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/17713efc-813a-1686-5fa6-14d2cbecdc40.png" alt="cesc_surface2.png" width="50%" /></p>

#### CHOL (Cholangiocarcinoma) 胆管がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/05453286-304f-a34c-2210-4f730043a60c.png" alt="chol_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5faafce8-6489-3c2e-11db-fbb4d5541507.png" alt="chol_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/57f3b745-ba8f-a847-1579-500702da2265.png" alt="chol_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/20dab5ac-ab2f-ea4d-29cd-1652dd302710.png" alt="chol_surface2.png" width="50%" /></p>

#### COAD READ (Colon adenocarcinoma) (Rectum adenocarcinoma) 大腸がん・直腸がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d55d4201-c582-da2d-9123-8466ac86d733.png" alt="coadread_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5db195d2-2cd2-253a-1053-c6c980979d4c.png" alt="coadread_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c426c2f6-b48c-9c55-6a1a-77918381b3b7.png" alt="coadread_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/53372dc7-281e-c782-8912-f898e2238695.png" alt="coadread_surface2.png" width="50%" /></p>

#### DLBC (Lymphoid Neoplasm Diffuse Large B-cell Lymphoma) リンパ腫・びまん性大細胞型B細胞性リンパ腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/df3b594b-3f21-baca-7de5-0e4229cb55a2.png" alt="dlbc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d5df860b-646c-3eb8-8001-07f616d5c143.png" alt="dlbc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/eff35d9b-5024-77e1-28ff-9042b089721d.png" alt="dlbc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b93c0e3a-2f2d-973b-68cb-e67e9b9827d7.png" alt="dlbc_surface2.png" width="50%" /></p>

#### ESCA (Esophageal carcinoma) 食道がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/340a087b-c0ab-5621-5c3d-23d6e1324f60.png" alt="esca_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c11b62f3-9d56-6a20-6f28-1ed1f7365cdf.png" alt="esca_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bbd1ea75-4386-8113-967c-243fd484631e.png" alt="esca_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b47a800f-0748-ecf4-82d1-11968dee3915.png" alt="esca_surface2.png" width="50%" /></p>

#### GBM (Glioblastoma multiforme) 膠芽腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/de3459fc-b020-1232-c782-8d05843fb7ee.png" alt="gbm_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f4fb0a2e-3517-6165-d67d-3b91a7f5f331.png" alt="gbm_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b642d518-f8a3-fef7-87a5-3e51dd63ef09.png" alt="gbm_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/69006af9-ef51-7797-1993-a48e793273e4.png" alt="gbm_surface2.png" width="50%" /></p>

#### HNSC (Head and Neck squamous cell carcinoma) 頭頚部がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9960a193-0b72-9057-91f1-772335702f5a.png" alt="hnsc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9994a486-b2c3-eb1a-08e3-f0497aab472d.png" alt="hnsc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dcf1a6ab-909d-2997-7b66-b96833e18703.png" alt="hnsc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3b25c84b-e91c-48b8-6f11-fdbfe5ac4fba.png" alt="hnsc_surface2.png" width="50%" /></p>

#### KICH (Kidney Chromophobe)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a300d8cc-1314-48f4-5ff5-4f163a85afba.png" alt="kich_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ea0b1961-0d70-05ea-11b0-36933a21c54b.png" alt="kich_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6122e19b-ecb1-9723-6724-007e5e3d5d6f.png" alt="kich_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f552b922-85df-2f1d-917d-26419806da8c.png" alt="kich_surface2.png" width="50%" /></p>

#### KIRC (Kidney renal clear cell carcinoma)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9a75b8a9-ae68-f557-62bf-bfbed085634c.png" alt="kirc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c2e0f7ad-c1c9-2086-2c10-3b6cd909e0cf.png" alt="kirc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d5a78a17-72a9-79fc-0eef-79d0ff274d43.png" alt="kirc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/77bae39d-965c-d25a-1057-7616d3d1f7e4.png" alt="kirc_surface2.png" width="50%" /></p>

#### KIRP (Kidney renal papillary cell carcinoma)

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a0b14ba2-6f24-2963-bdb5-d78a3224a01f.png" alt="kirp_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f22121de-8c08-fc8a-de8e-14209f88f15e.png" alt="kirp_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/23737fb4-7810-92d2-e78e-e98787a72b05.png" alt="kirp_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a9b46294-1b13-c938-b416-0b09565d08e5.png" alt="kirp_surface2.png" width="50%" /></p>

#### LAML (Acute Myeloid Leukemia) 急性骨髄性白血病

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c6ae6ffc-5e0f-040d-9ece-76ea3df4d0a5.png" alt="laml_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1b419f16-f9de-5184-dfeb-c6997147b2ec.png" alt="laml_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/163073be-a784-c91e-935c-61392469b96f.png" alt="laml_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6661b193-2a13-8eba-4edb-44f025366207.png" alt="laml_surface2.png" width="50%" /></p>

#### LGG (Lower Grade Glioma) 神経膠腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d6c0521d-6f6e-7273-ccf7-a63e8b1d6153.png" alt="lgg_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/715ced56-63a3-8e20-3edf-e683c0cd57ce.png" alt="lgg_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/36fd8429-0c9d-d44f-c877-51e9b9ecb27b.png" alt="lgg_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c5899d1e-9aa8-da3e-1587-15c43e2f3c8f.png" alt="lgg_surface2.png" width="50%" /></p>

#### LIHC (Liver hepatocellular carcinoma) 肝臓がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b6e6cd15-f401-6b97-a429-9c63ff27133f.png" alt="lihc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a6bc60c7-fa59-70cc-a3aa-0a7ab2ea30d8.png" alt="lihc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9e151741-b7f2-3fbf-70aa-d926581f5f2c.png" alt="lihc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4fecefee-67d6-4a83-4628-aa851c10f51a.png" alt="lihc_surface2.png" width="50%" /></p>

#### LUAD (Lung adenocarcinoma) 肺腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2ea84c88-e1e7-53e2-d4bb-7a6d77593961.png" alt="luad_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4b454b6b-202f-454e-47fa-e7ad94c80bf6.png" alt="luad_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3067239e-2c73-a909-7e6e-0bc0cfbacf0b.png" alt="luad_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/eea74816-bf18-2633-e5ac-1affad6d1033.png" alt="luad_surface2.png" width="50%" /></p>

#### LUSC (Lung squamous cell carcinoma) 肺扁平上皮がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/383dbfc9-e509-5583-3ccc-61082fde6af1.png" alt="lusc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dae2ffff-6a1a-9fd9-3a86-bae4652d5934.png" alt="lusc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4cc6eb70-90f3-cb07-c100-424b6110cc65.png" alt="lusc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/46460ed5-870c-c932-b536-95f601b3514c.png" alt="lusc_surface2.png" width="50%" /></p>

#### MESO (Mesothelioma) 中皮腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b4819748-cb05-ab7e-8509-6dcf00ad1c02.png" alt="meso_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9aba706a-9cbd-2b0f-37d1-14f95bb35ce5.png" alt="meso_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/343b2166-05b2-a601-b632-b7821af8fc1c.png" alt="meso_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9972689e-761d-7a6e-d974-dcd98946db22.png" alt="meso_surface2.png" width="50%" /></p>

#### OV (Ovarian serous cystadenocarcinoma) 卵巣漿液性のう胞腺腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/90a4c03b-dbca-a939-a2be-6bf013ed0a48.png" alt="ov_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d3e691da-5f37-a461-43bd-98093f71c1ec.png" alt="ov_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ef5712f4-3577-0a66-7359-f58ef3b07e9a.png" alt="ov_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/77ddddd7-36fc-4728-b8d7-acb8ef203478.png" alt="ov_surface2.png" width="50%" /></p>

#### PAAD (Pancreatic adenocarcinoma) 膵臓がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/25f32448-0917-e4bf-ff32-c25efd8ad774.png" alt="paad_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ca33fd1c-87fd-f29f-242f-cf2bf3518ff0.png" alt="paad_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4b1fda91-390f-d74e-cf97-22f9844cfc83.png" alt="paad_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/007af0e7-293a-3a55-bc41-3b67deb7e702.png" alt="paad_surface2.png" width="50%" /></p>

#### PCPG (Pheochromocytoma and Paraganglioma)　褐色細胞腫 傍神経節腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/18546d62-4e3f-7b11-cf50-1299cbd90cc6.png" alt="pcpg_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7c5568aa-5688-68f1-5150-91be674f8201.png" alt="pcpg_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0f59c132-f3e5-eab7-58bd-37b8a0131dd9.png" alt="pcpg_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6e3db0eb-851e-4b17-bdf3-c9148ee8271e.png" alt="pcpg_surface2.png" width="50%" /></p>

#### PRAD (Prostate adenocarcinoma) 前立腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cb22a9c4-4036-12f0-34b6-ee2cf9ece010.png" alt="prad_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/39b656a1-df5a-aa4b-4b7a-8362a92300ef.png" alt="prad_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f219ba7f-97cd-cf1f-1da4-69fc02a9c882.png" alt="prad_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7f325c85-48d0-464a-2de9-22f2b80030f2.png" alt="prad_surface2.png" width="50%" /></p>

#### SARC (Sarcoma) 肉腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c825ef23-2001-c08d-5238-a3f08c51c18b.png" alt="sarc_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4604e2db-374d-b6bb-4555-65d23311cf89.png" alt="sarc_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f189d442-60b2-2f73-3a71-af05d49d6ab4.png" alt="sarc_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d233978a-1e53-55fe-421b-7123787347ee.png" alt="sarc_surface2.png" width="50%" /></p>

#### SKCM (Skin Cutaneous Melanoma) 悪性黒色腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d6ccc0bc-2dea-e6db-1935-5c1291ea6894.png" alt="skcm_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/00f7456b-860a-f808-875a-78439db8b146.png" alt="skcm_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/03615176-1305-1713-d54f-5b4ff98fc08b.png" alt="skcm_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fef36a01-0ae2-070f-c4e6-351802a9a836.png" alt="skcm_surface2.png" width="50%" /></p>

#### STAD (Stomach adenocarcinoma) 胃がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c1c2e8e5-1f27-b25a-67c9-8c415354099a.png" alt="stad_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a0118cc1-4f80-283e-63c5-8abd4da22bab.png" alt="stad_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3836e26e-c9f9-d11e-971b-ec7f85bd3dac.png" alt="stad_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/15bdbee4-0231-7f7d-c4fb-a4549467d120.png" alt="stad_surface2.png" width="50%" /></p>

#### TGCT (Testicular Germ Cell Tumors) 精巣がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fdb2aa7b-7843-f4ac-33ec-cedad51f0412.png" alt="tgct_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/969c13ff-c810-0515-e2c5-f7722208c394.png" alt="tgct_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/aede460a-166d-b319-41c2-9a64da32f2de.png" alt="tgct_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f69c8145-4c5c-e814-d28b-7d49a21b3b76.png" alt="tgct_surface2.png" width="50%" /></p>

#### THCA (Thyroid carcinoma) 甲状腺がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fc3916a2-11d2-5945-635d-6cce802188b2.png" alt="thca_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6336fcac-a4b4-6ee5-9e47-16cb20a93d33.png" alt="thca_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5f126a8d-fdb1-cdf0-e817-5fbfe61a4654.png" alt="thca_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/788d4097-8c34-4fae-e2d0-cd9e9986ac82.png" alt="thca_surface2.png" width="50%" /></p>

#### THYM (Thymoma) 胸腺腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/838dbe90-6a11-65ab-d03c-2ad71da0a6fa.png" alt="thym_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a0ca7190-5685-98a7-17db-2047c5f3a40a.png" alt="thym_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/68febb12-c6ee-2e93-942c-4c86e3729ee0.png" alt="thym_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bfbbed81-5b24-35fd-a887-bc2caa358be4.png" alt="thym_surface2.png" width="50%" /></p>

#### UCEC (Uterine Corpus Endometrial Carcinoma) 子宮体がん

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6c1e5d8c-4a34-2a0c-6d60-aef0fdd99da5.png" alt="ucec_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/279498b0-4b0b-774e-3eb8-fafdc3578f0b.png" alt="ucec_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0afd3a88-3f40-d001-802e-797eeba1c70d.png" alt="ucec_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dfc72473-ffc6-c8ba-b1fb-064b467d3990.png" alt="ucec_surface2.png" width="50%" /></p>

#### UCS (Uterine Carcinosarcoma) 子宮肉腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7f36820f-e2f1-3ebb-3c6b-8c1e5c4e791c.png" alt="ucs_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/31b45997-50a1-6ad5-1636-93d64aac6f7e.png" alt="ucs_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/20c2d1a3-f494-57b0-fab2-50e0681b47ee.png" alt="ucs_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f8be0e7f-61ae-312b-8284-2eb1a8028628.png" alt="ucs_surface2.png" width="50%" /></p>

#### UVM (Uveal Melanoma) ぶどう膜黒色腫

<p><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3f79b49d-b072-ced9-d5f3-fe35c2b6ff49.png" alt="uvm_heatmap0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d4c597fd-ce8b-d38f-db64-5d9d33512cf0.png" alt="uvm_heatmap1.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/52cb5c2a-05f0-ba3b-05c7-e06256b9beab.png" alt="uvm_surface0.png" width="50%" /><img src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d582f369-1032-495b-32a6-fefdd7948200.png" alt="uvm_surface2.png" width="50%" /></p>

## メチル化

これは画像を拡大する意味があまりないかなと思うので、小さい画像でご覧ください。単に綺麗であるという理由で色違い3種類を用意しています。そこまで意味はないので、タペストリー的に見てください。上はクラスタリングなし、下はごく適当にクラスタリングをかけています。中には精巣がんのようにくっきりと層別化されているように見えるものもあります。厳密にはあまり意味のない画像かもしれませんが、それぞれのstudyがどれぐらい層別化できそうかの雰囲気ぐらいはつかめると思います。

```ruby
# frozen_string_literal: true

require 'fileutils'
require 'gr/plot'
require 'arrow'
require 'progress_bar/core_ext/enumerable_with_progress'

FileUtils.mkdir_p 'methylation'

def read_tsv(path)
  Arrow::Table.load(path,
                    format: 'csv',
                    delimiter: "\t".ord)
end

require 'numo/linalg'
require 'rumale'

def cluster(z, a, b)
  samples = Numo::DFloat.cast(z)

  normalizer = Rumale::Preprocessing::StandardScaler.new
  samples_std = normalizer.fit_transform(samples.transpose)
  samples_std = samples_std.transpose

  if a == 1
    xindex = true
  else
    gmm = Rumale::Clustering::KMeans.new(n_clusters: a)
    pca = Rumale::Decomposition::PCA.new(n_components: 50)
    samples_std_pca = pca.fit_transform(samples_std)
    cluster_ids = gmm.fit_predict(samples_std_pca)

    xindex = cluster_ids.sort_index
  end

  if b == 1
    yindex = true
  else
    gmm2 = Rumale::Clustering::KMeans.new(n_clusters: b)
    pca2 = Rumale::Decomposition::PCA.new(n_components: 50)
    samples_std_pca2 = pca2.fit_transform(samples_std.transpose)
    cluster_ids2 = gmm2.fit_predict(samples_std_pca2)

    yindex = cluster_ids2.sort_index
  end

  z3 = Numo::DFloat.cast(z)
  z3 = z3[xindex, yindex]
  z3
end

CANCER_TYPES = %w[paad stad kirp laml thym meso uvm hnsc lihc kich chol pcpg blca
                  coadread ov sarc prad lgg lusc thca esca ucs cesc gbm skcm kirc
                  tgct brca ucec dlbc acc luad].freeze

CANCER_TYPES.each_with_progress do |cancer_type|
  path = '../datahub/public/' + cancer_type + '_tcga/data_methylation_hm450.txt'
  next unless File.exist? path

  df = read_tsv(path)
  p cancer_type: cancer_type, n_rows: df.n_rows, time: Time.now
  next if cancer_type == 'brca'

  z_ = df.select_columns(2..-1).raw_records
  z0 = z_.map { |i| i.map { |j| j == 'NA' ? 0.0 : j.to_f } }
  z1 = cluster(z0, 1, 6)
  z2 = cluster(z0, 6, 6)
  [z0, z1, z2].each_with_index do |z, i|
    GR.heatmap(z, size: [120, 100], title: cancer_type)
    GR.savefig('methylation/' + cancer_type + "_#{i}" + '_heatmap0.png')
    GR.heatmap(z, size: [120, 100], title: cancer_type, colormap: 4)
    GR.savefig('methylation/' + cancer_type + "_#{i}" + '_heatmap1.png')
    GR.heatmap(z, size: [120, 100], title: cancer_type, colormap: 6)
    GR.savefig('methylation/' + cancer_type + "_#{i}" + '_heatmap2.png')
  end
end
```

#### ACC (Adrenocortical carcinoma) 副腎皮質がん

![acc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5cdc3662-cf8b-610c-c7be-049d8120da35.png)![acc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/edd97550-30be-0d5a-2d83-2add425066e7.png)![acc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2cc9e9ad-9944-0ceb-004c-31d19611aa89.png)
![acc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fa5e0233-a34d-66e5-2458-37d3975e6970.png)![acc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/380bc5e6-582f-2b02-652b-227059b01601.png)![acc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fff141b2-0d7a-ddb8-f0dd-0b60be561968.png)

#### BLCA (Bladder Urothelial Carcinoma) 膀胱がん・尿路上皮がん

![blca_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/797be894-f352-2d2b-ebe7-125377cace0f.png)![blca_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3d4c6439-ec00-a509-04c4-c72823ad3d15.png)![blca_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8cab7d68-e8f3-c3df-e3e5-8ca814dfb2d7.png)![blca_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/713f55d6-0c52-112f-f396-782b072cb1a3.png)![blca_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/66133f39-2dcf-31dc-d534-6dbc84322a7a.png)![blca_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/015af77c-c811-2ad9-3fcb-559b6abb40dc.png)

#### BRCA (Breast invasive carcinoma) 乳がん

※ なし（メモリ不足表示）

#### CESC (Cervical squamous cell carcinoma and endocervical adenocarcinoma) 子宮頸がん

![cesc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0824eaa7-f350-d388-7e14-55c72b6b71ff.png)![cesc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/010775aa-129c-a666-82bb-b87fb8f688b3.png)![cesc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/26f1a083-88e1-27d5-dc7a-bb7480efd8fe.png)![cesc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7a3b548e-4fbc-8186-b14f-15915b8ddf76.png)![cesc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dffb9f5e-6dae-2882-8ab8-151f940491c7.png)![cesc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a7a61690-1293-f1ef-8f93-b76339676017.png)

#### CHOL (Cholangiocarcinoma) 胆管がん

![chol_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e0002f94-fbec-0361-7282-074d1d6b237c.png)![chol_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3dffa7f2-a3bc-81e7-0530-07333a724d30.png)![chol_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/356c0baf-b779-8a8d-70b7-556017f5bfa3.png)![chol_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e0a66030-1482-6438-1b10-e8b6862285c9.png)![chol_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e2e5ae88-fa7e-eca7-debe-3b6a6f4463ef.png)![chol_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fa9400a2-8b0e-e639-381a-83269fbb3e3f.png)

#### COAD READ (Colon adenocarcinoma) (Rectum adenocarcinoma) 大腸がん・直腸がん

![coadread_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/85c9ce2f-8a7e-6d84-c133-acf4569fc880.png)![coadread_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/df8c1d2f-0641-2cf0-178a-c18705b0a99f.png)![coadread_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a604c16e-a29f-32ee-fea9-2b3d5adbd233.png)
![coadread_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6ac92c1e-3277-b3b5-1a3e-c5d6369d5802.png)![coadread_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2d376ec7-64f4-b500-44fc-60a1302b6b08.png)![coadread_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4c85050d-641f-9266-af43-6845a862d0f2.png)

#### DLBC (Lymphoid Neoplasm Diffuse Large B-cell Lymphoma) リンパ腫・びまん性大細胞型B細胞性リンパ腫 

![dlbc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b4d422ca-65a3-bd8d-75e2-4c979661deb1.png)![dlbc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a067ed7f-7964-d10d-e6c9-2e324aba61ff.png)![dlbc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ae3abbea-a2c7-37a0-54ae-5adade7a3ac8.png)![dlbc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d271d00d-496a-7946-a331-19dcd18ffb42.png)![dlbc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/be93bf5c-396f-bd32-ceae-b2d67750c6d3.png)![dlbc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3a6da364-6391-a2f8-0296-da590afa5c23.png)

#### ESCA (Esophageal carcinoma) 食道がん

![esca_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a2dcbd12-c445-3399-633a-b057f1754b87.png)![esca_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bac7bfbc-ce4c-05c1-f338-5f8569857d77.png)![esca_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/31658d5d-f5f9-51aa-0728-ada1ac13d160.png)![esca_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f97a91de-ad47-4e8d-51bf-6793c6bcb591.png)![esca_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7916f3df-c444-2172-395f-bc9e0ae72a07.png)![esca_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/07ca8577-a6fd-8040-8471-0dd8300cea5a.png)

#### GBM (Glioblastoma multiforme) 膠芽腫

![gbm_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f235e392-732d-48a2-1916-1bb77acbed20.png)![gbm_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c179d022-c118-9eb7-e2fd-7cc09f08af52.png)![gbm_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/34f5ae32-671d-bf61-6f97-fb1787132d4a.png)![gbm_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/372fc544-7c07-2c33-0731-b97c4920269f.png)![gbm_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/09967b1c-1816-5aac-8dbb-a6d7f981faf1.png)![gbm_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/16aeeffb-dfc8-af7c-943e-83a36e8fe642.png)

#### HNSC (Head and Neck squamous cell carcinoma) 頭頚部がん

![hnsc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d395537f-e7af-d75d-34ef-21d714e21669.png)![hnsc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e879de78-5f96-eb6e-157f-820e59f0b35b.png)![hnsc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a7a09129-c479-00d2-05ee-47ac24794b55.png)![hnsc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5f3063b5-82ec-5787-d226-a2ebeb777a60.png)![hnsc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e74ce511-549a-ba63-76ce-f5bfedf3985d.png)![hnsc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/46af9c29-af8d-40d8-078e-f344ae253fcd.png)

#### KICH (Kidney Chromophobe)

![kich_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e247ef27-1a31-b25c-cd5a-4cff2c44d29a.png)![kich_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/94f0445a-3beb-c20e-39e5-eab7a8eb86ff.png)![kich_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e778f6bf-4695-ed41-f956-088490d6693b.png)![kich_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/23f9c2fd-c81b-0fef-07c1-dd95e2f57b26.png)![kich_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b90cbb38-621c-aa6b-cbc8-690d9b4d4f8c.png)![kich_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6242a175-2923-ff33-6c3c-d81b2eb33569.png)

#### KIRC (Kidney renal clear cell carcinoma)

![kirc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cc8c606f-7336-fb66-ca35-46c08773f00c.png)![kirc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/800cdabc-cb98-d3ff-a41c-b97636e0c924.png)![kirc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3f127fe2-88c7-d87a-4086-6c64356d5205.png)![kirc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f0c5b868-ac4b-204d-3e51-98cbe0ade93b.png)![kirc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/fd75eaae-89d1-140e-174e-a21d0fff9af4.png)![kirc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3e088f1e-2d9b-0e39-c6f7-558baacf0af0.png)

#### KIRP (Kidney renal papillary cell carcinoma)

![kirp_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2eb18a91-3be9-3390-ca2c-e074c68c3299.png)![kirp_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c4ccd403-ef7a-916a-100d-61ffbb7194a0.png)![kirp_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/33a694d4-d3f3-11b7-1d6d-7c9a338e307f.png)![kirp_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a41f96b1-6de5-8b3f-62b0-bb165a616096.png)![kirp_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/29616f3a-66ea-6ba1-570c-8e822921f21d.png)![kirp_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/c1823bc4-2ee5-93c9-c121-ac3ba2c6ec99.png)

#### LAML (Acute Myeloid Leukemia) 急性骨髄性白血病

![laml_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1b41bf81-1952-831f-a03d-7ef5bb995921.png)![laml_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/abc5eb39-cd58-e6c6-eed1-b96121479117.png)![laml_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b20f8c67-fe30-131e-77d7-b08b364d28fc.png)
![laml_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/515129f9-3a4c-93c5-50ea-5269e06ff3be.png)![laml_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4c034446-363f-fc21-74cf-fbfe3fc472a9.png)![laml_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/008b55a6-9620-6b6f-cd9f-2a368633cb55.png)

#### LGG (Lower Grade Glioma) 神経膠腫

![lgg_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f1e39970-f09a-e273-6543-71e4d8e09dd7.png)![lgg_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/db5b8400-48df-159e-f9a8-e1639f6f5345.png)![lgg_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0eb7761f-6cad-fd4f-92e6-46c38035673e.png)![lgg_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1995b7aa-d4bf-9679-6809-eefd1dbf236d.png)![lgg_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/83ea04d6-0bd6-914e-d503-b6059e5bd703.png)![lgg_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/66056e14-f3ae-6fef-82a8-21785f4be74a.png)

#### LIHC (Liver hepatocellular carcinoma) 肝臓がん

![lihc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8cc96f72-028f-ac36-8315-4f9e8ebe2cbd.png)![lihc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1bf9a8b8-6df6-f16a-415f-7ce7fa886b5a.png)![lihc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/37cca228-c5b5-ea53-5258-e13a25c6d1d5.png)![lihc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/870e0372-016b-95f3-e65d-e3fd6aeb2ccc.png)![lihc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/62110d2a-7309-85ea-5629-155d3ad4d973.png)![lihc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f48b230c-f29a-88cc-9468-f16e83e53b9d.png)

#### LUAD (Lung adenocarcinoma) 肺腺がん

![luad_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/90081a06-065d-c6e8-86f0-35283b4857a1.png)![luad_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/99dc3433-a2ea-5072-e242-232623575c75.png)![luad_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a8a697ea-3424-a42d-841d-7ece0a627ac7.png)![luad_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/765b82db-8af0-7a15-8980-4885f44914ed.png)![luad_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3eff7a67-a02d-3aec-e8cb-07301315bf52.png)![luad_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3b87e882-7621-db37-551d-64bf523a4e4f.png)

#### LUSC (Lung squamous cell carcinoma) 肺扁平上皮がん

![lusc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/87e1002b-9592-2d15-fe0d-698956e75e28.png)![lusc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e9e8ad99-4891-60ca-a579-64a07e9cb6d0.png)![lusc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9a785a08-af9c-c1ce-1ee4-892537b1bcbe.png)![lusc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1b42a884-9bc3-0881-5adc-e33083de11ff.png)![lusc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/952b9857-dc08-475d-58e6-9915626eb814.png)![lusc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1e62e689-a87c-a88b-0877-69254e6dfd0f.png)

#### MESO (Mesothelioma) 中皮腫

![meso_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9529d258-1d84-b692-ac93-f49280720a95.png)![meso_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bb348f0d-7683-c810-1b5b-a76da731d48f.png)![meso_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d7ef01da-2939-9717-af91-e8ab7f9724ce.png)![meso_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/28058d6e-59a7-0785-8f3e-e35317eb8316.png)![meso_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/25ea24dc-c0f4-c590-d810-b70c0b46c13f.png)![meso_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7a628d6b-b31e-cf69-3da3-7fcf26ae96c4.png)

#### OV (Ovarian serous cystadenocarcinoma) 卵巣漿液性のう胞腺腫

![ov_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b25b5c9f-ceb1-0b0b-ef38-d28415ff2dca.png)![ov_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/1e551afb-9c3b-0217-bfb3-77d04883a9f7.png)![ov_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5f0ce717-b003-3a92-6eda-b66a741678ae.png)![ov_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7a0e37b3-4689-9c72-a508-0f5369f05272.png)![ov_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/293b0c81-5e88-bfa6-03b8-a6b5e8e2c8a4.png)![ov_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2d97fed2-2fe6-e264-ae06-e2944ba64568.png)

#### PAAD (Pancreatic adenocarcinoma) 膵臓がん

![paad_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/95d9886b-2920-0b2f-a559-da289957a2cb.png)![paad_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/12135cd0-0fe2-50cc-b640-cf810a3c991f.png)![paad_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/e0883a16-b983-41ab-dfd5-9fa83bf3dac1.png)![paad_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/598a56fc-be28-b39c-b18a-7d55c77814e7.png)![paad_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7748d944-067a-e821-60a6-e0bf50e095be.png)![paad_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7ed147e8-6227-a437-14ea-fcd61fe23846.png)

#### PCPG (Pheochromocytoma and Paraganglioma)　褐色細胞腫 傍神経節腫

![pcpg_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8945402d-0294-0d4c-bfea-0e01bf8176d3.png)![pcpg_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9a16f4b4-92bf-2d32-7ceb-6a82dcbfb7ca.png)![pcpg_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/05a3ddcb-a2eb-36a2-bea4-cc65be15558c.png)![pcpg_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/605f0eba-dc94-c2f1-2e5c-44263f22f060.png)![pcpg_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ccb49519-9ada-efb6-10f2-6d33e5ad58eb.png)![pcpg_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0d3128c6-340b-fd79-afdf-c8db02d68828.png)

#### PRAD (Prostate adenocarcinoma) 前立腺がん

![prad_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6717d364-dd6a-4eea-7ad0-458b5ecbe630.png)![prad_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/afbd5637-7e33-2887-df06-94657abe91a7.png)![prad_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a1676d35-148e-154a-3b26-b5453e9912f2.png)![prad_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/eeab2fb5-3c95-04bc-cb8e-d4a5f5a59e14.png)![prad_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d6eef6f7-937f-edc5-5864-34742c2357e0.png)![prad_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/d5004e30-7661-3fef-26f5-8fbd0ecfd693.png)

#### SARC (Sarcoma) 肉腫

![sarc_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/de953e19-e25e-d5a1-1e79-79b9798d6e36.png)![sarc_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7c67f02f-8923-eccc-06d4-ad1a2c94b9d3.png)![sarc_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/870892da-1820-84fe-521e-5e53bb374142.png)![sarc_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/0571c0af-b166-111e-426c-6e29798657e1.png)![sarc_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/7cb0d1a4-fe7f-4fe8-1373-8ade71698021.png)![sarc_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/226da7f2-647f-7afa-105a-4b4973118c59.png)

#### SKCM (Skin Cutaneous Melanoma) 悪性黒色腫

![skcm_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8653bf47-d111-db3e-0a3e-137ea526c5e2.png)![skcm_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/650d3220-102b-970c-6739-bf3354e4c388.png)![skcm_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9581b9bf-1643-3e63-6b33-8d2daaf8aa1f.png)![skcm_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ddb541ed-34d1-f00e-3a35-a361cf8cbefa.png)![skcm_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/27659b0d-c1a8-38b1-6096-dd3aa82e942b.png)![skcm_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a5cd9628-d18d-2954-64b7-1fac0f033a02.png)

#### STAD (Stomach adenocarcinoma) 胃がん

![stad_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ef6d3805-fc4e-210a-f34c-a41158cc6813.png)![stad_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9881c961-3d06-758a-9dfc-7d090989af45.png)![stad_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2e4e0fd2-3f88-76b2-3b09-0022e6eea431.png)![stad_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/224105b3-6f28-24a4-c960-7280bb39401a.png)![stad_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/548833da-6384-e220-5863-ff6a7b5299a8.png)![stad_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/39ef48de-d81e-ad07-4580-c153288f1fea.png)

#### TGCT (Testicular Germ Cell Tumors) 精巣がん

![tgct_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9b661421-fbb8-f81f-522a-a7cdfe11130e.png)![tgct_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/71243359-9b80-654f-df48-eec0484386ae.png)![tgct_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a59297dc-df0c-bbf3-1f4c-5c8337ef698b.png)![tgct_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6c9e3ccb-6ba4-4764-3a2d-c0362d025ced.png)![tgct_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2c07a98a-01a5-6adf-deff-9e844b6273e8.png)![tgct_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6bbfdf42-dbf8-3493-19c7-1b0bb06dc7c3.png)

#### THCA (Thyroid carcinoma) 甲状腺がん

![thca_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/4f2ecafd-96bd-7238-a5bb-6f76bbdd28c6.png)![thca_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/8fe8566a-2bc7-cadc-718e-01744063eda3.png)![thca_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/18957b2c-6586-3a94-80bd-ba92444e8e37.png)![thca_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/6acba77d-71ff-91fa-e8c0-7e0db81895d9.png)![thca_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/a1f06cd7-60cf-0565-8310-d57ff54326a7.png)![thca_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/741b3874-01a8-16a5-5251-e6cd127be242.png)

#### THYM (Thymoma) 胸腺腫

![thym_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/267171d5-edc6-4b83-b92a-7a1b4ee76cb0.png)![thym_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3fd79a77-6d90-d910-eacf-539eacd7b445.png)![thym_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2fd7d1cf-0d06-363f-a19e-2c237c938a0f.png)![thym_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/90b24267-1c7f-6cfd-ed87-9d158d763772.png)![thym_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/5cae563a-cda8-3707-64b3-2406fdcbf3b3.png)![thym_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/325a2ea3-97f0-7743-f84a-a7ce953ce47d.png)

#### UCEC (Uterine Corpus Endometrial Carcinoma) 子宮体がん

![ucec_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/dc0dbbe7-e5ea-36be-55c2-c016c4efa9da.png)![ucec_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3f141bfd-5d24-5711-823d-2398afb76285.png)![ucec_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/9692f43a-8140-f58a-2bdc-f5bfbe45c2da.png)![ucec_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/bcd40fc8-ceb6-2b83-d93c-20f07ae47226.png)![ucec_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b157b0ca-7a8a-4479-bf04-668e26e8cd68.png)![ucec_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/2b41be06-27a5-c633-26b5-0729b8639826.png)

#### UCS (Uterine Carcinosarcoma) 子宮肉腫

![ucs_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/eeda7944-1283-7fce-ac14-a06ea8e201b7.png)![ucs_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/96961f5a-d9a6-42c9-2606-dd87d1b4eaa8.png)![ucs_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/477b516e-ca89-30eb-a468-912d26cc0894.png)![ucs_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f6159c40-a022-f9f6-0717-dc1b937447e2.png)![ucs_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/41d86569-16e9-04f8-00bb-cda2263238f2.png)![ucs_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/b2d0b897-3423-17af-d4f2-55db077046d8.png)

#### UVM (Uveal Melanoma) ぶどう膜黒色腫

![uvm_0_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/3e28eb3e-9012-d240-b959-349b237715bb.png)![uvm_0_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/47c3fb2f-552b-1188-2edc-12011f54a6c7.png)![uvm_0_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/cc308ac7-6152-a3f4-7943-333f860b97e7.png)![uvm_2_heatmap0.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/20208222-f2e1-f56d-24e3-5d4ca9daf3bd.png)![uvm_2_heatmap1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/09f245ae-f6d3-0b82-3978-3d9ab2547854.png)![uvm_2_heatmap2.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/39233cc7-b7ef-6841-c0ae-61d2e014ebc7.png)

## おまけ1 機械学習について

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/f5d32c6f-57ab-3dcd-99ff-d3c500fcfa38.png)

みたいなことをみんな考えているんじゃないでしょうか。知らんけど。

**新NP問題つよい!**

## おまけ2 cBioPortalのGoogleSummerOfCode

cBioPortalでは学生さんがコードを書くGoogleSummerOfCodeをやっています。パスウェイのどこが亢進しているのかみたり、SparkやParquetとの連携をしようとしているようです。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/504b89bb-f088-2839-eac0-3a9c6b5edd85.png)

画像の出典：https://twitter.com/cbioportal/status/1167531397134897153

## おまけ3 cBioPortalはインスタンスの調査をしているようです

下記のツイッター画像にあるように、cBioPortalでは、世界のどこでローカルインスタンスを使っているか、アンケート調査を行っています。日本でcBioPortalのインスタンスを立ち上げたことがある人は、ぜひアンケートに協力してあげてください。7月17日の時点では日本が空白になっています。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/144608/ac27433a-a52c-04e2-0e1c-6358b8ae74c6.png)


この記事は以上です。ふう。
ここまでスクロールしてくれた人がいたらありがとうございました。