[med-svn] [Git][med-team/cnvkit][master] 11 commits: New upstream version

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Thu Feb 6 14:28:26 GMT 2025



Michael R. Crusoe pushed to branch master at Debian Med / cnvkit


Commits:
4f514e20 by Michael R. Crusoe at 2025-02-05T14:58:01+01:00
New upstream version

- - - - -
4929e5c1 by Michael R. Crusoe at 2025-02-05T14:58:02+01:00
New upstream version 0.9.12
- - - - -
974eb4f7 by Michael R. Crusoe at 2025-02-05T14:59:55+01:00
Update upstream source from tag 'upstream/0.9.12'

Update to upstream version '0.9.12'
with Debian dir 9d8b8bdf0ee813571b1739da265ab92ecb9a25dc
- - - - -
6a720526 by Michael R. Crusoe at 2025-02-05T15:00:05+01:00
Remove duplicate line from changelog.

Changes-By: lintian-brush

- - - - -
7c8f5699 by Michael R. Crusoe at 2025-02-06T14:36:25+01:00
d/control: build-dep on the new python3-pomegranate that supports numpy 2.x.

- - - - -
2b5c7454 by Michael R. Crusoe at 2025-02-06T15:07:55+01:00
patch refresh

- - - - -
046f05d6 by Michael R. Crusoe at 2025-02-06T15:07:55+01:00
Include patch from upstream for numpy 2.x support.

- - - - -
7e22089b by Michael R. Crusoe at 2025-02-06T15:07:55+01:00
d/{install,rules,pybuild.testfiles}: simplify and modernize

- - - - -
23c48ca4 by Michael R. Crusoe at 2025-02-06T15:07:55+01:00
Add my own patch to fix one last numpy 2.x issue: Use `np.bytes_` instead of `np.string_`.

- - - - -
9727c553 by Michael R. Crusoe at 2025-02-06T15:12:59+01:00
d/patches/controldir: fix link to the Debian bug.

- - - - -
4d247994 by Michael R. Crusoe at 2025-02-06T15:24:47+01:00
release to unstable.

- - - - -


20 changed files:

- .github/workflows/tests-tox.yaml
- Dockerfile
- cnvlib/_version.py
- cnvlib/coverage.py
- cnvlib/segmentation/cbs.py
- conda-env.yml
- debian/changelog
- debian/control
- debian/install
- + debian/patches/0004-Remove-np.asfarray-np.float_-usage-to-support-numpy-.patch
- + debian/patches/0005-Another-numpy-2.x-fix.patch
- debian/patches/controldir
- debian/patches/ignore-warnings-in-tests.patch
- − debian/patches/no-py-ext
- debian/patches/python3compat.patch
- debian/patches/series
- + debian/pybuild.testfiles
- debian/rules
- devtools/conda-recipe/meta.yaml
- requirements/core.txt


Changes:

=====================================
.github/workflows/tests-tox.yaml
=====================================
@@ -49,6 +49,7 @@ jobs:
       - name: Install Mac OS dependencies
         if: runner.os == 'macOS'
         run: |
+          brew install r
           Rscript --no-environ -e "install.packages('BiocManager', repos='https://cloud.r-project.org'); BiocManager::install('DNAcopy')"
       - name: Install test runner tools
         run: pip install flake8 pytest tox


=====================================
Dockerfile
=====================================
@@ -1,11 +1,11 @@
 FROM continuumio/miniconda3:23.10.0-1
-MAINTAINER Eric Talevich <me+code at etal.mozmail.com>
+MAINTAINER Eric Talevich <52723+etal at users.noreply.github.com>
 
 # Install directly into 'base' conda environment
 COPY conda-env.yml ./conda-env.yml
 RUN conda env update -v -n base -f conda-env.yml
 RUN conda clean --all --verbose
-RUN pip3 install cnvkit==0.9.10 --no-cache
+RUN pip3 install cnvkit==0.9.11 --no-cache
 # Let matplotlib build its font cache
 RUN cnvkit.py version
 


=====================================
cnvlib/_version.py
=====================================
@@ -1 +1 @@
-__version__ = "0.9.11"
+__version__ = "0.9.12"


=====================================
cnvlib/coverage.py
=====================================
@@ -216,7 +216,7 @@ def bedcov(bed_fname, bam_fname, min_mapq, fasta=None):
     # Count bases in each region; exclude low-MAPQ reads
     cmd = [bed_fname, bam_fname]
     if min_mapq and min_mapq > 0:
-        cmd.extend(["-Q", bytes(min_mapq)])
+        cmd.extend(["-Q", str(min_mapq)])
     if fasta:
         cmd.extend(["--reference", fasta])
     try:


=====================================
cnvlib/segmentation/cbs.py
=====================================
@@ -9,10 +9,19 @@ library('DNAcopy')
 
 write("Loading probe coverages into a data frame", stderr())
 tbl = read.delim("%(probes_fname)s")
-if (!is.null(tbl$weight)) {
-    # Drop any 0-weight bins
-    tbl = tbl[tbl$weight > 0,]
+# Filter the original .cnr to valid rows (usually they're all valid)
+if (!is.null(tbl$weight) && (sum(!is.na(tbl$weight)) > 0)) {
+    # Drop any null or 0-weight bins
+    tbl = tbl[!is.na(tbl$weight) & (tbl$weight > 0),]
+} else {
+    # No bin weight information; set all equal weights
+    tbl$weight = 1.0
+}
+if ((sum(is.na(tbl$log2)) > 0)) {
+    # Drop any bins with null/missing log2 ratios
+    tbl = tbl[!is.na(tbl$log2),]
 }
+
 cna = CNA(cbind(tbl$log2), tbl$chromosome, tbl$start,
           data.type="logratio", presorted=T)
 
@@ -25,11 +34,7 @@ if (%(smooth_cbs)g) {
     cna = smooth.CNA(cna)
 }
 
-if (is.null(tbl$weight)) {
-    fit = segment(cna, alpha=%(threshold)g)
-} else {
-    fit = segment(cna, weights=tbl$weight, alpha=%(threshold)g)
-}
+fit = segment(cna, weights=tbl$weight, alpha=%(threshold)g)
 
 write("Setting segment endpoints to original bin start/end positions", stderr())
 write("and recalculating segment means with bin weights", stderr())


=====================================
conda-env.yml
=====================================
@@ -17,7 +17,7 @@ dependencies:
     - matplotlib >=3.5.2
     - numpy >=1.24.2
     - pandas >=1.5.3
-    - pomegranate >=0.14.8, <=0.14.9
+    - pomegranate >=0.14.8, <1.0.0
     - pyfaidx >=0.7.1
     - pysam >=0.20.0
     - pytest


=====================================
debian/changelog
=====================================
@@ -1,11 +1,18 @@
-cnvkit (0.9.11-1) UNRELEASED; urgency=medium
+cnvkit (0.9.12-1) unstable; urgency=medium
 
   * New upstream version
   * Standards-Version: 4.7.0 (routine-update)
   * Removed spelling patch, it was applied upstream. Remaining patches
     were refreshed.
-
- -- Michael R. Crusoe <crusoe at debian.org>  Fri, 15 Nov 2024 10:53:35 +0100
+  * d/control: build-dep on the new python3-pomegranate that supports
+    numpy 2.x.
+  * Include patch from upstream for numpy 2.x support.
+  * d/{install,rules,pybuild.testfiles}: simplify and modernize
+  * Add my own patch to fix one last numpy 2.x issue: Use `np.bytes_`
+    instead of `np.string_`.
+  * d/patches/controldir: fix link to the Debian bug.
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Thu, 06 Feb 2025 15:23:25 +0100
 
 cnvkit (0.9.10-2) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -18,7 +18,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-pysam <!nocheck>,
                python3-scipy <!nocheck>,
                python3-matplotlib <!nocheck>,
-               python3-pomegranate <!nocheck>,
+               python3-pomegranate (>= 0.15) <!nocheck>,
                r-bioc-dnacopy <!nocheck>,
 # testing
 # poppler-utils provides pdfunite, needed for the tests


=====================================
debian/install
=====================================
@@ -1 +1,2 @@
 scripts/*.sh	usr/bin
+scripts/*.py    usr/bin


=====================================
debian/patches/0004-Remove-np.asfarray-np.float_-usage-to-support-numpy-.patch
=====================================
@@ -0,0 +1,237 @@
+From: Suhas Rao <surao at ucsd.edu>
+Date: Fri, 20 Dec 2024 15:52:45 -0800
+Subject: Remove np.asfarray,np.float_ usage to support numpy-2.x deprecation
+
+Origin: upstream, https://github.com/etal/cnvkit/commit/5cb6aeaf40ea5572063cf9914c456c307b7ddf7a
+---
+ cnvlib/bintest.py           | 2 +-
+ cnvlib/call.py              | 4 ++--
+ cnvlib/cnary.py             | 2 +-
+ cnvlib/descriptives.py      | 6 +++---
+ cnvlib/importers.py         | 2 +-
+ cnvlib/reference.py         | 2 +-
+ cnvlib/segmentation/haar.py | 6 +++---
+ cnvlib/segmetrics.py        | 6 +++---
+ cnvlib/smoothing.py         | 8 ++++----
+ scripts/guess_baits.py      | 2 +-
+ skgenome/intersect.py       | 2 +-
+ 11 files changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/cnvlib/bintest.py b/cnvlib/bintest.py
+index 9ea552e..2f950c9 100644
+--- a/cnvlib/bintest.py
++++ b/cnvlib/bintest.py
+@@ -88,7 +88,7 @@ def z_prob(cnarr):
+ 
+ def p_adjust_bh(p):
+     """Benjamini-Hochberg p-value correction for multiple hypothesis testing."""
+-    p = np.asfarray(p)
++    p = np.asarray(p, dtype=float)
+     by_descend = p.argsort()[::-1]
+     by_orig = by_descend.argsort()
+     steps = float(len(p)) / np.arange(len(p), 0, -1)
+diff --git a/cnvlib/call.py b/cnvlib/call.py
+index cf99d84..ae4641a 100644
+--- a/cnvlib/call.py
++++ b/cnvlib/call.py
+@@ -130,7 +130,7 @@ def absolute_threshold(cnarr, ploidy, thresholds, is_haploid_x_reference):
+         GAIN(3) >=  +0.3
+ 
+     """
+-    absolutes = np.zeros(len(cnarr), dtype=np.float_)
++    absolutes = np.zeros(len(cnarr), dtype=np.float64)
+     for idx, row in enumerate(cnarr):
+         ref_copies = _reference_copies_pure(row.chromosome, ploidy, is_haploid_x_reference)
+         if np.isnan(row.log2):
+@@ -161,7 +161,7 @@ def absolute_clonal(cnarr, ploidy, purity, is_haploid_x_reference, diploid_parx_
+ 
+ def absolute_pure(cnarr, ploidy, is_haploid_x_reference):
+     """Calculate absolute copy number values from segment or bin log2 ratios."""
+-    absolutes = np.zeros(len(cnarr), dtype=np.float_)
++    absolutes = np.zeros(len(cnarr), dtype=np.float64)
+     for i, row in enumerate(cnarr):
+         ref_copies = _reference_copies_pure(row.chromosome, ploidy, is_haploid_x_reference)
+         absolutes[i] = _log2_ratio_to_absolute_pure(row.log2, ref_copies)
+diff --git a/cnvlib/cnary.py b/cnvlib/cnary.py
+index 53faf4e..fed9f3f 100644
+--- a/cnvlib/cnary.py
++++ b/cnvlib/cnary.py
+@@ -492,7 +492,7 @@ class CopyNumArray(GenomicArray):
+         """
+         if is_haploid_x_reference is None:
+             is_haploid_x_reference = not self.guess_xx(diploid_parx_genome=diploid_parx_genome, verbose=False)
+-        cvg = np.zeros(len(self), dtype=np.float_)
++        cvg = np.zeros(len(self), dtype=np.float64)
+         if is_haploid_x_reference:
+             # Single-copy X, Y
+             idx = self.chr_x_filter(diploid_parx_genome).values | (self.chr_y_filter(diploid_parx_genome)).values
+diff --git a/cnvlib/descriptives.py b/cnvlib/descriptives.py
+index a15bea5..8cb6119 100644
+--- a/cnvlib/descriptives.py
++++ b/cnvlib/descriptives.py
+@@ -21,7 +21,7 @@ def on_array(default=None):
+     def outer(f):
+         @wraps(f)
+         def wrapper(a, **kwargs):
+-            a = np.asfarray(a)
++            a = np.asarray(a, dtype=float)
+             a = a[~np.isnan(a)]
+             if not len(a):
+                 return np.nan
+@@ -52,8 +52,8 @@ def on_weighted_array(default=None):
+                 raise ValueError(f"Unequal array lengths: a={len(a)}, w={len(w)}")
+             if not len(a):
+                 return np.nan
+-            a = np.asfarray(a)
+-            w = np.asfarray(w)
++            a = np.asarray(a, dtype=float)
++            w = np.asarray(w, dtype=float)
+             # Drop a's NaN indices from both arrays
+             a_nan = np.isnan(a)
+             if a_nan.any():
+diff --git a/cnvlib/importers.py b/cnvlib/importers.py
+index 4a0f493..74ea52d 100644
+--- a/cnvlib/importers.py
++++ b/cnvlib/importers.py
+@@ -69,7 +69,7 @@ def do_import_theta(segarr, theta_results_fname, ploidy=2):
+         # Drop any segments where the C value is None
+         mask_drop = np.array([c is None for c in copies], dtype="bool")
+         segarr = segarr[~mask_drop].copy()
+-        ok_copies = np.asfarray([c for c in copies if c is not None])
++        ok_copies = np.asarray([c for c in copies if c is not None], dtype=float)
+         # Replace remaining segment values with these integers
+         segarr["cn"] = ok_copies.astype("int")
+         ok_copies[ok_copies == 0] = 0.5
+diff --git a/cnvlib/reference.py b/cnvlib/reference.py
+index af4d3e5..9bd92ce 100644
+--- a/cnvlib/reference.py
++++ b/cnvlib/reference.py
+@@ -575,7 +575,7 @@ def get_fasta_stats(cnarr, fa_fname):
+         calculate_gc_lo(subseq) for subseq in fasta_extract_regions(fa_fname, cnarr)
+     ]
+     gc_vals, rm_vals = zip(*gc_rm_vals)
+-    return np.asfarray(gc_vals), np.asfarray(rm_vals)
++    return np.asarray(gc_vals, dtype=float), np.asarray(rm_vals, dtype=float)
+ 
+ 
+ def calculate_gc_lo(subseq):
+diff --git a/cnvlib/segmentation/haar.py b/cnvlib/segmentation/haar.py
+index 19c347b..53eb093 100644
+--- a/cnvlib/segmentation/haar.py
++++ b/cnvlib/segmentation/haar.py
+@@ -305,9 +305,9 @@ def HaarConv(
+         logging.debug(
+             "Error?: stepHalfSize (%s) > signalSize (%s)", stepHalfSize, signalSize
+         )
+-        return np.zeros(signalSize, dtype=np.float_)
++        return np.zeros(signalSize, dtype=np.float64)
+ 
+-    result = np.zeros(signalSize, dtype=np.float_)
++    result = np.zeros(signalSize, dtype=np.float64)
+     if weight is not None:
+         # Init weight sums
+         highWeightSum = weight[:stepHalfSize].sum()
+@@ -490,7 +490,7 @@ def PulseConv(
+     pulseHeight = 1.0 / pulseSize
+ 
+     # Circular padding init
+-    result = np.zeros(signalSize, dtype=np.float_)
++    result = np.zeros(signalSize, dtype=np.float64)
+     for k in range((pulseSize + 1) // 2):
+         result[0] += signal[k]
+     for k in range(pulseSize // 2):
+diff --git a/cnvlib/segmetrics.py b/cnvlib/segmetrics.py
+index b293144..acba6b2 100644
+--- a/cnvlib/segmetrics.py
++++ b/cnvlib/segmetrics.py
+@@ -52,7 +52,7 @@ def do_segmetrics(
+         for statname in location_stats:
+             func = stat_funcs[statname]
+             segarr[statname] = np.fromiter(
+-                map(func, bins_log2s), np.float_, len(segarr)
++                map(func, bins_log2s), np.float64, len(segarr)
+             )
+     # Measures of spread
+     if spread_stats:
+@@ -62,7 +62,7 @@ def do_segmetrics(
+         for statname in spread_stats:
+             func = stat_funcs[statname]
+             segarr[statname] = np.fromiter(
+-                map(func, deviations), np.float_, len(segarr)
++                map(func, deviations), np.float64, len(segarr)
+             )
+     # Interval calculations
+     weights = cnarr["weight"]
+@@ -137,7 +137,7 @@ def confidence_interval_bootstrap(
+         samples = _smooth_samples_by_weight(values, samples)
+     # Recalculate segment means
+     seg_means = (np.average(val, weights=wt) for val, wt in samples)
+-    bootstrap_dist = np.fromiter(seg_means, np.float_, bootstraps)
++    bootstrap_dist = np.fromiter(seg_means, np.float64, bootstraps)
+     alphas = np.array([alpha / 2, 1 - alpha / 2])
+     if not smoothed:
+         # alphas = _bca_correct_alpha(values, weights, bootstrap_dist, alphas)
+diff --git a/cnvlib/smoothing.py b/cnvlib/smoothing.py
+index cc408f8..e905b71 100644
+--- a/cnvlib/smoothing.py
++++ b/cnvlib/smoothing.py
+@@ -16,7 +16,7 @@ def check_inputs(x, width, as_series=True, weights=None):
+     whole window. The output half-window size is truncated to the length of `x`
+     if needed.
+     """
+-    x = np.asfarray(x)
++    x = np.asarray(x, dtype=float)
+     wing = _width2wing(width, x)
+     signal = _pad_array(x, wing)
+     if as_series:
+@@ -63,21 +63,21 @@ def rolling_median(x, width):
+     rolled = signal.rolling(2 * wing + 1, 1, center=True).median()
+     # if rolled.hasnans:
+     #     rolled = rolled.interpolate()
+-    return np.asfarray(rolled[wing:-wing])
++    return np.asarray(rolled[wing:-wing], dtype=float)
+ 
+ 
+ def rolling_quantile(x, width, quantile):
+     """Rolling quantile (0--1) with mirrored edges."""
+     x, wing, signal = check_inputs(x, width)
+     rolled = signal.rolling(2 * wing + 1, 2, center=True).quantile(quantile)
+-    return np.asfarray(rolled[wing:-wing])
++    return np.asarray(rolled[wing:-wing], dtype=float)
+ 
+ 
+ def rolling_std(x, width):
+     """Rolling quantile (0--1) with mirrored edges."""
+     x, wing, signal = check_inputs(x, width)
+     rolled = signal.rolling(2 * wing + 1, 2, center=True).std()
+-    return np.asfarray(rolled[wing:-wing])
++    return np.asarray(rolled[wing:-wing], dtype=float)
+ 
+ 
+ def convolve_weighted(window, signal, weights, n_iter=1):
+diff --git a/scripts/guess_baits.py b/scripts/guess_baits.py
+index 8112f03..a1f693e 100755
+--- a/scripts/guess_baits.py
++++ b/scripts/guess_baits.py
+@@ -44,7 +44,7 @@ def filter_targets(target_bed, sample_bams, procs, fasta):
+         raise RuntimeError("Targets must be in BED format; try skg_convert.py")
+     logging.info("Loaded %d candidate regions from %s", len(baits), target_bed)
+     # Loop over BAMs to calculate weighted averages of bin coverage depths
+-    total_depths = np.zeros(len(baits), dtype=np.float_)
++    total_depths = np.zeros(len(baits), dtype=np.float64)
+     for bam_fname in sample_bams:
+         logging.info("Evaluating targets in %s", bam_fname)
+         sample = cnvlib.do_coverage(target_bed, bam_fname, processes=procs, fasta=fasta)
+diff --git a/skgenome/intersect.py b/skgenome/intersect.py
+index 4475041..eab5fb0 100644
+--- a/skgenome/intersect.py
++++ b/skgenome/intersect.py
+@@ -60,7 +60,7 @@ def into_ranges(
+         elem = source[src_col].iat[0]
+         if isinstance(elem, (str, np.string_)):
+             summary_func = join_strings
+-        elif isinstance(elem, (float, np.float_)):
++        elif isinstance(elem, (float, np.float64)):
+             summary_func = np.nanmedian
+         else:
+             summary_func = first_of


=====================================
debian/patches/0005-Another-numpy-2.x-fix.patch
=====================================
@@ -0,0 +1,24 @@
+From: "Michael R. Crusoe" <crusoe at debian.org>
+Date: Thu, 6 Feb 2025 14:55:10 +0100
+Subject: Another numpy 2.x fix
+
+Forwarded: https://github.com/etal/cnvkit/pull/945
+
+Fixes: "AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead."
+---
+ skgenome/intersect.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/skgenome/intersect.py b/skgenome/intersect.py
+index eab5fb0..299df66 100644
+--- a/skgenome/intersect.py
++++ b/skgenome/intersect.py
+@@ -58,7 +58,7 @@ def into_ranges(
+     if summary_func is None:
+         # Choose a type-appropriate summary function
+         elem = source[src_col].iat[0]
+-        if isinstance(elem, (str, np.string_)):
++        if isinstance(elem, (str, np.bytes_)):
+             summary_func = join_strings
+         elif isinstance(elem, (float, np.float64)):
+             summary_func = np.nanmedian


=====================================
debian/patches/controldir
=====================================
@@ -1,13 +1,22 @@
+From: Olivier Sallou <osallou at debian.org>
+Date: Wed, 27 Mar 2019 08:03:04 +0000
 Subject: do not create dir if it exists
-Description: command tries to create an output dir during tests, even if it
- already exists, raising an error. Skip creation if already present
-Author: Olivier Sallou <osallou at debian.org>
-Bug: 925568
+
+Bug-Debian: https://bugs.debian.org/925568
 Forwarded: no
-Last-Updated: 2019-03-27
---- cnvkit.orig/cnvlib/commands.py
-+++ cnvkit/cnvlib/commands.py
-@@ -2323,8 +2323,9 @@
+Last-Updated: 2025-02-06
+
+command tries to create an output dir during tests, even if it
+already exists, raising an error. Skip creation if already present
+---
+ cnvlib/commands.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/cnvlib/commands.py b/cnvlib/commands.py
+index 2dba8dc..97ec33e 100644
+--- a/cnvlib/commands.py
++++ b/cnvlib/commands.py
+@@ -2323,8 +2323,9 @@ def _cmd_import_picard(args):
          )
          if args.output_dir:
              if not os.path.isdir(args.output_dir):


=====================================
debian/patches/ignore-warnings-in-tests.patch
=====================================
@@ -1,11 +1,20 @@
-Description: Ignore warnings during pytest
- Debian packages keep moving. It is very impractical to have this setting.
-Author: Nilesh Patra <nilesh at debian.org>
+From: Nilesh Patra <nilesh at debian.org>
+Date: Fri, 5 Jan 2024 19:01:03 +0530
+Subject: Ignore warnings during pytest
+
 Forwarded: not-needed
-Last-Update: 2024-01-05
---- cnvkit.orig/pyproject.toml
-+++ cnvkit/pyproject.toml
-@@ -65,7 +65,6 @@
+Last-Update: 2025-02-06
+
+Debian packages keep moving. It is very impractical to have this setting.
+---
+ pyproject.toml | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index c242ab2..80d4b02 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -65,7 +65,6 @@ optional-dependencies = {test = {file = "requirements/tests.txt"}}
  
  [tool.pytest.ini_options]
  testpaths = ["test"]


=====================================
debian/patches/no-py-ext deleted
=====================================
@@ -1,18 +0,0 @@
-Author: Michael R. Crusoe <crusoe at debian.org>
-Description: Remove .py extensions as per Debian policy
-  This patch is deactivated since this is differently organised in upstream
-  code and inside Debian Med we decided to derive from policy (see
-     https://lists.debian.org/debian-med/2018/06/msg00043.html)
-Forwarded: not-needed
-
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -48,7 +48,7 @@ changelog = "https://github.com/me/spam/
- #"skg_convert.py" = "scripts.skg_convert"
- #"snpfilter.sh" = "scripts/snpfilter.sh"
- # -- from setup.py --
--#   scripts=[join(DIR, 'cnvkit.py')] + glob(join(DIR, 'scripts/*.py')),
-+#   scripts=[join(DIR, 'cnvkit')] + glob(join(DIR, 'scripts/*')),
- 
- [build-system]
- # Minimum requirements for the build system to execute (PEP 508)


=====================================
debian/patches/python3compat.patch
=====================================
@@ -1,82 +1,118 @@
-Description: enable building with Python3
+From: Steffen Moeller <moeller at debian.org>
+Date: Fri, 15 Jun 2018 13:56:07 +0200
+Subject: enable building with Python3
+
 Forwarded: not-needed
---- cnvkit.orig/test/test_cnvlib.py
-+++ cnvkit/test/test_cnvlib.py
+---
+ scripts/cnv_annotate.py             | 2 +-
+ scripts/cnv_expression_correlate.py | 2 +-
+ scripts/cnv_updater.py              | 2 +-
+ scripts/guess_baits.py              | 2 +-
+ scripts/reference2targets.py        | 2 +-
+ scripts/skg_convert.py              | 2 +-
+ test/test_cnvlib.py                 | 2 +-
+ test/test_genome.py                 | 2 +-
+ test/test_io.py                     | 2 +-
+ test/test_r.py                      | 2 +-
+ 10 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/scripts/cnv_annotate.py b/scripts/cnv_annotate.py
+index 5f3c91b..d4cffc3 100755
+--- a/scripts/cnv_annotate.py
++++ b/scripts/cnv_annotate.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
- """Unit tests for the CNVkit library, cnvlib."""
- import logging
- import unittest
---- cnvkit.orig/test/test_genome.py
-+++ cnvkit/test/test_genome.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- """Unit tests for the 'genome' sub-package."""
- import random
- import unittest
---- cnvkit.orig/test/test_io.py
-+++ cnvkit/test/test_io.py
+ """Update gene names in CNVkit .cnn/.cnr files.
+ """
+ import argparse
+diff --git a/scripts/cnv_expression_correlate.py b/scripts/cnv_expression_correlate.py
+index 971da6f..8df36e5 100644
+--- a/scripts/cnv_expression_correlate.py
++++ b/scripts/cnv_expression_correlate.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
- """Unit tests for the CNVkit library, cnvlib."""
- import unittest
+ """Calculate correlation coefficients for gene expression and copy number.
  
---- cnvkit.orig/test/test_r.py
-+++ cnvkit/test/test_r.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- """Unit tests for CNVkit that require an R installation."""
- import unittest
- import logging
---- cnvkit.orig/scripts/cnv_annotate.py
-+++ cnvkit/scripts/cnv_annotate.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/python3
- """Update gene names in CNVkit .cnn/.cnr files.
- """
- import argparse
---- cnvkit.orig/scripts/cnv_updater.py
-+++ cnvkit/scripts/cnv_updater.py
+ Data source for both inputs is TCGA via cBioPortal.
+diff --git a/scripts/cnv_updater.py b/scripts/cnv_updater.py
+index 5d73476..1499eb5 100755
+--- a/scripts/cnv_updater.py
++++ b/scripts/cnv_updater.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
  """Update .cnn/.cnr files from older CNVkit versions to match current defaults.
  
  CNVkit v0.8.0 and later uses a 'depth' column in the *.targetcoverage.cnn and
---- cnvkit.orig/scripts/guess_baits.py
-+++ cnvkit/scripts/guess_baits.py
+diff --git a/scripts/guess_baits.py b/scripts/guess_baits.py
+index b775ced..8112f03 100755
+--- a/scripts/guess_baits.py
++++ b/scripts/guess_baits.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
  """Guess the coordinates of captured regions from sample read depths.
  
  Two approaches available:
---- cnvkit.orig/scripts/reference2targets.py
-+++ cnvkit/scripts/reference2targets.py
+diff --git a/scripts/reference2targets.py b/scripts/reference2targets.py
+index 521df30..0d065a3 100755
+--- a/scripts/reference2targets.py
++++ b/scripts/reference2targets.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
  """Extract target and antitarget BED files from a CNVkit reference file.
  
  Once you have a stable CNVkit reference for your platform, you can use this
---- cnvkit.orig/scripts/skg_convert.py
-+++ cnvkit/scripts/skg_convert.py
+diff --git a/scripts/skg_convert.py b/scripts/skg_convert.py
+index 9d27f1c..a5cbbf6 100755
+--- a/scripts/skg_convert.py
++++ b/scripts/skg_convert.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
  """Convert between tabular formats using scikit-genome I/O."""
  import argparse
  import logging
---- cnvkit.orig/scripts/cnv_expression_correlate.py
-+++ cnvkit/scripts/cnv_expression_correlate.py
+diff --git a/test/test_cnvlib.py b/test/test_cnvlib.py
+index 86a4fcf..4f059ba 100755
+--- a/test/test_cnvlib.py
++++ b/test/test_cnvlib.py
 @@ -1,4 +1,4 @@
 -#!/usr/bin/env python
 +#!/usr/bin/python3
- """Calculate correlation coefficients for gene expression and copy number.
+ """Unit tests for the CNVkit library, cnvlib."""
+ import logging
+ import unittest
+diff --git a/test/test_genome.py b/test/test_genome.py
+index 1e3a7da..95c72de 100755
+--- a/test/test_genome.py
++++ b/test/test_genome.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Unit tests for the 'genome' sub-package."""
+ import random
+ import unittest
+diff --git a/test/test_io.py b/test/test_io.py
+index 3702bb3..0e4e6f8 100755
+--- a/test/test_io.py
++++ b/test/test_io.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Unit tests for the CNVkit library, cnvlib."""
+ import unittest
  
- Data source for both inputs is TCGA via cBioPortal.
+diff --git a/test/test_r.py b/test/test_r.py
+index 571b293..74999a3 100755
+--- a/test/test_r.py
++++ b/test/test_r.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ """Unit tests for CNVkit that require an R installation."""
+ import unittest
+ import logging


=====================================
debian/patches/series
=====================================
@@ -1,4 +1,5 @@
-#no-py-ext
 python3compat.patch
 controldir
 ignore-warnings-in-tests.patch
+0004-Remove-np.asfarray-np.float_-usage-to-support-numpy-.patch
+0005-Another-numpy-2.x-fix.patch


=====================================
debian/pybuild.testfiles
=====================================
@@ -0,0 +1,3 @@
+pyproject.toml
+test
+data


=====================================
debian/rules
=====================================
@@ -3,19 +3,8 @@
 export LC_ALL=C.UTF-8
 export PYBUILD_NAME=cnvkit
 
-export PYBUILD_BEFORE_TEST=ln -s $(CURDIR)/data {build_dir}/data;
-
-include /usr/share/dpkg/pkg-info.mk
-
 %:
 	dh $@ --buildsystem=pybuild
 
-override_dh_auto_install:
-	for script in `find scripts -name "*.py"` ; do \
-	    dh_install $${script} /usr/bin; \
-	done
-	dh_auto_install
-
-override_dh_auto_clean:
+execute_before_dh_auto_clean:
 	cd test && ${MAKE} clean || /bin/true
-	dh_auto_clean


=====================================
devtools/conda-recipe/meta.yaml
=====================================
@@ -22,7 +22,7 @@ requirements:
     - matplotlib >=3.5.2
     - numpy >=1.24.2
     - pandas >=1.5.3
-    - pomegranate >=0.14.8, <=0.14.9
+    - pomegranate >=0.14.8, <1.0.0
     - pyfaidx >=0.7.1
     - pysam >=0.20.0
     - reportlab >=3.6.12


=====================================
requirements/core.txt
=====================================
@@ -2,7 +2,7 @@ biopython >= 1.80
 matplotlib >= 3.5.2
 numpy >= 1.24.2
 pandas >= 1.5.3
-pomegranate >=0.14.8, <=0.14.9
+pomegranate >=0.14.8, <1.0.0
 pyfaidx >= 0.7.1
 pysam >= 0.20.0
 reportlab >= 3.6.12



View it on GitLab: https://salsa.debian.org/med-team/cnvkit/-/compare/30f9ef2080fb419609a747eaa125cdbc338692ad...4d247994a2fd19d168fd8a07610b81630733f3e9

-- 
View it on GitLab: https://salsa.debian.org/med-team/cnvkit/-/compare/30f9ef2080fb419609a747eaa125cdbc338692ad...4d247994a2fd19d168fd8a07610b81630733f3e9
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250206/da26fd5b/attachment-0001.htm>


More information about the debian-med-commit mailing list