您好,登錄后才能下訂單哦!
本篇內容主要講解“R語言如何根據ID列表取對應列的數據”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“R語言如何根據ID列表取對應列的數據”吧!
subset_column.r 根據ID列表,取對應列的數據子集
usage: /share/nas1/huangls/test/TCGA_GEO_immu/scripts/subset_column.r [-h] -i input -m idlist [-c colname] [-o outdir] [-p prefix] get data by column ID optional arguments: -h, --help show this help message and exit -i input, --input input input matrix data [required] -m idlist, --idlist idlist input column ID list ,default first column [required] -c colname, --colname colname match column name in idlist [required] -o outdir, --outdir outdir output file directory [default cwd] -p prefix, --prefix prefix output file name prefix [default demo]
-i 輸入要處理的表格,第一列會都成行名
TCGA-D7-A74A-01A-11R-A32D-31 | TCGA-BR-7704-01A-11R-2055-13 | TCGA-VQ-A91N-01A-11R-A414-31 | TCGA-CD-A4MH-01A-11R-A251-31 | |
TSPAN6 | 19.71229 | 15.16812 | 58.95336274 | 112.4479129 |
TNMD | 0.128679 | 0 | 0 | 0.417115888 |
DPM1 | 166.1934 | 229.3096 | 160.0258308 | 223.6269896 |
SCYL3 | 8.721258 | 3.71577 | 18.44681977 | 8.307169238 |
C1orf112 | 6.935284 | 2.181263 | 16.46792983 | 7.387781561 |
FGR | 2.251234 | 18.9202 | 3.145843585 | 7.801411858 |
CFH | 3.535552 | 14.03032 | 12.53080064 | 10.27682391 |
FUCA2 | 103.1044 | 119.298 | 128.6210801 | 138.7011133 |
GCLC | 30.47744 | 25.12227 | 30.24963988 | 25.52302692 |
-m 指定ID列表,-c colname 指定哪一列作為ID列表的列表;
barcode | patient | shortLetterCode | definition | stage |
TCGA-B7-A5TK-01A-12R-A36D-31 | TCGA-B7-A5TK | TP | Primary solid Tumor | Stage IIIA |
TCGA-BR-7959-01A-11R-2343-13 | TCGA-BR-7959 | TP | Primary solid Tumor | Stage IIIA |
TCGA-IN-8462-01A-11R-2343-13 | TCGA-IN-8462 | TP | Primary solid Tumor | Stage IIB |
TCGA-BR-A4CR-01A-11R-A24K-31 | TCGA-BR-A4CR | TP | Primary solid Tumor | Stage IIIC |
TCGA-CG-4443-01A-01R-1157-13 | TCGA-CG-4443 | TP | Primary solid Tumor | Stage IA |
TCGA-KB-A93J-01A-11R-A39E-31 | TCGA-KB-A93J | TP | Primary solid Tumor | Stage II |
TCGA-IN-A6RO-01A-12R-A33Y-31 | TCGA-IN-A6RO | TP | Primary solid Tumor | Stage IA |
TCGA-HU-A4H3-01A-21R-A251-31 | TCGA-HU-A4H3 | TP | Primary solid Tumor | Stage IIIC |
TCGA-RD-A8MV-01A-11R-A36D-31 | TCGA-RD-A8MV | TP | Primary solid Tumor | Stage IIIB |
Rscript subset_column.r -i ../01.TCGA_download/TCGA-STAD_gene_expression_TPM.tsv -m metadata.tsv -p TCGA-STAD_gene_expression_TPM
到此,相信大家對“R語言如何根據ID列表取對應列的數據”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。