[med-svn] [Git][med-team/cyvcf2][upstream] New upstream version 0.30.18
Andreas Tille (@tille)
gitlab at salsa.debian.org
Thu Oct 6 10:51:32 BST 2022
Andreas Tille pushed to branch upstream at Debian Med / cyvcf2
Commits:
0135a566 by Andreas Tille at 2022-10-06T11:47:09+02:00
New upstream version 0.30.18
- - - - -
8 changed files:
- .github/workflows/wheels.yml
- README.md
- ci/linux-deps
- + ci/osx-arm64-deps
- ci/osx-deps
- cyvcf2/__init__.py
- + pyproject.toml
- setup.py
Changes:
=====================================
.github/workflows/wheels.yml
=====================================
@@ -46,17 +46,16 @@ jobs:
CIBW_ENVIRONMENT: "CYTHONIZE=1 LIBDEFLATE=1 LDFLAGS='-L/usr/lib64/openssl11' CPPFLAGS='-I/usr/include/openssl11' C_INCLUDE_PATH='/root/include' LIBRARY_PATH='/root/lib'"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: LD_LIBRARY_PATH='/root/lib' auditwheel repair -w {dest_dir} {wheel}
- - name: Build wheels for Mac OS
+ - name: Build wheels for Mac OS x86
if: matrix.os == 'macos-latest'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "pp* *i686*"
- CIBW_ARCHS_MACOS: "x86_64 arm64"
+ CIBW_ARCHS_MACOS: "x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_BUILD_MACOS: "{project}/ci/osx-deps"
CIBW_TEST_COMMAND: "{project}/ci/test"
- CIBW_TEST_SKIP: "*-macosx_arm64"
CIBW_ENVIRONMENT: "CYTHONIZE=1 LIBDEFLATE=1 C_INCLUDE_PATH='/usr/local/include' LIBRARY_PATH='/usr/local/lib'"
# https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-passing-dyld_library_path-to-delocate
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
@@ -66,6 +65,27 @@ jobs:
CPPFLAGS: "-I/usr/local/opt/openssl at 1.1/include"
PKG_CONFIG_PATH: "/usr/local/opt/openssl at 1.1/lib/pkgconfig"
+ - name: Build wheels for Mac OS arm64
+ # don't build with libdeflate, see https://github.com/brentp/cyvcf2/issues/252
+ if: matrix.os == 'macos-latest'
+ run: |
+ python -m cibuildwheel --output-dir wheelhouse
+ env:
+ CIBW_SKIP: "pp* *i686*"
+ CIBW_ARCHS_MACOS: "arm64"
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
+ CIBW_BEFORE_BUILD_MACOS: "{project}/ci/osx-arm64-deps"
+ CIBW_TEST_COMMAND: "{project}/ci/test"
+ CIBW_TEST_SKIP: "*-macosx_arm64"
+ CIBW_ENVIRONMENT: "CYTHONIZE=1 C_INCLUDE_PATH='/usr/local/include' LIBRARY_PATH='/usr/local/lib'"
+ # https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-passing-dyld_library_path-to-delocate
+ CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
+ DYLD_LIBRARY_PATH=/usr/local/lib delocate-listdeps {wheel} &&
+ DYLD_LIBRARY_PATH=/usr/local/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
+ LDFLAGS: "-L/usr/local/opt/openssl at 1.1/lib"
+ CPPFLAGS: "-I/usr/local/opt/openssl at 1.1/include"
+ PKG_CONFIG_PATH: "/usr/local/opt/openssl at 1.1/lib/pkgconfig"
+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Setup tmate session
if: ${{ always() && github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
@@ -118,7 +138,7 @@ jobs:
name: artifact
path: dist
- - uses: pypa/gh-action-pypi-publish at master
+ - uses: pypa/gh-action-pypi-publish at release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
=====================================
README.md
=====================================
@@ -31,31 +31,29 @@ The example below shows much of the use of cyvcf2.
from cyvcf2 import VCF
for variant in VCF('some.vcf.gz'): # or VCF('some.bcf')
- variant.REF, variant.ALT # e.g. REF='A', ALT=['C', 'T']
+ variant.REF, variant.ALT # e.g. REF='A', ALT=['C', 'T']
+ variant.CHROM, variant.start, variant.end, variant.ID, \
+ variant.FILTER, variant.QUAL
- variant.CHROM, variant.start, variant.end, variant.ID, \
- variant.FILTER, variant.QUAL
+ # numpy arrays of specific things we pull from the sample fields.
+ # gt_types is array of 0,1,2,3==HOM_REF, HET, UNKNOWN, HOM_ALT
+ variant.gt_types, variant.gt_ref_depths, variant.gt_alt_depths # numpy arrays
+ variant.gt_phases, variant.gt_quals, variant.gt_bases # numpy array
- # numpy arrays of specific things we pull from the sample fields.
- # gt_types is array of 0,1,2,3==HOM_REF, HET, UNKNOWN, HOM_ALT
- variant.gt_types, variant.gt_ref_depths, variant.gt_alt_depths # numpy arrays
- variant.gt_phases, variant.gt_quals, variant.gt_bases # numpy array
+ ## INFO Field.
+ ## extract from the info field by it's name:
+ variant.INFO.get('DP') # int
+ variant.INFO.get('FS') # float
+ variant.INFO.get('AC') # float
+ # convert back to a string.
+ str(variant)
- ## INFO Field.
- ## extract from the info field by it's name:
- variant.INFO.get('DP') # int
- variant.INFO.get('FS') # float
- variant.INFO.get('AC') # float
- # convert back to a string.
- str(variant)
+ ## sample info...
-
- ## sample info...
-
- # Get a numpy array of the depth per sample:
+ # Get a numpy array of the depth per sample:
dp = variant.format('DP')
# or of any other format field:
sb = variant.format('SB')
@@ -67,7 +65,6 @@ vcf = VCF('some.vcf.gz')
for v in vcf('11:435345-556565'):
if v.INFO["AF"] > 0.1: continue
print(str(v))
-
```
Installation
@@ -140,7 +137,7 @@ Options:
See Also
========
-Pysam also [has a cython wrapper to htslib](https://github.com/pysam-developers/pysam/blob/master/pysam/cbcf.pyx) and one block of code here is taken directly from that library. But, the optimizations that we want for gemini are very specific so we have chosen to create a separate project.
+Pysam also [has a cython wrapper to htslib](https://github.com/pysam-developers/pysam/blob/master/pysam/libcbcf.pyx) and one block of code here is taken directly from that library. But, the optimizations that we want for gemini are very specific so we have chosen to create a separate project.
Performance
===========
=====================================
ci/linux-deps
=====================================
@@ -6,8 +6,6 @@ yum install -y openssl11-devel
yum install -y libffi libffi-devel zlib-devel
yum install -y bzip2-devel bzip2-libs xz-devel xz-libs
-python -m pip install pip --upgrade
-
git submodule init
git submodule update
@@ -43,6 +41,3 @@ cd htslib
/usr/bin/autoconf
./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2
make
-
-cd ..
-pip install -r requirements.txt
=====================================
ci/osx-arm64-deps
=====================================
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -e
+
+git submodule init
+git submodule update
+
+# configure fails with autoconf 2.71, so downgrade
+# see https://github.com/asdf-vm/asdf-erlang/issues/195
+brew install autoconf at 2.69 && \
+brew link --overwrite autoconf at 2.69 && \
+autoconf -V
+
+cd htslib
+autoheader
+autoconf
+./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2 --without-libdeflate
+make
=====================================
ci/osx-deps
=====================================
@@ -2,8 +2,6 @@
set -e
-python -m pip install pip --upgrade
-
git submodule init
git submodule update
@@ -25,6 +23,3 @@ autoheader
autoconf
./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2
make
-
-cd ..
-pip install -r requirements.txt
=====================================
cyvcf2/__init__.py
=====================================
@@ -2,4 +2,4 @@ from .cyvcf2 import (VCF, Variant, Writer, r_ as r_unphased, par_relatedness,
par_het)
Reader = VCFReader = VCF
-__version__ = "0.30.16"
+__version__ = "0.30.18"
=====================================
pyproject.toml
=====================================
@@ -0,0 +1,2 @@
+[build-system]
+requires = ["setuptools", "wheel", "cython>=0.23.3", "oldest-supported-numpy"]
=====================================
setup.py
=====================================
@@ -5,14 +5,12 @@ import subprocess
import platform
import pkg_resources
-from setuptools import setup, Extension, dist
+from setuptools import setup, Extension
if sys.version_info.major == 2 and sys.version_info.minor != 7:
sys.stderr.write("ERROR: cyvcf2 is only for python 2.7 or greater you are running %d.%d\n", (sys.version_info.major, sys.version_info.minor))
sys.exit(1)
-# Install numpy right now
-dist.Distribution().fetch_build_eggs(['numpy'])
import numpy as np
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/commit/0135a5664d0c9fe4cc05f65ae9c8f78b948cc055
--
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/commit/0135a5664d0c9fe4cc05f65ae9c8f78b948cc055
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/20221006/b9d0c910/attachment-0001.htm>
More information about the debian-med-commit
mailing list