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 bam2plot #51975

Merged
merged 5 commits into from
Nov 7, 2024
Merged
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
48 changes: 48 additions & 0 deletions recipes/bam2plot/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% set name = "bam2plot" %}
{% set version = "0.3.6" %}

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

source:
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/bam2plot-{{ version }}.tar.gz
sha256: 7be991b42db59d0c06ca2f354f906238be3c4f4d0588d85dd1cfd1ec7752a541
Comment on lines +8 to +10
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

SHA256 checksum mismatch detected

The SHA256 checksum in the recipe (7be991b42db59d0c06ca2f354f906238be3c4f4d0588d85dd1cfd1ec7752a541) does not match the official PyPI package checksum (19e6c72cd31318c43f511c926090136b748923151ff0c37a9da782ea4dc1359e).

  • Update the sha256 value in meta.yaml to: 19e6c72cd31318c43f511c926090136b748923151ff0c37a9da782ea4dc1359e
🔗 Analysis chain

Verify the source package integrity.

The URL and checksum format are correct, but let's verify the SHA256 checksum matches the PyPI package.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the SHA256 checksum of the PyPI package
# Expected: The checksum should match "7be991b42db59d0c06ca2f354f906238be3c4f4d0588d85dd1cfd1ec7752a541"

curl -sL "https://pypi.org/packages/source/b/bam2plot/bam2plot-0.3.6.tar.gz" | sha256sum

Length of output: 165


Script:

#!/bin/bash
# Let's try a different approach using Python's pip to get package info
curl -sL "https://pypi.org/pypi/bam2plot/json" | jq -r '.releases."0.3.6"[0].digests.sha256'

Length of output: 157


build:
entry_points:
- bam2plot=bam2plot.main:cli
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 0
run_exports:
- {{ pin_subpackage('bam2plot', max_pin="x.x") }}
Comment on lines +18 to +19
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

Remove unnecessary run_exports section.

The run_exports section is not needed for Python packages as they don't have ABI compatibility concerns like C/C++ packages do.

-  run_exports:
-    - {{ pin_subpackage('bam2plot', max_pin="x.x") }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run_exports:
- {{ pin_subpackage('bam2plot', max_pin="x.x") }}


requirements:
host:
- python >=3.10
- pip
- setuptools
run:
- python >=3.10
- pysam >=0.22.0
- seaborn >=0.13.2
- polars >=0.20.15
- mappy >=2.28
- pyfastx
- pyarrow
- mosdepth

test:
imports:
- bam2plot
commands:
- bam2plot from_bam --help
- bam2plot from_reads --help
- bam2plot guci --help

about:
home: https://github.com/willros/bam2plot
summary: Plot of coverage from bam file
license: GPL-3.0-only
license_file: LICENSE
Loading