#1 Update to bcftools 1.13 (requires corresponding HTSlib PR)
Merged a month ago by jaruga. Opened 2 months ago by jmarshall.
https://github.com/jmarshall/fedora-packages.git bcftools.upstream-1.13  into  rawhide

Update to BCFtools version 1.13
John Marshall • 2 months ago  
bcftools-1.9-configure.patch
file removed
-43
@@ -1,43 +0,0 @@

- --- bcftools-1.9-clean/config.mk.in	2018-03-15 14:28:19.000000000 +0000

- +++ bcftools-1.9-after/config.mk.in	2019-11-06 22:13:02.000000000 +0000

- @@ -50,7 +50,8 @@

-  

-  PLATFORM   = @PLATFORM@

-  PLUGINS_ENABLED = @enable_bcftools_plugins@

- -plugindir = @bcf_plugindir@

- +plugindir  = @bcf_plugindir@

- +pluginpath = @bcf_pluginpath@

-  PLUGIN_EXT = @PLUGIN_EXT@

-  

-  @Hsource@HTSDIR = @HTSDIR@

- --- bcftools-1.9-clean/configure.ac	2018-07-03 16:54:58.000000000 +0100

- +++ bcftools-1.9-after/configure.ac	2019-11-06 22:13:02.000000000 +0000

- @@ -71,7 +71,7 @@

-       no)  with_bcf_plugin_path= ;;

-     esac],

-    [with_bcf_plugin_path=$with_bcf_plugin_dir])

- -AC_SUBST([PLUGINPATH], $with_bcf_plugin_path)

- +AC_SUBST([bcf_pluginpath], $with_bcf_plugin_path)

-  

-  AC_ARG_ENABLE([perl-filters],

-    [AS_HELP_STRING([--enable-perl-filters],

- --- bcftools-1.9-clean/configure	2019-11-06 22:16:31.000000000 +0000

- +++ bcftools-1.9-after/configure	2019-11-06 22:16:43.000000000 +0000

- @@ -588,7 +588,7 @@

-  HTSDIR

-  subdirs

-  enable_perl_filters

- -PLUGINPATH

- +bcf_pluginpath

-  bcf_plugindir

-  enable_bcftools_plugins

-  GREP

- @@ -3237,7 +3237,7 @@

-    with_bcf_plugin_path=$with_bcf_plugin_dir

-  fi

-  

- -PLUGINPATH=$with_bcf_plugin_path

- +bcf_pluginpath=$with_bcf_plugin_path

-  

-  

-  # Check whether --enable-perl-filters was given.

bcftools-1.9-python3.patch
file removed
-76
@@ -1,76 +0,0 @@

- diff --git a/misc/guess-ploidy.py b/misc/guess-ploidy.py

- index 816a5c6..6ad3d36 100755

- --- a/misc/guess-ploidy.py

- +++ b/misc/guess-ploidy.py

- @@ -24,6 +24,8 @@

-  # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

-  # DEALINGS IN THE SOFTWARE.

-  

- +from __future__ import print_function

- +

-  import matplotlib as mpl

-  mpl.use('Agg')

-  import matplotlib.pyplot as plt

- @@ -33,8 +35,9 @@ import csv

-  csv.register_dialect('tab', delimiter='\t', quoting=csv.QUOTE_NONE)

-  

-  if len(sys.argv) != 3:

- -    print >> sys.stderr, 'About: Plot output of "bcftools +guess-ploidy -v"'

- -    print >> sys.stderr, 'Usage: guess-ploidy.py <guess-ploidy.out> <image-prefix>'

- +    print("""\

- +About: Plot output of "bcftools +guess-ploidy -v"

- +Usage: guess-ploidy.py <guess-ploidy.out> <image-prefix>""", file = sys.stderr)

-      sys.exit()

-  

-  prefix = sys.argv[2]

- diff --git a/misc/plot-roh.py b/misc/plot-roh.py

- index 81efaaa..90dd63e 100755

- --- a/misc/plot-roh.py

- +++ b/misc/plot-roh.py

- @@ -29,26 +29,27 @@ csv.register_dialect('tab', delimiter='\t', quoting=csv.QUOTE_NONE)

-  

-  def usage(msg=None):

-      if msg==None:

- -        print 'Usage: plot.py [OPTIONS] <dir>'

- -        print 'Options:'

- -        print '   -H, --highlight +group1,-group2       Highlight calls shared within group1 but not present in group2'

- -        print '   -i, --interactive                     Run interactively'

- -        print '   -l, --min-length <num>                Filter input regions shorter than this [0]'

- -        print '   -n, --min-markers <num>               Filter input regions with fewer marker than this [0]'

- -        print '   -o, --outfile <file>                  Output file name [plot.png]'

- -        print '   -q, --min-qual <num>                  Filter input regions with quality smaller than this [0]'

- -        print '   -r, --region [^]<chr|chr:beg-end>     Plot this chromosome/region only'

- -        print '   -s, --samples <file>                  List of samples to show, rename or group: "name[\\tnew_name[\\tgroup]]"'

- -        print '   -h, --help                            This usage text'

- -        print 'Matplotlib options:'

- -        print '   +adj, --adjust <str>          Set plot adjust [bottom=0.18,left=0.07,right=0.98]'

- -        print '   +dpi, --dpi <num>             Set bitmap DPI [150]'

- -        print '   +sxt, --show-xticks           Show x-ticks (genomic coordinate)'

- -        print '   +twh, --track-wh <num,num>    Set track width and height [20,1]'

- -        print '   +xlb, --xlabel <str>          Set x-label'

- -        print '   +xli, --xlimit <num>          Extend x-range by this fraction [0.05]'

- +        print("""\

- +Usage: plot-roh.py [OPTIONS] <dir>

- +Options:

- +   -H, --highlight +group1,-group2       Highlight calls shared within group1 but not present in group2

- +   -i, --interactive                     Run interactively

- +   -l, --min-length <num>                Filter input regions shorter than this [0]

- +   -n, --min-markers <num>               Filter input regions with fewer marker than this [0]

- +   -o, --outfile <file>                  Output file name [plot.png]

- +   -q, --min-qual <num>                  Filter input regions with quality smaller than this [0]

- +   -r, --region [^]<chr|chr:beg-end>     Plot this chromosome/region only

- +   -s, --samples <file>                  List of samples to show, rename or group: "name[\\tnew_name[\\tgroup]]"

- +   -h, --help                            This usage text

- +Matplotlib options:

- +   +adj, --adjust <str>          Set plot adjust [bottom=0.18,left=0.07,right=0.98]

- +   +dpi, --dpi <num>             Set bitmap DPI [150]

- +   +sxt, --show-xticks           Show x-ticks (genomic coordinate)

- +   +twh, --track-wh <num,num>    Set track width and height [20,1]

- +   +xlb, --xlabel <str>          Set x-label

- +   +xli, --xlimit <num>          Extend x-range by this fraction [0.05]""")

-      else:

- -        print msg

- +        print(msg)

-      sys.exit(1)

-  

-  dir          = None

bcftools.spec
file modified
+10 -7
@@ -1,6 +1,6 @@

  Name: bcftools

- Version: 1.9

- Release: 8%{?dist}

+ Version: 1.13

+ Release: 1%{?dist}

  Summary: Tools for genomic variant calling and manipulating VCF/BCF files

  

  # This software is available under a choice of one of two licenses,
@@ -13,8 +13,6 @@

  # https:// is better than http://.

  URL: https://www.htslib.org/

  Source0: https://github.com/samtools/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2

- Patch0: bcftools-1.9-python3.patch

- Patch1: bcftools-1.9-configure.patch

  

  BuildRequires: gcc

  BuildRequires: gsl-devel
@@ -47,11 +45,9 @@

  

  %prep

  %setup -q

- %patch0 -p1 -b .py3

- %patch1 -p1 -b .conf

  

  sed -i '1s|/usr/bin/env perl|/usr/bin/perl|' misc/*.pl misc/plot-vcfstats

- sed -i '1s|/usr/bin/env python|%{__python3}|' misc/*.py

+ sed -i '1s|/usr/bin/env python3\{0,1\}|%{__python3}|' misc/*.py

  

  

  %build
@@ -82,6 +78,7 @@

  # to problems when the name changes or something additional is installed.

  %{_bindir}/bcftools

  %{_bindir}/color-chrs.pl

+ %{_bindir}/gff2gff.py

  %{_bindir}/guess-ploidy.py

  %{_bindir}/plot-roh.py

  %{_bindir}/plot-vcfstats
@@ -92,6 +89,12 @@

  

  

  %changelog

+ * Fri Jul 23 2021 John Marshall <jmarshall@hey.com> - 1.13-1

+ - Update to BCFtools version 1.13

+ - Remove outdated patches which have been applied upstream

+ - Update Python shebang rewriting to handle both "python" and "python3"

+ - Package gff2gff.py script, added in BCFtools 1.11

+ 

  * Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-8

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

  

sources
file modified
+1 -1
@@ -1,1 +1,1 @@

- SHA512 (bcftools-1.9.tar.bz2) = fd662fb0d214eb75ac04fc4494e8dbaca84d10698ca14801427341def6a5df4af99e7bd4cd873da5422ae921deb49b940cedb926da356b1eabfac525a38f806c

+ SHA512 (bcftools-1.13.tar.bz2) = aa533233dd2fec2279859204be39430c4fc630137a91d57fe917fd7a220044d5202ddc3d44bcffc3bd5bd5bb64f6ea4c8ec3c31e5e1ec72399998f1e6f23a55a

no initial comment

Fedora currently packages bcftools 1.9, which is from 2018 and was superseded by 1.10 in 2019. The current upstream version is 1.13, released this month.

This requires HTSlib 1.13 -- see the corresponding PR filed on that package.

Changes:

  • Update to BCFtools version 1.13
  • Remove outdated patches which have been applied upstream
  • Update Python shebang rewriting to handle both "python" and "python3"
  • Package gff2gff.py script, added in BCFtools 1.11

Thanks!! I will check it later!

I reviewed, and it looks good to me. Thanks!

By the way, I plan that I will enable this RPM's s390x build later after merging this PR.

Re s390x: you can try, but I think you will find that big endian platforms remain unsupported by bcftools.

Pull-Request has been merged by jaruga

a month ago