[med-svn] [Git][med-team/cnvkit][upstream] New upstream version 0.9.12

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



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


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


8 changed files:

- .github/workflows/tests-tox.yaml
- Dockerfile
- cnvlib/_version.py
- cnvlib/coverage.py
- cnvlib/segmentation/cbs.py
- conda-env.yml
- 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


=====================================
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/-/commit/4929e5c1bae232babe5cf2af867bdbe35478776e

-- 
View it on GitLab: https://salsa.debian.org/med-team/cnvkit/-/commit/4929e5c1bae232babe5cf2af867bdbe35478776e
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/cc480ba8/attachment-0001.htm>


More information about the debian-med-commit mailing list