Skip to content

Commit

Permalink
progress on #224 Transrate
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrKralCZ committed Jul 4, 2024
1 parent 05d589d commit 37b9558
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 156 deletions.
2 changes: 2 additions & 0 deletions 224_Transrate/Transrate-1.0.3-GCC-12.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ builddependencies = [
dependencies = [
('Ruby', '3.3.0'),
('crb-blast', '0.6.9'),
('colorize', '0.7.7'),
('yell', '2.2.2'),
]

preinstallopts = """sed -i "s/'yell', '~> 2.0',/'yell',/g" transrate.gemspec && """
Expand Down
107 changes: 0 additions & 107 deletions 224_Transrate/Transrate-1.0.3-GCC-12.3.0.eb.Bundle

This file was deleted.

75 changes: 75 additions & 0 deletions 224_Transrate/Transrate-1.0.3-GCC-12.3.0.eb.Components
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
easyblock = 'Bundle'

name = 'Transrate'
version = '1.0.3'

homepage = 'https://hibberdlab.com/transrate'
description = """Transrate is software for de-novo transcriptome assembly quality analysis.
It examines your assembly in detail and compares it to experimental evidence such as the sequencing reads,
reporting quality scores for contigs and assemblies. This allows you to choose between assemblers and parameters,
filter out the bad contigs from an assembly, and help decide when to stop trying to improve the assembly."""

toolchain = {'name': 'GCC', 'version': '12.3.0'}

builddependencies = [
('binutils', '2.40'),
]

dependencies = [
('Ruby', '3.3.0'),
]

default_easyblock = 'RubyGem'

default_component_specs = {
'source_urls': ['https://rubygems.org/downloads/'],
'sources': ['%(name)s-%(version)s.gem'],
}

components = [
('colorize', '0.7.7', {
'checksums': ['d6ab95a5fcdea3c36c3327d38c1e79e2950ee1788506d8489ae35db330937a99'],
}),
('facade', '1.2.1', {
'checksums': ['0764de5519088227675a2a67da23322500c3c507b89486d91296e031d87d036e'],
}),
('pathname2', '1.8.4', {
'checksums': ['1711264f3f7c1b380f96e1f0383b135d9703488f7b1acf66346a176efc257b7a'],
}),
('fixwhich', '1.0.2', {
'checksums': ['c6a8f796a7eb60ffbc29f0d2af85461761a36c2864d25e445ff18bfbd1657078'],
}),
('bindeps', '1.2.1', {
'checksums': ['3c11d75aa722bed67246852bb430a182361a128910d384b664b91f3e65bc34b5'],
}),
('yell', '2.2.2', {
'checksums': ['1d166f3cc3b6dc49a59778ea7156ed6d8de794c15106d48ffd6cbb061b9b26bc'],
}),
('bio', '1.6.0.pre.20181210', {
'checksums': ['c4114aeb99b012f90660b92ead4ca88c1578fd58252ed3ec46eb45dc4a2c6cc9'],
}),
('threach', '0.2.0', {
'checksums': ['432cbf3569bf9b09e26f93d0959fd6fb911c71e790e8a4cc4d1110e139a2ffca'],
}),
('trollop', '2.9.10', {
'checksums': ['ceca2d91f349163d6ee3e792d356d4ded7472e6da31ac6dcc5956d1b03607bf7'],
}),
('crb-blast', '0.6.9', {
'checksums': ['69c346e7d83efe9b9a383a39b57e7cce186a82b7074f275b14906f8f05678e3e'],
}),
('%(namelower)', version, {
'preinstallopts': """sed -i "s/'yell', '~> 2.0',/'yell',/g" transrate.gemspec && """,
'checksums': ['2ccb101cfab5a33586ea9e62af2b2f14caf6bc016724d1fef796b427e39fe100'],
}),
]

sanity_check_paths = {
'files': ['bin/%(namelower)s'],
'dirs': ['gems/%(namelower)s-%(version)s'],
}

sanity_check_commands = ["%(namelower)s --help"]

modextrapaths = {'GEM_PATH': ['']}

moduleclass = 'bio'
31 changes: 31 additions & 0 deletions 224_Transrate/colorize-0.7.7-GCC-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
easyblock = 'RubyGem'

name = 'colorize'
version = '0.7.7'

homepage = 'https://github.com/fazibear/colorize'
description = """Ruby gem for colorizing text using ANSI escape sequences.
Extends String class or add a ColorizedString with methods to set the text color, background color and text effects."""

toolchain = {'name': 'GCC', 'version': '12.3.0'}

source_urls = ['https://rubygems.org/downloads/']
sources = ['%(name)s-%(version)s.gem']
checksums = ['d6ab95a5fcdea3c36c3327d38c1e79e2950ee1788506d8489ae35db330937a99']

gem_file = '%(name)s-%(version)s.gem'

builddependencies = [
('binutils', '2.40'),
]

dependencies = [
('Ruby', '3.3.0'),
]

sanity_check_paths = {
'files': [],
'dirs': ['gems/%(namelower)s-%(version)s'],
}

moduleclass = 'lib'
11 changes: 1 addition & 10 deletions 224_Transrate/crb-blast-0.6.9-GCC-12.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ exts_default_options = {
exts_defaultclass = 'RubyGem'

exts_list = [
('colorize', '0.7.7', { # extra
'checksums': ['d6ab95a5fcdea3c36c3327d38c1e79e2950ee1788506d8489ae35db330937a99'],
}),
('facade', '1.2.1', {
'checksums': ['0764de5519088227675a2a67da23322500c3c507b89486d91296e031d87d036e'],
}),
Expand All @@ -36,15 +33,9 @@ exts_list = [
('fixwhich', '1.0.2', {
'checksums': ['c6a8f796a7eb60ffbc29f0d2af85461761a36c2864d25e445ff18bfbd1657078'],
}),
('bindeps', '1.2.1', { # extra
('bindeps', '1.2.1', {
'checksums': ['3c11d75aa722bed67246852bb430a182361a128910d384b664b91f3e65bc34b5'],
}),
('yell', '2.2.2', { # extra
'checksums': ['1d166f3cc3b6dc49a59778ea7156ed6d8de794c15106d48ffd6cbb061b9b26bc'],
}),
# ('yell', '2.0.7', { # extra # TODO latest required version possible
# 'checksums': ['2b6ed2f855cdab139d70b6b6dc58e34155c80e150d4a5f0da2d97e3d060d78d4'],
# }),
('bio', '1.6.0.pre.20181210', {
'checksums': ['c4114aeb99b012f90660b92ead4ca88c1578fd58252ed3ec46eb45dc4a2c6cc9'],
}),
Expand Down
72 changes: 33 additions & 39 deletions 224_Transrate/rubygem.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,58 +65,52 @@ def run(self):

self.ext_src = self.src
self.log.debug("Installing Ruby gem %s version %s." % (self.name, self.version))
self.extract_step()
self.configure_step()
self.install_step()

def extract_step(self):
"""Skip extraction of .gem files, which are installed as downloaded"""
if not self.is_extension:
if len(self.src) > 1:
raise EasyBuildError(f"Don't know how to handle Ruby gems with multiple sources. {str(self.src)} len {type(self.src)}")
if len(self.src) > 1:
raise EasyBuildError("Don't know how to handle Ruby gems with multiple sources.")
else:
src = self.src[0]
if src['path'].endswith('.gem'):
copy_file(src['path'], self.builddir)
self.ext_src = src['name']
# set final path since it can't be determined from unpacked sources (used for guessing start_dir)
src['finalpath'] = self.builddir
else:
src = self.src[0]
if src['path'].endswith('.gem'):
copy_file(src['path'], self.builddir)
self.ext_src = src['name']
# set final path since it can't be determined from unpacked sources (used for guessing start_dir)
src['finalpath'] = self.builddir
else:
# unpack zipped gems, use specified path to gem file
super(RubyGem, self).extract_step()
# unpack zipped gems, use specified path to gem file
super(RubyGem, self).extract_step()

def configure_step(self):
"""No separate configuration for Ruby Gems."""
pass

def build_step(self):
if not self.is_extension:
src = self.src[0]
if src['path'].endswith('.gem'):
pass
if self.cfg['gem_file']:
self.ext_src = os.path.join(src['finalpath'], self.cfg['gem_file'])
if not os.path.exists(self.ext_src):
raise EasyBuildError("Gem file not found at %s", self.ext_src)
src = self.src[0]
if self.cfg['gem_file']:
self.ext_src = os.path.join(src['finalpath'], self.cfg['gem_file'])
if not os.path.exists(self.ext_src):
raise EasyBuildError("Gem file not found at %s", self.ext_src)
else:
gemfile = "%s.gem" % self.name
gemfile_lower = "%s.gem" % self.name.lower()
if os.path.exists(gemfile):
self.ext_src = os.path.join(src['finalpath'], gemfile)
elif os.path.exists(gemfile_lower):
self.ext_src = os.path.join(src['finalpath'], gemfile_lower)
else:
gemfile = "%s.gem" % self.name
gemfile_lower = "%s.gem" % self.name.lower()
if os.path.exists(gemfile):
self.ext_src = os.path.join(src['finalpath'], gemfile)
elif os.path.exists(gemfile_lower):
self.ext_src = os.path.join(src['finalpath'], gemfile_lower)
gemspec = "%s.gemspec" % self.name
gemspec_lower = "%s.gemspec" % self.name.lower()
if os.path.exists(gemspec):
run_cmd("gem build %s -o %s.gem" % (gemspec, self.name))
self.ext_src = "%s.gem" % self.name
elif os.path.exists(gemspec_lower):
run_cmd("gem build %s -o %s.gem" % (gemspec_lower, self.name.lower()))
self.ext_src = "%s.gem" % self.name.lower()
else:
gemspec = "%s.gemspec" % self.name
gemspec_lower = "%s.gemspec" % self.name.lower()
if os.path.exists(gemspec):
run_cmd("gem build %s -o %s.gem" % (gemspec, self.name))
self.ext_src = "%s.gem" % self.name
elif os.path.exists(gemspec_lower):
run_cmd("gem build %s -o %s.gem" % (gemspec_lower, self.name.lower()))
self.ext_src = "%s.gem" % self.name.lower()
else:
raise EasyBuildError("No gem_file specified and no"
" %s.gemspec or %s.gemspec found." % (self.name, self.name.lower()))
raise EasyBuildError("No gem_file specified and no"
" %s.gemspec or %s.gemspec found." % (self.name, self.name.lower()))

def test_step(self):
"""No separate (standard) test procedure for Ruby Gems."""
Expand Down
30 changes: 30 additions & 0 deletions 224_Transrate/yell-2.2.2-GCC-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
easyblock = 'RubyGem'

name = 'yell'
version = '2.2.2'

homepage = 'https://github.com/rudionrails/yell'
description = """Yell - Your Extensible Logging Library is a comprehensive logging replacement for Ruby."""

toolchain = {'name': 'GCC', 'version': '12.3.0'}

source_urls = ['https://rubygems.org/downloads/']
sources = ['%(name)s-%(version)s.gem']
checksums = ['1d166f3cc3b6dc49a59778ea7156ed6d8de794c15106d48ffd6cbb061b9b26bc']

gem_file = '%(name)s-%(version)s.gem'

builddependencies = [
('binutils', '2.40'),
]

dependencies = [
('Ruby', '3.3.0'),
]

sanity_check_paths = {
'files': [],
'dirs': ['gems/%(namelower)s-%(version)s'],
}

moduleclass = 'lib'

0 comments on commit 37b9558

Please sign in to comment.