R语言怎么在metadata中添加基因表达数据

发布时间:2022-03-21 10:33:08 作者:iii
来源:亿速云 阅读:816

这篇“R语言怎么在metadata中添加基因表达数据”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“R语言怎么在metadata中添加基因表达数据”文章吧。

merge_metadata_genexpdata.r  在metadata中添加基因表达数据

使用说明:

metadata添加基因表达结果。 基因表达文件行为不同基因,列为不同样本, 只要是列为不同样本的文件都可以用这个脚本合并到metadata中;

$Rscript $scriptdir/merge_metadata_genexpdata.r -h
usage: /share/nas1/huangls/test/TCGA_immu/scripts/merge_metadata_genexpdata.r
       [-h] -m metadata -g expset -b by [--log2] [-o outdir] [-p prefix]
merge metadata and gene expression:
optional arguments:
  -h, --help            show this help message and exit
  -m metadata, --metadata metadata
                        input metadata file path with suvival time [required]
  -g expset, --expset expset
                        input gene expression set file [required]
  -b by, --by by        input sample ID column name in metadata [required]
  --log2                whether do log2 transfrom for expression data
                        [optional, default: False]
  -o outdir, --outdir outdir
                        output file directory [default cwd]
  -p prefix, --prefix prefix
                        out file name prefix [default cox]

参数说明:

-m  指定metadata文件:

barcodepatientsampleshortLetterCodedefinitionsample_submitter_idsample_type_idsample_idsample_type
TCGA-B7-A5TK-01A-12R-A36D-31TCGA-B7-A5TKTCGA-B7-A5TK-01ATPPrimary solid TumorTCGA-B7-A5TK-01A158937d2c-b4c3-4992-a95c-d0d1fa73f1a9Primary Tumor
TCGA-BR-7959-01A-11R-2343-13TCGA-BR-7959TCGA-BR-7959-01ATPPrimary solid TumorTCGA-BR-7959-01A1c8fc5fb2-ded2-48af-a87d-36c367a3330dPrimary Tumor
TCGA-IN-8462-01A-11R-2343-13TCGA-IN-8462TCGA-IN-8462-01ATPPrimary solid TumorTCGA-IN-8462-01A126509d1e-253b-463c-8654-589929889fbePrimary Tumor
TCGA-BR-A4CR-01A-11R-A24K-31TCGA-BR-A4CRTCGA-BR-A4CR-01ATPPrimary solid TumorTCGA-BR-A4CR-01A176165733-85ca-47d0-a82a-f64fa9b1b834Primary Tumor
TCGA-CG-4443-01A-01R-1157-13TCGA-CG-4443TCGA-CG-4443-01ATPPrimary solid TumorTCGA-CG-4443-01A1f4fb736a-42c9-4367-a327-d0d1c4cba359Primary Tumor
TCGA-KB-A93J-01A-11R-A39E-31TCGA-KB-A93JTCGA-KB-A93J-01ATPPrimary solid TumorTCGA-KB-A93J-01A1888711a8-8ffd-49bb-aa85-7455c07f1ad5Primary Tumor
TCGA-BR-4371-01A-01R-1157-13TCGA-BR-4371TCGA-BR-4371-01ATPPrimary solid TumorTCGA-BR-4371-01A195d6e839-a21b-4266-b7f8-e47fab262af3Primary Tumor
TCGA-IN-A6RO-01A-12R-A33Y-31TCGA-IN-A6ROTCGA-IN-A6RO-01ATPPrimary solid TumorTCGA-IN-A6RO-01A1c6e17043-a145-4cc3-b889-4f499b17dbf3Primary Tumor
TCGA-HU-A4H3-01A-21R-A251-31TCGA-HU-A4H3TCGA-HU-A4H3-01ATPPrimary solid TumorTCGA-HU-A4H3-01A1cd33e854-1bdf-42e0-83e7-256c723c5b55Primary Tumor
TCGA-RD-A8MV-01A-11R-A36D-31TCGA-RD-A8MVTCGA-RD-A8MV-01ATPPrimary solid TumorTCGA-RD-A8MV-01A1f7a464d1-9939-4ab8-a03b-f2962e618817Primary Tumor
TCGA-VQ-A91X-01A-12R-A414-31TCGA-VQ-A91XTCGA-VQ-A91X-01ATPPrimary solid TumorTCGA-VQ-A91X-01A1288b0130-6744-495e-bd99-da6f6b5f6953Primary Tumor
TCGA-D7-8575-01A-11R-2343-13TCGA-D7-8575TCGA-D7-8575-01ATPPrimary solid TumorTCGA-D7-8575-01A171efd38a-03a9-488d-bde2-18b17559c775Primary Tumor
TCGA-BR-4257-01A-01R-1131-13TCGA-BR-4257TCGA-BR-4257-01ATPPrimary solid TumorTCGA-BR-4257-01A197b44b05-97eb-486c-94db-42838831de0bPrimary Tumor
TCGA-BR-8485-01A-11R-2402-13TCGA-BR-8485TCGA-BR-8485-01ATPPrimary solid TumorTCGA-BR-8485-01A12f1460ea-827b-4c51-86a5-2d85771888bbPrimary Tumor
TCGA-BR-4370-01A-01R-1157-13TCGA-BR-4370TCGA-BR-4370-01ATPPrimary solid TumorTCGA-BR-4370-01A1cfb7901b-e4e1-42fe-802d-dcd34f8c4912Primary Tumor
TCGA-D7-A748-01A-12R-A32D-31TCGA-D7-A748TCGA-D7-A748-01ATPPrimary solid TumorTCGA-D7-A748-01A1308bca2d-6e27-4da9-9a07-b0eb88437953Primary Tumor
TCGA-VQ-A91Z-01A-11R-A414-31TCGA-VQ-A91ZTCGA-VQ-A91Z-01ATPPrimary solid TumorTCGA-VQ-A91Z-01A1ec6ed61a-1d7e-4057-9ac2-dd1ed2accfb0Primary Tumor
TCGA-RD-A7C1-01A-11R-A32D-31TCGA-RD-A7C1TCGA-RD-A7C1-01ATPPrimary solid TumorTCGA-RD-A7C1-01A1b905ac72-aae1-4e6e-b560-46b9f4f9ef5fPrimary Tumor

-g  指定要合并的 文件:

cell_typeTCGA-B7-A5TK-01A-12R-A36D-31TCGA-BR-7959-01A-11R-2343-13TCGA-IN-8462-01A-11R-2343-13TCGA-BR-A4CR-01A-11R-A24K-31TCGA-CG-4443-01A-01R-1157-13TCGA-KB-A93J-01A-11R-A39E-31TCGA-BR-4371-01A-01R-1157-13TCGA-IN-A6RO-01A-12R-A33Y-31TCGA-HU-A4H3-01A-21R-A251-31TCGA-RD-A8MV-01A-11R-A36D-31
B cells naive0.0418060.1190340.2754510.2437890.1187530.0975260.0874380.1107360.0918990.114157
B cells memory0000000000
Plasma cells0.0057780.0099670.04908000.0094010.0065960.0128190.0043260.001989
T cells CD80.3998130.0813830.0522030.03256800.0172330.0421460.0742340.1923310.10848
T cells CD4 naive0000000000
T cells CD4 memory resting00.1636050.1585590.2058050.1613540.1970310.4454670.2074070.0957210.173691
T cells CD4 memory activated0.2225870.0564290.0227860.0264880.0086630.0491170.0165070.0623090.1325770.077914
T cells follicular helper0.006564000.00744400.017110.0090810.0604540.0406370.056979
T cells regulatory (Tregs)00.0340660.082630.0406020.0019320.03829700.0528590.0520450.045091
T cells gamma delta000000.00810800.0048700
NK cells resting00.03487500.028080.03182100.0180450.0062810.0234370.029263
NK cells activated0.0069600.029651000.04728600.0044720.0074890
Monocytes0.0054110.0137880.00713300.024350.0020080.013182000.00139
Macrophages M00.0145140.0903520.0250320.1047250.167050.2242990.0784760.1175330.0683650.109002
Macrophages M10.1359670.1032230.1006430.01227100.0808390.0788760.1224650.0636670.103607
Macrophages M20.0892590.1595240.0447030.1373460.4281930.1563850.1010520.102870.0716460.077649
Dendritic cells resting0.0143160.0192490.0592990.00617800.0227080.043902000.004566

使用举例:

将免疫浸润的结果合并到metadata中方便后续做比较分析:

Rscript $scriptdir/merge_metadata_genexpdata.r -m  ../08.Nomogram/nomogram_metadata.tsv -g ../03.TIME/immu/timer.res.tsv \
   -b barcode -p metadata_risk_score_timer

以上就是关于“R语言怎么在metadata中添加基因表达数据”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注亿速云行业资讯频道。

推荐阅读:
  1. Metadata Lock在MySQL数据库中有什么作用
  2. TypeScript中Reflect Metadata怎么用

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

r语言 metadata

上一篇:R包安装报错77怎么解决

下一篇:R语言的univariate_cox.r怎么使用

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》