温馨提示×

温馨提示×

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

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

R语言的tsne_analysis.r怎么使用

发布时间:2022-03-19 17:51:46 来源:亿速云 阅读:116 作者:iii 栏目:开发技术

本篇内容主要讲解“R语言的tsne_analysis.r怎么使用”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“R语言的tsne_analysis.r怎么使用”吧!

tsne_analysis.r 表达聚类分析

使用说明:

$ Rscript $scriptdir/tsne_analysis.r -h
usage: /work/my_stad_immu/scripts/tsne_analysis.r [-h] -i filepath -m metadata
                                                  [-d dims] [-p perplexity]
                                                  [--theta theta]
                                                  [-M initial_dims] [-T top]
                                                  -g group [-s size]
                                                  [-a alpha] [-e] [-L]
                                                  [-X x.lab] [-Y y.lab]
                                                  [-t title] [-o outdir]
                                                  [-n prefix] [-H height]
                                                  [-W width]

t-Distributed Stochastic Neighbor Embedding t-SNE analysis:
https://www.亿速云.com/article/1498

optional arguments:
  -h, --help            show this help message and exit
  -i filepath, --input filepath
                        input the dataset martix [required]
  -m metadata, --metadata metadata
                        input metadata file path[required]
  -d dims, --dims dims  set Output dimensionality [default=2]
  -p perplexity, --perplexity perplexity
                        Perplexity parameter (should not be bigger than 3 *
                        perplexity < nrow(X) - 1, see details for
                        interpretation) [default 50]
  --theta theta         Speed/accuracy trade-off (increase for less accuracy),
                        set to 0.0 for exact TSNE [default 0.5]
  -M initial_dims, --initial_dims initial_dims
                        the number of dimensions that should be retained in
                        the initial PCA step [default 50]
  -T top, --top top     select top gene to analysis [default NULL]
  -g group, --group group
                        input group id in metadata file to fill
                        color[required]
  -s size, --size size  point size [optional, default: 3]
  -a alpha, --alpha alpha
                        point transparency [0-1] [optional, default: 1]
  -e, --ellipse         whether draw ellipse [optional, default: False]
  -L, --label           whether show pionts sample name [optional, default:
                        False]
  -X x.lab, --x.lab x.lab
                        the label for x axis [optional, default: t-SNE1]
  -Y y.lab, --y.lab y.lab
                        the label for y axis [optional, default: t-SNE2]
  -t title, --title title
                        the label for main title [optional, default: t-SNE]
  -o outdir, --outdir outdir
                        output file directory [default cwd]
  -n prefix, --name prefix
                        out file name prefix [default demo]
  -H height, --height height
                        the height of pic inches [default 5]
  -W width, --width width
                        the width of pic inches [default 5]

参数说明

dims参数设置降维之后的维度,默认是2
perplexity

困惑度,参数须取值小于 (样本数量-1)/3  

theta参数越大,结果的准确度越低,默认是0.5
max_iter最大迭代次数
pca表示是否对输入的原始数据进行PCA分析,然后用分析后的数据进行后续分析,默认TRUE 


使用举例:

#降维验证分组
#####t-SNE
Rscript $scriptdir/tsne_analysis.r -i immu/ssgsea.res.tsv -m metadata.group.tsv \
  -o tsne -g subtype.hclust -p 6 -n tsne

到此,相信大家对“R语言的tsne_analysis.r怎么使用”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

向AI问一下细节

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

AI