Skip to content

Commit

Permalink
pepnovo: add aarch64/arm64 build (#51206)
Browse files Browse the repository at this point in the history
* pepnovo: add aarch64/arm64 build

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* pepnovo: add patch to fix a compilation error with positive infinity

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* Add -Wno-register to CXXFLAGS for OSX

Trying to fix:
```
base64.cpp:124:11: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]�[0m
2024-10-08T08:41:28.5270550Z 08:41:27 �[32mBIOCONDA INFO�[0m (ERR)       int register a;�[0m
```

---------

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g authored Oct 8, 2024
1 parent 46ae62c commit f65bc28
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 3 deletions.
1 change: 0 additions & 1 deletion build-fail-blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ recipes/gemma
recipes/roary
recipes/deltabs
recipes/gottcha
recipes/pepnovo
recipes/ea-utils
recipes/nextgenmap
recipes/igor_vdj
Expand Down
2 changes: 2 additions & 0 deletions recipes/pepnovo/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# the file contains both CRLF and LF line endings. Tell Git to not touch it
0002-fix-float-positive-infinity.patch binary
29 changes: 29 additions & 0 deletions recipes/pepnovo/0002-fix-float-positive-infinity.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- src/CumulativeSeqProb.h.orig 2024-10-07 12:43:16.904000000 +0000
+++ src/CumulativeSeqProb.h 2024-10-07 12:54:32.420000000 +0000
@@ -1,21 +1,22 @@
#ifndef __CUMULATIVESEQPROB_H__
#define __CUMULATIVESEQPROB_H__

+#include <math.h>
#include "ME_REG.h"
#include "Config.h"
#include "FileManagement.h"

struct SeqPath;

-const float qual_levels[] = {0.10,0.25,0.5,0.75,0.9,0.95,0.98,POS_INF};
+const float qual_levels[] = {0.10,0.25,0.5,0.75,0.9,0.95,0.98,INFINITY};
const int num_qual_levels = sizeof(qual_levels)/sizeof(float);
const int rank_levels[] = {0,1,2,4,8,16,32,64,128,256,POS_INF}; // at these ranks we fill the
const int num_rank_levels = sizeof(rank_levels)/sizeof(int);
-const float rank_score_levels[] = {-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,POS_INF};
+const float rank_score_levels[] = {-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,INFINITY};
const int num_rank_score_levels = sizeof(rank_score_levels)/sizeof(float);
-const float pnv_score_levels[] = {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,POS_INF};
+const float pnv_score_levels[] = {0.f,10.f,20.f,30.f,40.f,50.f,60.f,70.f,80.f,90.f,100.f,110.f,120.f,130.f,140.f,INFINITY};
const int num_pnv_score_levels = sizeof(pnv_score_levels)/sizeof(float);
-const float avg_prob_levels[] = {0.1,0.25,0.5,0.75,0.9,0.95,POS_INF};
+const float avg_prob_levels[] = {0.1,0.25,0.5,0.75,0.9,0.95,INFINITY};
const int num_avg_prob_levels = sizeof(avg_prob_levels)/sizeof(float);
const int special_ranks[] = {0,8,128}; // at these ranks we fill the big set of rank score and pnv score features
const int num_special_ranks = sizeof(special_ranks)/sizeof(int);
4 changes: 3 additions & 1 deletion recipes/pepnovo/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash

set -xe

cd src/

# Below we add -Wno-narrowing because of the compilation error:
# CumulativeSeqProb.h:10:71: error: narrowing conversion of '999999999' from 'int' to 'float' inside { } [-Wnarrowing]
make CC="${CXX}" CFLAGS="${CXXFLAGS} -Wno-narrowing " LDFLAGS="${LDFLAGS}"
make -j ${CPU_COUNT} CC="${CXX}" CFLAGS="${CXXFLAGS} -Wno-narrowing -Wno-register " LDFLAGS="${LDFLAGS}"

mkdir -p ${PREFIX}/bin
cp PepNovo_bin ${PREFIX}/bin/pepnovo
8 changes: 7 additions & 1 deletion recipes/pepnovo/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ source:
md5: af2a863487cb53bf0e92f00d395c4f0d
patches:
- 0001-fix-type-error-in-ReScoreDB.cpp.patch
- 0002-fix-float-positive-infinity.patch

build:
number: 3
number: 4
run_exports:
- {{ pin_subpackage('pepnovo', max_pin=None) }}

requirements:
build:
Expand All @@ -28,5 +31,8 @@ about:
summary: PepNovo serves as a high throughput de novo peptide sequencing tool for tandem mass spectrometry data

extra:
additional-platforms:
- linux-aarch64
- osx-arm64
identifiers:
- biotools:pepnovo

0 comments on commit f65bc28

Please sign in to comment.