Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ucsc-wigtobigwig to 472 #51702

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions recipes/ucsc-wigtobigwig/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export INCLUDE_PATH="${PREFIX}/include"
export LIBRARY_PATH="${PREFIX}/lib"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"
export CFLAGS="${CFLAGS} -O3 ${LDFLAGS}"
export CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include ${LDFLAGS}"
export CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include ${LDFLAGS}"
export L="${LDFLAGS}"
mkdir -p "${BINDIR}"
(cd kent/src/lib && make CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j "${CPU_COUNT}")
(cd kent/src/htslib && make CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j "${CPU_COUNT}")
(cd kent/src/jkOwnLib && make CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j "${CPU_COUNT}")
(cd kent/src/hg/lib && make USE_HIC=0 CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j "${CPU_COUNT}")
(cd kent/src/utils/wigToBigWig && make CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j "${CPU_COUNT}")
cp bin/wigToBigWig "${PREFIX}/bin"
chmod 0755 "${PREFIX}/bin/wigToBigWig"
chmod 0755 bin/wigToBigWig
mv bin/wigToBigWig "${PREFIX}/bin"
11 changes: 0 additions & 11 deletions recipes/ucsc-wigtobigwig/htmshell.patch

This file was deleted.

27 changes: 27 additions & 0 deletions recipes/ucsc-wigtobigwig/include.macos.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- a/kent/src/inc/common.mk 2017-11-07 17:46:00.000000000 -0500
+++ b/kent/src/inc/common.mk 2017-11-13 17:44:51.017090255 -0500
@@ -17,7 +17,7 @@
endif

HG_DEFS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_${MACHTYPE}
-HG_INC+=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc -I$(kentSrc)/htslib
+HG_INC+=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc -I$(kentSrc)/htslib -I${PREFIX}/include

# to check for Mac OSX Darwin specifics:
UNAME_S := $(shell uname -s)
--- a/kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100
+++ b/kent/src/hg/lib/straw/makefile 2022-10-26 12:00:00.000000000 +0100
@@ -1,4 +1,4 @@
-KENT_INC=-I../../../inc
+KENT_INC=-I../../../inc -I${PREFIX}/include

straw: straw.o cStraw.o
ld -r -o ../straw.o straw.o cStraw.o
--- a/kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200
+++ b/kent/src/utils/expMatrixToBarchartBed/expMatrixToBarchartBed 2018-06-06 02:23:56.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.7
+#!/usr/bin/env python
# expMatrixToBarchartBed
"""
Generate a barChart bed6+5 file from a matrix, meta data, and coordinates.
Comment on lines +23 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding explicit Python version compatibility handling.

Since this script is part of a bioinformatics tool, it's recommended to:

  1. Add explicit version checking at runtime
  2. Include compatibility imports if needed
  3. Document supported Python versions in the script's docstring

Example addition:

#!/usr/bin/env python
import sys

if sys.version_info[0] < 3:
    from __future__ import print_function, division

# Version check
min_python = (2, 7)
if sys.version_info[:2] < min_python:
    sys.exit("Python %s.%s or later is required." % min_python)

# expMatrixToBarchartBed
"""
Generate a barChart bed6+5 file from a matrix, meta data, and coordinates.
Supported Python versions: 2.7+, 3.x
"""

19 changes: 9 additions & 10 deletions recipes/ucsc-wigtobigwig/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set package = "ucsc-wigtobigwig" %}
{% set program = "wigToBigWig" %}
{% set version = "469" %}
{% set sha256 = "3f95b26ccca854c965c05773481c269f2a0e6fb1906ae8a7fe2437c6ad543963" %}
{% set version = "472" %}
{% set sha256 = "26d126c51d0ba3165519b116b6461af8bfd938505f6c0871cb325a7ab82368f2" %}

package:
name: "{{ package }}"
Expand All @@ -11,10 +11,10 @@ source:
url: "http://hgdownload.cse.ucsc.edu/admin/exe/userApps.archive/userApps.v{{ version }}.src.tgz"
sha256: "{{ sha256 }}"
patches:
- "include.patch"
- include.patch # [linux]
- include.macos.patch # [osx]

build:
skip: True # [osx]
number: 0
run_exports:
- {{ pin_subpackage(package, max_pin=None) }}
Expand All @@ -28,26 +28,25 @@ requirements:
- libuuid
- mysql-connector-c
- libopenssl-static
- clangdev # [osx]
- zlib

run:
- libpng
- libuuid
- mysql-connector-c
- libopenssl-static
- zlib

test:
commands:
# just check for existence and exec bit, because the individual packages have no unified behavior
- test -x ${PREFIX}/bin/{{ program }}

about:
home: "https://hgdownload.cse.ucsc.edu/admin/exe/"
license: "Varies; see http://genome.ucsc.edu/license"
summary: "Convert ascii format wig file (in fixedStep, variableStep"
home: "https://hgdownload.cse.ucsc.edu/admin/exe"
license: "Varies; see https://genome.ucsc.edu/license"
summary: "Convert ascii format wig file (in fixedStep, variableStep)."
dev_url: "https://github.com/ucscGenomeBrowser/kent"
doc_url: "https://github.com/ucscGenomeBrowser/kent/blob/master/README"
doc_url: "https://github.com/ucscGenomeBrowser/kent/blob/v{{ version }}_base/README"

extra:
identifiers:
Expand Down
Loading