使用方法:
$Rscript $scriptdir/merge_tsv_files.r -h
usage: /work/STAD_immu_demo1/scripts/merge_tsv_files.r [-h] -i input
[input ...]
[-b by [by ...]]
[-t type] [-p prefix]
[-o outdir]
merge tsv files by rownames
optional arguments:
-h, --help show this help message and exit
-i input [input ...], --input input [input ...]
input gct format file [required]
-b by [by ...], --by by [by ...]
character vector of variable names to join by. If
omitted,will match on all common variables.
-t type, --type type type of join: left (default), right, inner or full
-p prefix, --prefix prefix
output file name prefix [default demo]
-o outdir, --outdir outdir
output file directory [default cwd]
使用说明:
-i 指定多个表格文件所在的路径
--by 两个表格共有ID所在列列名指定:
--type 合并类型,left 以最左边表格关键列的ID为准,不存在的ID会去除;inner取交集
使用举例:
Rscript $scriptdir/merge_tsv_files.r -i $workdir/metadata.tsv hclust/hclusters.tsv \
immu/estimate_score.tsv -p metadata.group --by barcode
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!