Skip to content

Commit

Permalink
bioconda recipe; fix str cast when profiles are user-defined
Browse files Browse the repository at this point in the history
  • Loading branch information
RECeSS-EU-Project committed May 14, 2024
1 parent 0abe170 commit fe8c874
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 1 deletion.
21 changes: 21 additions & 0 deletions bioconda-recipes-nordic/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright © 2023 Clémence Réda

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions bioconda-recipes-nordic/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

cd ${SRC_DIR}"/MaBoSS-2.0/engine/src/"

make install \
CC="${CC}" \
CXX="${CXX}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}" \
prefix="${PREFIX}"

cd ${SRC_DIR}"/mpbn-3.3/"

"${PYTHON}" -m pip install --no-deps --no-build-isolation . -vvv

cd ${SRC_DIR}"/bonesis-0.5.7/"

"${PYTHON}" -m pip install --no-deps --no-build-isolation . -vvv

cd ${SRC_DIR}"/NORDic-2.4.4/"

"${PYTHON}" -m pip install --no-deps --no-build-isolation . -vvv
92 changes: 92 additions & 0 deletions bioconda-recipes-nordic/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{% set name = "nordic" %}
{% set ucname = "NORDic" %}
{% set version = "2.4.4" %}

package:
name: "{{ name|lower }}"
version: "{{ version }}"

source:
- url: "https://github.com/sysbio-curie/MaBoSS-env-2.0/archive/refs/heads/master.tar.gz"
sha256: 5952813f3c38e10bbc2f0d4bbb91936bc738c47bcf9941da298cea3bfb753d19
folder: "MaBoSS-2.0"
- url: "https://files.pythonhosted.org/packages/f8/ff/4b5fd3c1968c99d59972da395c926be65e601d7306602ec6cc39c418e24f/mpbn-3.3.tar.gz"
sha256: 8831531216d94616e7303925c4571bfc40f5d750b33b69d0155edc8404223831
folder: "mpbn-3.3"
- url: "https://files.pythonhosted.org/packages/fb/c9/8fa247a95e6d6b7c650f2d4f879e6027fbb9eeca2aaba8d97f999bfadcfd/bonesis-0.5.7.tar.gz"
sha256: 0ccef4daa089347f7fd4ac8355f7ab3a8eecf63757e6bf000cc66b7c54bfdb0a
folder: "bonesis-0.5.7"
- url: "https://files.pythonhosted.org/packages/f3/9b/817e2004a1e7f798b5f361dc04d28d7b99657cc469f26abde2d9095fd1e4/{{ ucname }}-{{ version }}.tar.gz"
sha256: 01a5d9fbc95c603e46e916a734dd6eecdc20dff914d36c91009337d62488d525
folder: "{{ ucname }}-{{ version }}"

build:
number: 0
skip: True # [py < 38]
run_exports:
- {{ pin_subpackage(name, max_pin="x") }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- flex
- bison
- make
host:
- python
- pip
- clingo >=5.6.1
- cmappy
- scikit-learn
- graphviz
- matplotlib-base
- numpy >=1.22.4
- omnipath >=1.0.6
- openpyxl >=3.0.10
- pandas >=1.5.1
- qnorm >=0.5.1
- quadprog >=0.1.11
- scipy >=1.6.2
- seaborn >=0.12.1
- tqdm >=4.62.3
run:
- python
- clingo >=5.6.1
- cmappy
- scikit-learn
- graphviz
- matplotlib-base
- numpy >=1.22.4
- omnipath >=1.0.6
- openpyxl >=3.0.10
- pandas >=1.5.1
- qnorm >=0.5.1
- quadprog >=0.1.11
- scipy >=1.6.2
- seaborn >=0.12.1
- tqdm >=4.62.3

test:
imports:
- NORDic
- NORDic.NORDic_DR
- NORDic.NORDic_DS
- NORDic.NORDic_NI
- NORDic.NORDic_PMR
- NORDic.UTILS

about:
home: "https://github.com/clreda/NORDic"
license: MIT
license_family: MIT
license_file: LICENSE
summary: "NORDic: a Network-Oriented package for the Repurposing of Drugs"
doc_url: "https://github.com/clreda/NORDic/blob/main/README.md"
dev_url: "https://github.com/clreda/NORDic"

extra:
recipe-maintainers:
- clreda
identifiers:
- doi:10.5281/zenodo.7239047
2 changes: 1 addition & 1 deletion src/NORDic/NORDic_NI/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def solution_generation(file_folder, taxon_id, path_to_genes=None, disgenet_args

profiles = pd.read_csv(profiles_fname, index_col=0, low_memory=False)
if (not pd.isnull(profiles.values).all()):
nconds = len(set(["_".join([profiles.loc[v][c] for v in ["perturbed","perturbation","cell_line"]]) for c in profiles.columns]))
nconds = len(set(["_".join([str(profiles.loc[v][c]) for v in ["perturbed","perturbation","cell_line"]]) for c in profiles.columns]))
else:
nconds = 0
ngenes = len([p for p in profiles.index if (p not in add_rows_profiles)])
Expand Down

0 comments on commit fe8c874

Please sign in to comment.