kuroの覚え書き

96の個人的覚え書き

RSEMのインストール

今更ですが。

これまでメインにはStringTieを発現解析に使っていたが、RSEMも使ってみようと。

現状miniconda3の上に環境構築をしているので、

$ conda install rsem

としてみる。その結果、

$ which rsem-calculate-expression
~/miniconda3/envs/ngs/bin/rsem-calculate-expression

$ rsem-calculate-expression --version
Current version: RSEM v1.2.28

この様にインストールされているのがわかった。
現行バージョンが1.3.3ということなんで、1.2.28というとかなり古い。なのでソースからとってくる
deweylab.github.io

適当な場所に解凍し、そのディレクトリに入って

$ make

とするだけでいいらしい。
なのでやってみたが、早速エラーが出た。なんかperlのライブラリがいるらしい。perl・・・嫌な予感。

Can't locate Env.pm in @INC (you may need to install the Env module) (@INC contains: /home/rnaseq/RSEM-1.3.3 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /home/rnaseq/RSEM-1.3.3/rsem-calculate-expression line 10.
BEGIN failed--compilation aborted at /home/rnaseq/RSEM-1.3.3/rsem-calculate-expression line 10.

PerlのEnvモジュールをインストールするため

$ cpan Env

とするもcpanが入ってない。

$ sudo dnf install perl-CPAN
$ sudo cpan

これでやっとEnvがインストールできる。
cpanの中で

> install Env

Reading '/root/.local/share/.cpan/Metadata'
  Database was generated on Tue, 19 Dec 2023 05:54:00 GMT
Running install for module 'Env'
Checksum for /root/.local/share/.cpan/sources/authors/id/F/FL/FLORA/Env-1.04.tar.gz ok
Scanning cache /root/.local/share/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring F/FL/FLORA/Env-1.04.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Env
Writing MYMETA.yml and MYMETA.json
  FLORA/Env-1.04.tar.gz
  /usr/bin/perl Makefile.PL -- OK
Running make for F/FL/FLORA/Env-1.04.tar.gz
cp lib/Env.pm blib/lib/Env.pm
Manifying 1 pod document
  FLORA/Env-1.04.tar.gz
  /bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/array.t ............... Can't locate Test/More.pm in @INC (you may need to install the Test::More module) (@INC contains: /root/.local/share/.cpan/build/Env-1.04-1/blib/lib /root/.local/share/.cpan/build/Env-1.04-1/blib/arch /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/array.t line 6.
BEGIN failed--compilation aborted at t/array.t line 6.
t/array.t ............... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/env.t ................. Can't locate Test/More.pm in @INC (you may need to install the Test::More module) (@INC contains: /root/.local/share/.cpan/build/Env-1.04-1/blib/lib /root/.local/share/.cpan/build/Env-1.04-1/blib/arch /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/env.t line 9.
BEGIN failed--compilation aborted at t/env.t line 9.
t/env.t ................. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/release-pod-syntax.t .. Can't locate Test/More.pm in @INC (you may need to install the Test::More module) (@INC contains: /root/.local/share/.cpan/build/Env-1.04-1/blib/lib /root/.local/share/.cpan/build/Env-1.04-1/blib/arch /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/release-pod-syntax.t line 5.
BEGIN failed--compilation aborted at t/release-pod-syntax.t line 8.
t/release-pod-syntax.t .. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 

Test Summary Report
-------------------
t/array.t             (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/env.t               (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/release-pod-syntax.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
Files=3, Tests=0,  0 wallclock secs ( 0.01 usr +  0.00 sys =  0.01 CPU)
Result: FAIL
Failed 3/3 test programs. 0/0 subtests failed.
make: *** [Makefile:841: test_dynamic] ??? 2
  FLORA/Env-1.04.tar.gz
  /bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports FLORA/Env-1.04.tar.gz
Failed during this command:
 FLORA/Env-1.04.tar.gz                        : make_test NO

またまた大量のエラー。今度はTest::Moreモジュールが見つからないという問題らしい。
cpanの中で

> install Test::More

これでやっとEnvがインストールできる(その2)。

> install Env

でRSEMのディレクトリに戻って、

$ make clean
$ make
$ export PATH=/path/to/RSEM:$PATH

なんとかインストールできた。exportは.bash_profileにも書いておこう。

$ which rsem-calculate-expression
~/RSEM-1.3.3/rsem-calculate-expression
$ rsem-calculate-expression --version
Current version: RSEM v1.3.1

これで使えるようになった(はず)。