ctffind をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
本家様 [[https://grigoriefflab.umassmed.edu/ctf_estimatio...
***ctffind5 [#cca99470]
記事 [[https://www.biorxiv.org/content/10.1101/2024.02.26...
この記事の中でコンパイルされたバージョンが[[https://ciste...
さっそくCTFFIND5が入っているcisTEMを取得してみた. cisTEM-...
#code(nonumber){{
[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.9 (Green Obsidian)
[root@rockylinux ~]# cd /apps/
[root@rockylinux apps]# tar xf /Public/em/cisTEM-ctffind5...
[root@rockylinux apps]# ls -l cisTEM/bin/
:
-rwxr-xr-x. 1 saber saber 40459144 Feb 27 00:54 create_m...
-rwxr-xr-x. 1 saber saber 40907928 Feb 27 00:54 ctffind
-rwxr-xr-x. 1 saber saber 40459240 Feb 27 00:54 divide_t...
:
[root@rockylinux apps]#
[root@rockylinux apps]# /apps/cisTEM/bin/ctffind
** Welcome to Ctffind **
Version : 5.0.0
Compiled : Feb 26 2024
Library Version : 2.0.0-alpha-151-d42312b-dirty
From Branch : ctffind5
Mode : Interactive
Input image file name [input.mrc] : ^C
[root@rockylinux apps]#
[root@rockylinux apps]# ldd /apps/cisTEM/bin/ctffind
linux-vdso.so.1 (0x00007ffc3b5f6000)
libm.so.6 => /lib64/libm.so.6 (0x00007fedce9a2000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000...
libc.so.6 => /lib64/libc.so.6 (0x00007fedce3bd000)
/lib64/ld-linux-x86-64.so.2 (0x00007fedced24000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fedce1b90...
[root@rockylinux apps]#
}}
一応、「/apps/cisTEM/bin/ctffind」のみを持ち出せれるみたい
次にソースから作ってみる
#code(nonumber){{
[root@rockylinux ~]# cd /apps/src/
[root@rockylinux src]# git clone https://github.com/Grigo...
[root@rockylinux src]# cd cisTEM/
[root@rockylinux cisTEM]# git branch --all
* main
:
remotes/origin/ctffind5
:
[root@rockylinux cisTEM]# git checkout remotes/origin/ctf...
[root@rockylinux cisTEM]# ./regenerate_project.b
[root@rockylinux cisTEM]# mkdir build && cd build
[root@rockylinux build]# ../configure --prefix=/apps/cisTEM
[root@rockylinux build]# make -j 20
}}
コンパイルが終われば build/src にバイナリーが用意される. ...
確認したらこんな感じ.
#code(nonumber){{
[root@rockylinux build]# ./src/ctffind
** Welcome to Ctffind **
Version : 5.0.0
Compiled : Mar 6 2024
Library Version : 2.0.0-alpha-153-2d3c4ad-dirty
From Branch : (HEAD
Mode : Interactive
Input image file name [input.mrc] : ^C
[root@rockylinux build]#
}}
***ctffind4.1.14 [#l344dced]
&color(lightseagreen){''RockyLinux8''};で使ってみる
提供されているバイナリーバージョンの「ctffind-4.1.14-linu...
しかしRHEL8系のRockyLinux8では実行すると下記のようにcore ...
#code(nonumber){{
Segmentation fault (core dumped)
}}
動かいないみたい。
っで、ソースコードを入手して、コンパイルしてみる。
***ソース展開、コンパイル [#ma15efed]
コンパイルに必要なライブラリをインストールします。
#code(nonumber){{
[root@c ~]# dnf --enablerepo=epel install wxBase3-devel w...
}}
本家様からソースコードをダウンロードして展開します
#code(nonumber){{
[root@c ~]# cd /apps/src
[root@c src]# gzip -cd ctffind-4.1.14.tar.gz | tar xf -
[root@c src]# cd ctffind-4.1.14
}}
ここで
[[https://grigoriefflab.umassmed.edu/comment/1696#comment...
具体的には下記のようにプログラムコードを修正します
#code(diff,nonumber){{
--- ctffind-4.1.14/src/programs/ctffind/ctffind.cpp.orig ...
+++ ctffind-4.1.14/src/programs/ctffind/ctffind.cpp 2...
@@ -267,11 +267,11 @@
float FindRotationalAlignmentBetweenTwoStacksOfImages(Im...
void ComputeImagesWithNumberOfExtremaAndCTFValues(CTF *c...
int ReturnSpectrumBinNumber(int number_of_bins, float nu...
-bool ComputeRotationalAverageOfPowerSpectrum( Image *spe...
+void ComputeRotationalAverageOfPowerSpectrum( Image *spe...
void ComputeEquiPhaseAverageOfPowerSpectrum( Image *spec...
void OverlayCTF( Image *spectrum, CTF *ctf, Image *numbe...
void ComputeFRCBetween1DSpectrumAndFit( int number_of_bi...
-bool RescaleSpectrumAndRotationalAverage( Image *spectru...
+void RescaleSpectrumAndRotationalAverage( Image *spectru...
void Renormalize1DSpectrumForFRC( int number_of_bins, do...
float ReturnAzimuthToUseFor1DPlots(CTF *ctf);
@@ -2419,7 +2419,7 @@
// Rescale the spectrum and its 1D rotational avereage s...
// by parsing the suppilied 1D average_fit array
-bool RescaleSpectrumAndRotationalAverage( Image *spectru...
+void RescaleSpectrumAndRotationalAverage( Image *spectru...
{
MyDebugAssertTrue(spectrum->is_in_memory, "Spectr...
MyDebugAssertTrue(number_of_bins > 1,"Bad number ...
@@ -2762,7 +2762,7 @@
}
//
-bool ComputeRotationalAverageOfPowerSpectrum( Image *spe...
+void ComputeRotationalAverageOfPowerSpectrum( Image *spe...
{
MyDebugAssertTrue(spectrum->is_in_memory, "Spectr...
MyDebugAssertTrue(number_of_extrema->is_in_memory...
}}
そうして
#code(nonumber){{
[root@c ctffind-4.1.14]# ./configure --prefix=/apps/ctffi...
[root@c ctffind-4.1.14]# make; make install
}}
***使う [#iab7e9fe]
大抵は relion からコールされて使うのが常なのであんまりそ...
けど、こんな感じでインターラクティヴに使うものです。
(ヒアドキュメントみたいな実行方法もあるけど)
#code(nonumber){{
[root@c ~]# /apps/ctffind-4.1.14/bin/ctffind
** Welcome to Ctffind **
Version : 4.1.14
Compiled : Nov 9 2021
Mode : Interactive
Input image file name [input.mrc] :
}}
***コンパイルしたアプリを使うなら [#b3b3ce89]
コンパイル済みのアプリを他のpcに運んで使う際、下記が必要...
#code(nonumber){{
wxBase3
}}
が必要
***m1 macOSでctffind [#h8af7d91]
作ってみた
まず [[Apple/command#s51b110d]] のように Homebrew をイン...
その後に
#code(nonumber){{
[supervisor@mini-m1 ~]$ brew install fftw
[supervisor@mini-m1 ~]$ brew install wxWidgets
}}
と fftw と wxWidgets をインストールします.
っでctffindのソースを展開して
#code(nonumber){{
[supervisor@mini-m1 ~]$ cd src
[supervisor@mini-m1 ~/src]$ tar xf ctffind-4.1.14.tar.gz
[supervisor@mini-m1 ~/src]$ cd ctffind-4.1.14
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$
}}
ここでソースコードの一部を修正します。上記のvoid修正を施...
#code(diff,nonumber){{
--- src/core/matrix.cpp.orig 2022-09-28 01:19:32.00000...
+++ src/core/matrix.cpp 2022-09-28 01:27:54.000000000 +0900
@@ -4,7 +4,11 @@
// think i got it from a book i had about game programmi...
#define AL_PI 3.14159265358979323846
-#define _AL_SINCOS(x, s, c) __asm__ ("fsincos" : "=t" (...
+#if defined(__i386__) || defined(__x86_64__)
+#define _AL_SINCOS(x, s, c) __asm__ ("fsincos" : "=t" (c...
+#else
+#define _AL_SINCOS(x, s, c) s = sinf(x); c = cosf(x);
+#endif
#define FLOATSINCOS(x, s, c) _AL_SINCOS((x) * AL_PI / 1...
#define MAKE_ROTATION_f(x, y, z) \
}}
その上で
#code(nonumber){{
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$ ./configure --...
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$ make
}}
これで ctffind が作れます
#code(nonumber){{
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$ ./ctffind
** Welcome to Ctffind **
Version : 4.1.14
Compiled : Sep 28 2022
Mode : Interactive
Input image file name [input.mrc] : ^C
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$
}}
な感じです
終了行:
本家様 [[https://grigoriefflab.umassmed.edu/ctf_estimatio...
***ctffind5 [#cca99470]
記事 [[https://www.biorxiv.org/content/10.1101/2024.02.26...
この記事の中でコンパイルされたバージョンが[[https://ciste...
さっそくCTFFIND5が入っているcisTEMを取得してみた. cisTEM-...
#code(nonumber){{
[root@rockylinux ~]# cat /etc/redhat-release
Rocky Linux release 8.9 (Green Obsidian)
[root@rockylinux ~]# cd /apps/
[root@rockylinux apps]# tar xf /Public/em/cisTEM-ctffind5...
[root@rockylinux apps]# ls -l cisTEM/bin/
:
-rwxr-xr-x. 1 saber saber 40459144 Feb 27 00:54 create_m...
-rwxr-xr-x. 1 saber saber 40907928 Feb 27 00:54 ctffind
-rwxr-xr-x. 1 saber saber 40459240 Feb 27 00:54 divide_t...
:
[root@rockylinux apps]#
[root@rockylinux apps]# /apps/cisTEM/bin/ctffind
** Welcome to Ctffind **
Version : 5.0.0
Compiled : Feb 26 2024
Library Version : 2.0.0-alpha-151-d42312b-dirty
From Branch : ctffind5
Mode : Interactive
Input image file name [input.mrc] : ^C
[root@rockylinux apps]#
[root@rockylinux apps]# ldd /apps/cisTEM/bin/ctffind
linux-vdso.so.1 (0x00007ffc3b5f6000)
libm.so.6 => /lib64/libm.so.6 (0x00007fedce9a2000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000...
libc.so.6 => /lib64/libc.so.6 (0x00007fedce3bd000)
/lib64/ld-linux-x86-64.so.2 (0x00007fedced24000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fedce1b90...
[root@rockylinux apps]#
}}
一応、「/apps/cisTEM/bin/ctffind」のみを持ち出せれるみたい
次にソースから作ってみる
#code(nonumber){{
[root@rockylinux ~]# cd /apps/src/
[root@rockylinux src]# git clone https://github.com/Grigo...
[root@rockylinux src]# cd cisTEM/
[root@rockylinux cisTEM]# git branch --all
* main
:
remotes/origin/ctffind5
:
[root@rockylinux cisTEM]# git checkout remotes/origin/ctf...
[root@rockylinux cisTEM]# ./regenerate_project.b
[root@rockylinux cisTEM]# mkdir build && cd build
[root@rockylinux build]# ../configure --prefix=/apps/cisTEM
[root@rockylinux build]# make -j 20
}}
コンパイルが終われば build/src にバイナリーが用意される. ...
確認したらこんな感じ.
#code(nonumber){{
[root@rockylinux build]# ./src/ctffind
** Welcome to Ctffind **
Version : 5.0.0
Compiled : Mar 6 2024
Library Version : 2.0.0-alpha-153-2d3c4ad-dirty
From Branch : (HEAD
Mode : Interactive
Input image file name [input.mrc] : ^C
[root@rockylinux build]#
}}
***ctffind4.1.14 [#l344dced]
&color(lightseagreen){''RockyLinux8''};で使ってみる
提供されているバイナリーバージョンの「ctffind-4.1.14-linu...
しかしRHEL8系のRockyLinux8では実行すると下記のようにcore ...
#code(nonumber){{
Segmentation fault (core dumped)
}}
動かいないみたい。
っで、ソースコードを入手して、コンパイルしてみる。
***ソース展開、コンパイル [#ma15efed]
コンパイルに必要なライブラリをインストールします。
#code(nonumber){{
[root@c ~]# dnf --enablerepo=epel install wxBase3-devel w...
}}
本家様からソースコードをダウンロードして展開します
#code(nonumber){{
[root@c ~]# cd /apps/src
[root@c src]# gzip -cd ctffind-4.1.14.tar.gz | tar xf -
[root@c src]# cd ctffind-4.1.14
}}
ここで
[[https://grigoriefflab.umassmed.edu/comment/1696#comment...
具体的には下記のようにプログラムコードを修正します
#code(diff,nonumber){{
--- ctffind-4.1.14/src/programs/ctffind/ctffind.cpp.orig ...
+++ ctffind-4.1.14/src/programs/ctffind/ctffind.cpp 2...
@@ -267,11 +267,11 @@
float FindRotationalAlignmentBetweenTwoStacksOfImages(Im...
void ComputeImagesWithNumberOfExtremaAndCTFValues(CTF *c...
int ReturnSpectrumBinNumber(int number_of_bins, float nu...
-bool ComputeRotationalAverageOfPowerSpectrum( Image *spe...
+void ComputeRotationalAverageOfPowerSpectrum( Image *spe...
void ComputeEquiPhaseAverageOfPowerSpectrum( Image *spec...
void OverlayCTF( Image *spectrum, CTF *ctf, Image *numbe...
void ComputeFRCBetween1DSpectrumAndFit( int number_of_bi...
-bool RescaleSpectrumAndRotationalAverage( Image *spectru...
+void RescaleSpectrumAndRotationalAverage( Image *spectru...
void Renormalize1DSpectrumForFRC( int number_of_bins, do...
float ReturnAzimuthToUseFor1DPlots(CTF *ctf);
@@ -2419,7 +2419,7 @@
// Rescale the spectrum and its 1D rotational avereage s...
// by parsing the suppilied 1D average_fit array
-bool RescaleSpectrumAndRotationalAverage( Image *spectru...
+void RescaleSpectrumAndRotationalAverage( Image *spectru...
{
MyDebugAssertTrue(spectrum->is_in_memory, "Spectr...
MyDebugAssertTrue(number_of_bins > 1,"Bad number ...
@@ -2762,7 +2762,7 @@
}
//
-bool ComputeRotationalAverageOfPowerSpectrum( Image *spe...
+void ComputeRotationalAverageOfPowerSpectrum( Image *spe...
{
MyDebugAssertTrue(spectrum->is_in_memory, "Spectr...
MyDebugAssertTrue(number_of_extrema->is_in_memory...
}}
そうして
#code(nonumber){{
[root@c ctffind-4.1.14]# ./configure --prefix=/apps/ctffi...
[root@c ctffind-4.1.14]# make; make install
}}
***使う [#iab7e9fe]
大抵は relion からコールされて使うのが常なのであんまりそ...
けど、こんな感じでインターラクティヴに使うものです。
(ヒアドキュメントみたいな実行方法もあるけど)
#code(nonumber){{
[root@c ~]# /apps/ctffind-4.1.14/bin/ctffind
** Welcome to Ctffind **
Version : 4.1.14
Compiled : Nov 9 2021
Mode : Interactive
Input image file name [input.mrc] :
}}
***コンパイルしたアプリを使うなら [#b3b3ce89]
コンパイル済みのアプリを他のpcに運んで使う際、下記が必要...
#code(nonumber){{
wxBase3
}}
が必要
***m1 macOSでctffind [#h8af7d91]
作ってみた
まず [[Apple/command#s51b110d]] のように Homebrew をイン...
その後に
#code(nonumber){{
[supervisor@mini-m1 ~]$ brew install fftw
[supervisor@mini-m1 ~]$ brew install wxWidgets
}}
と fftw と wxWidgets をインストールします.
っでctffindのソースを展開して
#code(nonumber){{
[supervisor@mini-m1 ~]$ cd src
[supervisor@mini-m1 ~/src]$ tar xf ctffind-4.1.14.tar.gz
[supervisor@mini-m1 ~/src]$ cd ctffind-4.1.14
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$
}}
ここでソースコードの一部を修正します。上記のvoid修正を施...
#code(diff,nonumber){{
--- src/core/matrix.cpp.orig 2022-09-28 01:19:32.00000...
+++ src/core/matrix.cpp 2022-09-28 01:27:54.000000000 +0900
@@ -4,7 +4,11 @@
// think i got it from a book i had about game programmi...
#define AL_PI 3.14159265358979323846
-#define _AL_SINCOS(x, s, c) __asm__ ("fsincos" : "=t" (...
+#if defined(__i386__) || defined(__x86_64__)
+#define _AL_SINCOS(x, s, c) __asm__ ("fsincos" : "=t" (c...
+#else
+#define _AL_SINCOS(x, s, c) s = sinf(x); c = cosf(x);
+#endif
#define FLOATSINCOS(x, s, c) _AL_SINCOS((x) * AL_PI / 1...
#define MAKE_ROTATION_f(x, y, z) \
}}
その上で
#code(nonumber){{
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$ ./configure --...
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$ make
}}
これで ctffind が作れます
#code(nonumber){{
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$ ./ctffind
** Welcome to Ctffind **
Version : 4.1.14
Compiled : Sep 28 2022
Mode : Interactive
Input image file name [input.mrc] : ^C
[supervisor@mini-m1 ~/src/ctffind-4.1.14]$
}}
な感じです
ページ名:
1