Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add r-chromvarmotifs #51395

Merged
merged 4 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions recipes/r-chromvarmotifs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
export DISABLE_AUTOBREW=1
# shellcheck disable=SC2086
${R} CMD INSTALL --build . ${R_ARGS}
4 changes: 4 additions & 0 deletions recipes/r-chromvarmotifs/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
r_base:
- 4.1
- 4.2
- 4.3
45 changes: 45 additions & 0 deletions recipes/r-chromvarmotifs/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{% set version = "0.2.0" %}
{% set github = "https://github.com/GreenleafLab/chromVARmotifs" %}
{% set commit = "38bed559c1f4770b6c91c80bf3f8ea965da26076" %}

package:
name: r-chromvarmotifs
version: "{{ version }}"

source:
url: "{{ github }}/archive/{{ commit }}.zip"
sha256: 4e3bd3201bb4680d78e7786a6c85af06f935a3be8117a87ef03ba375926ebe74

build:
noarch: generic
number: 0
rpaths:
- lib/R/lib/
- lib/
run_exports:
- {{ pin_subpackage("r-chromvarmotifs", max_pin="x.x") }}

requirements:
host:
- r-base
- bioconductor-tfbstools
run:
- r-base
- bioconductor-tfbstools
Comment on lines +22 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider pinning the r-base version.

The requirements section includes the necessary dependencies. However, to ensure compatibility and reproducibility, it's recommended to pin the r-base version.

Consider updating the r-base requirement to specify a version range. For example:

requirements:
  host:
    - r-base {{ r_base }}
    - bioconductor-tfbstools
  run:
    - r-base {{ r_base }}
    - bioconductor-tfbstools

This assumes that {{ r_base }} is defined in your conda_build_config.yaml file. If not, you may need to specify the version explicitly, e.g., r-base >=4.1,<4.4.


test:
commands:
- $R -e "library(chromVARmotifs)"
Comment on lines +30 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding more comprehensive tests.

The current test command checks if the package can be loaded, which is a good basic test. However, to ensure the package functions correctly, consider adding more comprehensive tests.

You could add additional test commands to verify specific functionalities of the package. For example:

test:
  commands:
    - $R -e "library(chromVARmotifs)"
    - $R -e "stopifnot(length(chromVARmotifs::JASPAR2022_human) > 0)"
    - $R -e "stopifnot(is(chromVARmotifs::JASPAR2022_human, 'PWMatrixList'))"

These additional tests check if the package contains the expected data and if it's of the correct type.


about:
home: {{ github }}
license: MIT
license_family: MIT
license_file:
- {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
- LICENSE
summary: Stores several motifs as PWMatrixList objects for use in R with packages like motifmatchr and chromVAR.

extra:
recipe-maintainers:
- mfansler