[med-svn] [Git][med-team/cyvcf2][master] 5 commits: New upstream version 0.30.16
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Aug 23 15:38:21 BST 2022
Andreas Tille pushed to branch master at Debian Med / cyvcf2
Commits:
a6afb4b5 by Andreas Tille at 2022-08-23T16:36:02+02:00
New upstream version 0.30.16
- - - - -
38c75156 by Andreas Tille at 2022-08-23T16:36:02+02:00
routine-update: New upstream version
- - - - -
ea2a9630 by Andreas Tille at 2022-08-23T16:36:03+02:00
Update upstream source from tag 'upstream/0.30.16'
Update to upstream version '0.30.16'
with Debian dir 616c39b7878b259975569455ba610e996d5d6c70
- - - - -
0dc131bb by Andreas Tille at 2022-08-23T16:36:03+02:00
routine-update: Standards-Version: 4.6.1
- - - - -
74b3de26 by Andreas Tille at 2022-08-23T16:37:16+02:00
routine-update: Ready to upload to unstable
- - - - -
5 changed files:
- .github/workflows/wheels.yml
- cyvcf2/__init__.py
- cyvcf2/cli.py
- debian/changelog
- debian/control
Changes:
=====================================
.github/workflows/wheels.yml
=====================================
@@ -51,7 +51,7 @@ jobs:
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
- CIBW_SKIP: "pp* cp310-* *i686*"
+ CIBW_SKIP: "pp* *i686*"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_BUILD_MACOS: "{project}/ci/osx-deps"
=====================================
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.15"
+__version__ = "0.30.16"
=====================================
cyvcf2/cli.py
=====================================
@@ -14,7 +14,7 @@ LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
def print_header(vcf_obj, include, exclude, samples=None):
"""Print the header of a vcf obj
-
+
Parameters
----------
vcf_obj: cyvcf2.VCF
@@ -27,7 +27,12 @@ def print_header(vcf_obj, include, exclude, samples=None):
"""
if not samples is None:
vcf_obj.set_samples(samples)
-
+
+ if include:
+ include_list = ['ID='+inc+','for inc in include]
+ if exclude:
+ exclude_list = ['ID='+exc+','for exc in exclude]
+
for header_line in vcf_obj.raw_header.split('\n'):
if len(header_line) == 0:
continue
@@ -35,21 +40,21 @@ def print_header(vcf_obj, include, exclude, samples=None):
if 'INFO' not in header_line:
pass
elif include:
- print_line = any('ID='+inc+','for inc in include)
+ print_line = sum(map(header_line.count, include_list))
elif exclude:
- print_line = not any('ID='+exc+','for exc in exclude)
+ print_line = not sum(map(header_line.count, exclude_list))
if print_line:
click.echo(header_line)
def print_variant(variant, include, exclude):
"""Print a vcf variant
-
+
Parameters
----------
variant: cyvcf2.Variant
include: tuple
set of strings with info fields that should be included
- include: tuple
+ exclude: tuple
set of strings with info fields that should be included
"""
if include:
@@ -61,11 +66,11 @@ def print_variant(variant, include, exclude):
for exc in exclude:
if variant.INFO.get(exc):
del variant.INFO[exc]
-
+
print_string = str(variant).rstrip()
click.echo(print_string)
-
-
+
+
@click.command()
@click.argument('vcf',
@@ -104,7 +109,7 @@ def print_variant(variant, include, exclude):
help="Set the level of log output.",
show_default=True,
)
- at click.option('--silent',
+ at click.option('--silent',
is_flag=True,
help='Skip printing of vcf.'
)
@@ -129,7 +134,7 @@ def cyvcf2(context, vcf, include, exclude, chrom, start, end, loglevel, silent,
region = "{0}:{1}-{2}".format(chrom, start, end)
vcf_obj = VCF(vcf)
-
+
for inclusion in include:
if vcf_obj.contains(inclusion):
log.info("Including %s in output", inclusion)
@@ -143,7 +148,7 @@ def cyvcf2(context, vcf, include, exclude, chrom, start, end, loglevel, silent,
else:
log.warning("%s does not exist in header", exclusion)
context.abort()
-
+
if individual:
# Check if the choosen individuals exists in vcf
test = True
@@ -157,7 +162,7 @@ def cyvcf2(context, vcf, include, exclude, chrom, start, end, loglevel, silent,
individual = list(individual)
else:
individual = None
-
+
# Set individual to be empty list to skip all genotypes
if no_inds:
individual = []
@@ -173,12 +178,10 @@ def cyvcf2(context, vcf, include, exclude, chrom, start, end, loglevel, silent,
except Exception as err:
log.warning(err)
context.abort()
-
+
if nr_variants is None:
log.info("No variants in vcf")
return
-
+
log.info("{0} variants parsed".format(nr_variants+1))
log.info("Time to parse variants: {0}".format(datetime.now() - start_parsing))
-
-
\ No newline at end of file
=====================================
debian/changelog
=====================================
@@ -1,9 +1,10 @@
-cyvcf2 (0.30.15-2) UNRELEASED; urgency=medium
+cyvcf2 (0.30.16-1) unstable; urgency=medium
* Team upload.
* Proper filename for upstream tarball
+ * Standards-Version: 4.6.1 (routine-update)
- -- Andreas Tille <tille at debian.org> Mon, 02 May 2022 14:03:42 +0200
+ -- Andreas Tille <tille at debian.org> Tue, 23 Aug 2022 16:36:15 +0200
cyvcf2 (0.30.15-1) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -21,7 +21,7 @@ Build-Depends: debhelper-compat (= 13),
libhts-dev,
libbz2-dev,
help2man <!nodoc>
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
Vcs-Browser: https://salsa.debian.org/med-team/cyvcf2
Vcs-Git: https://salsa.debian.org/med-team/cyvcf2.git
Homepage: https://github.com/brentp/cyvcf2
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/compare/86b06e2c02f2728b2e4f71e43035e770ea1f8fe6...74b3de26219696a81cc3040a2e84079f7dd7b1f0
--
View it on GitLab: https://salsa.debian.org/med-team/cyvcf2/-/compare/86b06e2c02f2728b2e4f71e43035e770ea1f8fe6...74b3de26219696a81cc3040a2e84079f7dd7b1f0
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/20220823/2ee462aa/attachment-0001.htm>
More information about the debian-med-commit
mailing list