vdemichev / DiaNN

DIA-NN - a universal automated software suite for DIA proteomics data analysis.
Other
283 stars 53 forks source link

Building 1.9.1 from source #1165

Open caldodge opened 2 months ago

caldodge commented 2 months ago

Since the target cluster is running Centos 7, the binary files will not work (requiring newer libraries).

How does one build DiaNN 1.9.1 from source? The source tarball doesn't appear to have actual source code.

vdemichev commented 2 months ago

Hi,

DIA-NN is closed source. However here it's easy, all you need is to package DIA-NN into a Docker or Singularity container. I recommend pulling the latest version of Debian to serve as a basis of this (please see https://github.com/vdemichev/DiaNN?tab=readme-ov-file#installation). Then you can run it on old Linux, including on Centos 7.

Best, Vadim

caldodge commented 1 month ago

We tried your suggestion, building a Singularity image. On some data it bombs, and the only errors provided are Go errors from Singularity. As near as I can tell, our only option is to build a system using Rocky 9 (all cluster nodes run on CentOS/Rocky/RHEL), and see if the binary works there.

Program error follows: terminate called after throwing an instance of 'std::length_error' what(): basic_string::_M_create /common/buij4/proepicv2_prod/platform_workspace/jobs/SJOB506/work/0e/acf011975ea1707152d1aa21773cf6/.command.sh: line 14: 16 Aborted diann-linux --f 20220317_HL_plasma_P1_DR1_centroid.mzML --f 20220317_HL_plasma_P1_DR2_centroid.mzML --f 20220317_HL_plasma_P1_DR3_centroid.mzML --f 20220317_HL_plasma_P1_DR4_centroid.mzML --lib 202304_human_noisoforms_diannlib_thermo_pr400-1000_fr200-1800.predicted.speclib --out DIANN_report.tsv --pg-level 1 --smart-profiling --reanalyse --qvalue 0.01 --threads 24 --verbose 1 --report-lib-info --use-quant --matrices --predictor --met-excision SIGABRT: abort PC=0x47cdab m=0 sigcode=0

goroutine 1 [running, locked to thread]: syscall.RawSyscall(0x3e, 0xcd8e, 0x6, 0x0, 0x0, 0xc0000e6000, 0xc0000e6000) /usr/lib/golang/src/syscall/asm_linux_amd64.s:78 +0x2b fp=0xc000201e70 sp=0xc000201e68 pc=0x47cdab syscall.Kill(0xcd8e, 0x6, 0x0, 0x0) /usr/lib/golang/src/syscall/zsyscall_linux_amd64.go:597 +0x4b fp=0xc000201eb8 sp=0xc000201e70 pc=0x479bcb github.com/sylabs/singularity/internal/app/starter.Master.func2() internal/app/starter/master_linux.go:152 +0x61 fp=0xc000201f00 sp=0xc000201eb8 pc=0x798341 github.com/sylabs/singularity/internal/pkg/util/mainthread.Execute.func1() internal/pkg/util/mainthread/mainthread.go:21 +0x2f fp=0xc000201f28 sp=0xc000201f00 pc=0x79699f main.main() cmd/starter/main_linux.go:102 +0x5f fp=0xc000201f60 sp=0xc000201f28 pc=0x97656f runtime.main() /usr/lib/golang/src/runtime/proc.go:203 +0x21e fp=0xc000201fe0 sp=0xc000201f60 pc=0x433b4e runtime.goexit() /usr/lib/golang/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc000201fe8 sp=0xc000201fe0 pc=0x45f7c1

goroutine 6 [syscall]: os/signal.signal_recv(0xba32a0) /usr/lib/golang/src/runtime/sigqueue.go:147 +0x9c os/signal.loop() /usr/lib/golang/src/os/signal/signal_unix.go:23 +0x22 created by os/signal.init.0 /usr/lib/golang/src/os/signal/signal_unix.go:29 +0x41

goroutine 8 [chan receive]: github.com/sylabs/singularity/internal/pkg/util/mainthread.Execute(0xc0002ab240) internal/pkg/util/mainthread/mainthread.go:24 +0xb4 github.com/sylabs/singularity/internal/app/starter.Master(0x8, 0x5, 0xcda8, 0xc00000f1a0) internal/app/starter/master_linux.go:151 +0x44c main.startup() cmd/starter/main_linux.go:75 +0x53e created by main.main cmd/starter/main_linux.go:98 +0x35

rax 0x0 rbx 0x0 rcx 0xffffffffffffffff rdx 0x0 rdi 0xcd8e rsi 0x6 rbp 0xc000201ea8 rsp 0xc000201e68 r8 0x0 r9 0x0 r10 0x0 r11 0x202 r12 0xf3 r13 0x0 r14 0xb893b0 r15 0x0 rip 0x47cdab rflags 0x202 cs 0x33 fs 0x0 gs 0x0

This is true regardless of the version of Singularity or Apptainer, or whether we use a version we built, or the latest available from EPEL.

Any suggestions?

vdemichev commented 1 month ago

We tried to do this only one way, as described here: https://github.com/vdemichev/DiaNN?tab=readme-ov-file#installation. Latest docker debian image -> add libgomp1, copy DIA-NN somewhere in there -> done :) Then just convert the docker image with Apptainer. Below is the actual code used to package 1.9.1.

DIANNV=1.9.1

docker stop debian_container
docker rm debian_container
docker run --name=debian_container -d -i -t debian sh
docker exec debian_container apt update
docker exec debian_container apt install libgomp1

docker exec debian_container rm /usr/bin/diann-$DIANNV
docker cp diann-$DIANNV debian_container:/usr/bin
docker commit debian_container diann_docker_image
docker save diann_docker_image > diann_${DIANNV}_docker.tar
docker stop debian_container
docker rm debian_container

apptainer build -F diann_${DIANNV}_apptainer.sif docker-archive:diann_${DIANNV}_docker.tar

The this is the command used to run:

DIANNV=1.9.1

apptainer exec --cleanenv --bind /media/sf_Raw,/media/sf_Lib,/media/sf_Out diann_${DIANNV}_apptainer.sif /usr/bin/diann-$DIANNV/diann-linux --temp "/media/sf_Out"

I noticed:

--use-quant

If .quant files were obtained with a different DIA-NN version, this is likely to crash.

--matrices

Produces a crash on Linux in 1.9.1, currently need to just remove --matrices. This will be fixed in 1.9.2 (really simple fix, forgot one line of code).

Hope this helps to solve the issue.