[med-svn] [Git][med-team/cyvcf2][upstream] New upstream version 0.30.11
Nilesh Patra (@nilesh)
gitlab at salsa.debian.org
Sun Aug 8 12:41:13 BST 2021
Nilesh Patra pushed to branch upstream at Debian Med / cyvcf2
Commits:
fce26697 by Nilesh Patra at 2021-08-08T17:00:49+05:30
New upstream version 0.30.11
- - - - -
13 changed files:
- .github/workflows/build.yml
- .github/workflows/wheels.yml
- − .travis.yml
- CHANGES.md
- README.md
- ci/linux-deps
- ci/osx-deps
- ci/test
- cyvcf2/__init__.py
- cyvcf2/cyvcf2.pyx
- + cyvcf2/tests/test.isa.vcf
- cyvcf2/tests/test_reader.py
- scripts/compare.sh
Changes:
=====================================
.github/workflows/build.yml
=====================================
@@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
- python-version: [3.6, 3.7, 3.8]
+ python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout at v2
@@ -20,6 +20,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
+ sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
pip install -r requirements.txt
pip install nose
=====================================
.github/workflows/wheels.yml
=====================================
@@ -2,8 +2,16 @@ name: Wheels
on:
push:
+ branches:
+ - main
tags:
- 'v*.*.*'
+ workflow_dispatch:
+ inputs:
+ debug_enabled:
+ description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
+ required: false
+ default: false
jobs:
build_wheels:
@@ -42,7 +50,7 @@ jobs:
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
- CIBW_SKIP: "pp* cp27-* cp34-* *i686*"
+ CIBW_SKIP: "pp* cp27-* cp34-* cp35-* *i686*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_BUILD_MACOS: "{project}/ci/osx-deps"
CIBW_TEST_COMMAND: "{project}/ci/test"
@@ -51,6 +59,11 @@ jobs:
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 }}
+ uses: mxschmitt/action-tmate at v3
+
- uses: actions/upload-artifact at v2
with:
path: ./wheelhouse/*.whl
@@ -68,6 +81,7 @@ jobs:
- name: Install dependencies
run: |
+ sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libbz2-dev liblzma-dev libssl-dev
git submodule init
git submodule update
=====================================
.travis.yml deleted
=====================================
@@ -1,71 +0,0 @@
-language: python
-dist: bionic
-python:
- - "2.7"
- - "3.6"
- - "3.7"
- - "3.8"
-
-addons:
- homebrew:
- packages:
- - openssl
-
-install:
- - sudo apt-get install libcurl4-openssl-dev
- - pip install -r requirements.txt
- - cd htslib
- - autoheader && autoconf
- - ./configure --enable-s3 --disable-lzma --disable-bz2
- - make
- - cd ..
- - CYTHONIZE=1 python setup.py install
-
-script:
- - python setup.py test
-
-jobs:
- include:
- - os: linux
- python: "3.7"
- env:
- - CIBW_SKIP="pp* cp27-* cp34-* cp35-* *i686*"
- - CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014
- - CIBW_BEFORE_BUILD_LINUX="{project}/ci/linux-deps"
- - CIBW_TEST_COMMAND="{project}/ci/test"
- - CIBW_ENVIRONMENT="CYTHONIZE=1 LDFLAGS='-L/usr/lib64/openssl11' CPPFLAGS='-I/usr/include/openssl11' C_INCLUDE_PATH='/root/include' LIBRARY_PATH='/root/lib'"
- services: docker
- install:
- - python3 -m pip install cibuildwheel
- script:
- - python3 -m cibuildwheel --output-dir wheelhouse
- after_success:
- - |
- if [ "${TRAVIS_TAG:-}" != "" ]; then
- python3 -m pip install twine -U
- python3 -m twine upload --repository testpypi --skip-existing wheelhouse/*
- python3 setup.py sdist
- python3 -m twine upload --repository testpypi --skip-existing dist/*
- fi
- - os: osx
- osx_image: xcode10.2
- language: shell
- env:
- - CIBW_SKIP="pp* cp27-* cp34-* cp35-* *i686*"
- - CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014
- - CIBW_BEFORE_BUILD_MACOS="{project}/ci/osx-deps"
- - CIBW_TEST_COMMAND="{project}/ci/test"
- - CIBW_ENVIRONMENT="CYTHONIZE=1"
- - 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"
- install:
- - python3 -m pip install cibuildwheel
- script:
- - python3 -m cibuildwheel --output-dir wheelhouse
- after_success:
- - |
- if [ "${TRAVIS_TAG:-}" != "" ]; then
- python3 -m pip install twine -U
- python3 -m twine upload --repository testpypi --skip-existing wheelhouse/*
- fi
=====================================
CHANGES.md
=====================================
@@ -1,3 +1,9 @@
+# v0.30.11
++ bump for CI
+
+# v0.30.10
++ fix is_indel for <NON_REF> (see #217)
+
# 0.3.8
+ just bumping for CI+wheels
=====================================
README.md
=====================================
@@ -146,4 +146,4 @@ Performance
===========
For the performance comparison in the paper, we used [thousand genomes chromosome 22](ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz)
-With the full comparison runner [here](https://github.com/brentp/cyvcf2/blob/master/scripts/compare.sh).
+With the full comparison runner [here](https://github.com/brentp/cyvcf2/blob/main/scripts/compare.sh).
=====================================
ci/linux-deps
=====================================
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e
+
yum install -y openssl11-devel
yum install -y libffi libffi-devel zlib-devel
yum install -y bzip2-devel bzip2-libs xz-devel xz-libs
@@ -28,8 +30,10 @@ cd ..
rm -rf curl-7.73.0
cd htslib
-autoheader
-autoconf
+# configure fails with autoconf 2.71 (in /usr/local/bin), so use 2.69 (in /usr/bin)
+/usr/bin/autoconf -V
+/usr/bin/autoheader
+/usr/bin/autoconf
./configure --enable-libcurl --enable-s3 --enable-lzma --enable-bz2
make
=====================================
ci/osx-deps
=====================================
@@ -1,10 +1,18 @@
#!/bin/bash
+set -e
+
python -m pip install pip --upgrade
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
=====================================
ci/test
=====================================
@@ -7,7 +7,7 @@ else
exit 1
fi
-if (cd ~/ && python -c "from cyvcf2 import VCF; VCF('https://github.com/brentp/cyvcf2/raw/master/cyvcf2/tests/test.vcf.gz')")
+if (cd ~/ && python -c "from cyvcf2 import VCF; VCF('https://github.com/brentp/cyvcf2/raw/main/cyvcf2/tests/test.vcf.gz')")
then
echo "Remote reading: OK"
else
=====================================
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.8"
+__version__ = "0.30.11"
=====================================
cyvcf2/cyvcf2.pyx
=====================================
@@ -1830,18 +1830,18 @@ cdef class Variant(object):
"boolean indicating if the variant is an indel."
def __get__(self):
cdef int i
- is_sv = self.is_sv
- if len(self.b.d.allele[0]) > 1 and not is_sv: return True
+ if self.is_sv: return False
+ if len(self.b.d.allele[0]) > 1 and self.b.d.allele[0] != b'<': return True
- if len(self.REF) > 1 and not is_sv: return True
+ if len(self.REF) > 1: return True
for i in range(1, self.b.n_allele):
alt = self.b.d.allele[i]
+ if alt[0] == b'<': continue
if alt == b".":
return True
- if len(alt) != len(self.REF):
- if not is_sv:
- return True
+ if len(alt) > 1:
+ return True
return False
property is_transition:
=====================================
cyvcf2/tests/test.isa.vcf
=====================================
@@ -0,0 +1,10 @@
+##fileformat=VCFv4.2
+##fileDate=20200122
+##contig=<ID=chr1,length=1348724>
+##INFO=<ID=AC,Number=A,Type=Integer,Description="Total number of alternate alleles in called genotypes">
+#CHROM POS ID REF ALT QUAL FILTER INFO
+chr1 146999 . TCGGT <NON_REF> 0 . AC=0
+chr1 146999 . TCGGT TGGGG 0 . AC=0
+chr1 146999 . T TG 0 . AC=0
+chr1 146999 . TG T 0 . AC=0
+chr1 146999 . T G 0 . AC=0
=====================================
cyvcf2/tests/test_reader.py
=====================================
@@ -268,6 +268,18 @@ def test_writer_from_string():
w.write_record(v)
w.close()
+def test_isa():
+
+ vcf = VCF(os.path.join(HERE, "test.isa.vcf"))
+ for i, v in enumerate(vcf):
+ if i in {0, 1, 2, 3}:
+ assert v.is_indel
+ assert not v.is_snp
+ if i in {4}:
+ assert v.is_snp
+
+
+
def run_writer(writer, filename, rec):
rec.INFO["AC"] = "3"
=====================================
scripts/compare.sh
=====================================
@@ -1,3 +1,4 @@
+# This is a record of comparisons made in the cyvcf2 paper. These vcf filenames are now different and may not work to run the tests
chrom=22
if [[ ! -e ALL.chr${chrom}.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz ]]; then
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/commit/fce2669791232e72db9efaa1cb82d78511fdc009
--
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/commit/fce2669791232e72db9efaa1cb82d78511fdc009
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/20210808/944c9d25/attachment-0001.htm>
More information about the debian-med-commit
mailing list