Packages icon indicating copy to clipboard operation
Packages copied to clipboard

spades: try to remove spades-bwa

Open alienzj opened this issue 1 year ago • 8 comments

Involved packages

  • spades

Involved issue

Close # https://github.com/BioArchLinux/Packages/commit/7f21e904bb65155d0e2d220f59c07d9970ab5049#commitcomment-143917186

Details

  • [x] Tested in the local machine (largest 16G RAM) and it is passed without any issue
  • [ ] Provide New Package
  • [X] Fix the Packages
    • [x] PKGBUILD
    • [ ] lilac.yaml
    • [ ] lilac.py
  • [x] Would like to continue to work with us

Additional Note

  1. add gcc to makedepends
  2. update cmake parameters refer to https://github.com/ablab/spades/blob/main/spades_compile.sh#L225

alienzj avatar Jul 08 '24 03:07 alienzj

my question is that the spades-bwa is same with bwa, why not use ln -s to solve it?

starsareintherose avatar Jul 08 '24 05:07 starsareintherose

Sorry for my misunderstanding.

From the CMakeLists.txt file https://github.com/ablab/spades/blob/main/ext/src/bwa/CMakeLists.txt#L33, it appears that SPAdes does not use the most recent version of BWA, but instead includes a method to build BWA as part of the SPAdes compilation process. This approach simplifies the installation for users, as they can compile SPAdes and have BWA built alongside it without needing to separately install BWA.

Arch Linux users, embracing the KISS principle, can opt for a simplified SPAdes installation process. If the latest BWA is compatible with SPAdes, we can remove the integrated BWA build from SPAdes and instead provide a symbolic link from spades-bwa to the latest BWA installation.

Let me try this week. Thanks.

alienzj avatar Jul 08 '24 07:07 alienzj

[ 96%] Building CXX object projects/spades/CMakeFiles/spades-core.dir/main.cpp.o
[ 97%] Building CXX object projects/spades/CMakeFiles/spades-core.dir/series_analysis.cpp.o
[ 97%] Building CXX object projects/spades/CMakeFiles/spades-core.dir/__/mts/contig_abundance.cpp.o
[ 97%] Linking CXX executable ../../bin/spades-core
/usr/bin/ld: ../../common/alignment/libalignment.a(bwa_index.cpp.o): in function `alignment::BWAIndex::AlignSequence(Sequence const&, bool) const':
bwa_index.cpp:(.text+0x1f2f): undefined reference to `mem_align1_bin'
collect2: error: ld returned 1 exit status
make[2]: *** [projects/spades/CMakeFiles/spades-core.dir/build.make:186: bin/spades-core] Error 1
make[1]: *** [CMakeFiles/Makefile2:2808: projects/spades/CMakeFiles/spades-core.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
make: Leaving directory '/home/alienzj/toolkits/ohbioarchlinux/bioarchlinux/Bioarchlinux-Packages/BioArchLinux/spades/src/build'
==> ERROR: A failure occurred in build().
    Aborting..
    

After removing spades-bwa building process, there is a undefined reference to mem_align1_bin.

alienzj avatar Jul 08 '24 09:07 alienzj

Unfortunately, SPAdes used: https://github.com/ablab/spades/blob/main/src/common/alignment/bwa_index.cpp#L377 https://github.com/ablab/spades/blob/main/ext/include/bwa/bwamem.h#L153

BWA used: https://github.com/lh3/bwa/blob/master/bwamem.h

The API is not the same one. It is difficult to use lh3's BWA directly at this moment.

alienzj avatar Jul 08 '24 10:07 alienzj

Okay, great, thanks for your testing

starsareintherose avatar Jul 08 '24 11:07 starsareintherose

you said not compatible, but why do you now use ln?

starsareintherose avatar Jul 09 '24 07:07 starsareintherose

I checked the API more in depth, basically, mem_align1 did same thing when compared to mem_align1_bin.

alienzj avatar Jul 09 '24 08:07 alienzj

Have you tested it with example data?

starsareintherose avatar Jul 12 '24 00:07 starsareintherose

Temporarily closed because of no response.

starsareintherose avatar Dec 14 '24 00:12 starsareintherose