FAQ - nibb-gitc/gitc2025mar-rnaseq GitHub Wiki
Rを開いて、下記のコマンドを一行づつ実行する
install.packages(c("coop", "dendextend", "gplots", "ggnewscale", "ggridges", "ggupset", "rgl", "Rtsne", "umap"), dependencies = TRUE)
if (!require("BiocManager", quietly = TRUE)) { install.packages("BiocManager") }
BiocManager::install(c("edgeR", "topGO", "Rgraphviz", "AnnotationHub", "clusterProfiler", "GOSemSim"))
BiocManager::install(c("GenomeInfoDbData", "org.Mm.eg.db", "org.Sc.sgd.db"))
途中で
Update all/some/none? [a/s/n]:
と聞かれたときは、a を押す(all)
samtools flags 83
0x53 83 PAIRED,PROPER_PAIR,REVERSE,READ1
「0x53」 は、頭の「0x」が「この先は16進数」という意味であり、83を16進数で表すと53になる。
なぜ16進数も併記しているのか...? はわかりません
作業ディレクトリの設定
メニューからその他→作業ディレクトリの変更(command+D) でディレクトリ選択
またはsetwd("ディレクトリ名") で選択
MacOS環境のHomebrewでHISAT2をインストールしてHISAT2を実行した際に、以下のようなエラーが出ることがあります。
$ hisat2-build
/xxxx/yyyy/genome.fa
genome_index dyld: Symbol not found:
__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev Referenced from: /usr/local/Cellar/hisat2/2.1.0/bin/hisat2-build-s
Expected in: /usr/lib/libstdc++.6.0.9.dylib in
/usr/local/Cellar/hisat2/2.1.0/bin/hisat2-build-s Abort trap: 6
これは既知の問題として取り上げられています。 参考) https://www.biostars.org/p/328289/ そのため、バイナリから実行することを検討下さい。
まず、HISAT2のサイトに移動し、該当するバイナリをダウンロードします。 https://daehwankimlab.github.io/hisat2/download/
解凍すると、フォルダにhisat2一式があります。 このまま実行できるので、このディレクトリに移動し、
./hisat2
でhisat2を実行できます。
初回起動時のみ、最近のMacOSでは、開発元を検証できない場合の警告が表示されます。
この場合、一旦キャンセルしたあと、「システム環境設定」→「セキュリティとプライバシー」→「一般」を見ると、"hiast2からのソフトを許可します"という選択肢があります。これをOKすると、該当の警告はでなくなります。
成功例:
% ./hisat2
No index, query, or output file specified!
HISAT2 version 2.2.1 by Daehwan Kim ([email protected], www.ccb.jhu.edu/people/infphilo)
Usage:
hisat2 [options]* -x <ht2-idx> {-1 <m1> -2 <m2> | -U <r> | --sra-acc <SRA accession number>} [-S <sam>]
<ht2-idx> Index filename prefix (minus trailing .X.ht2).
<m1> Files with #1 mates, paired with files in <m2>.
Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
<m2> Files with #2 mates, paired with files in <m1>.
Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
<r> Files with unpaired reads.
Could be gzip'ed (extension: .gz) or bzip2'ed (extension: .bz2).
<SRA accession number> Comma-separated list of SRA accession numbers, e.g. --sra-acc SRR353653,SRR353654.
...(以下略)
sshのオプションでX11フォワーディングをする場合、オプションとして -X と -Y のいずれかを選択する必要がある。この違いはリモート先を信頼するサーバとして扱うか、という違いがある。
-X の場合は接続先を信頼しないサーバとして取り扱い、グラフィカルなデータを送信するのみになる。 -Y の場合は接続先を信頼するサーバとして取り扱い、グラフィカルなデータのみならずssh接続によるデータの改変などが可能になる。
セキュリティ的には -X を使うべきである。ただし -X ではデータ改変がされないことから、X11 forwarding でエラーが出る可能性があるため、そのような場合は(相手先は信頼できるサーバであることを前提として) -Y を使用することを検討してもよい。
StackExchangeからの引用
If you use ssh -X remotemachine the remote machine is treated as an
untrusted client. So your local client sends a command to the remote
machine and receives the graphical output. If your command violates
some security settings you'll receive an error instead.
But if you use ssh -Y remotemachine the remote machine is treated
as a trusted client. This last option can open security problems.
Because other graphical (X11) clients could sniff data from the
remote machine (make screenshots, do keylogging and other nasty stuff)
and it is even possible to alter those data.