# Generated from pets-0.2.3.gem by gem2rpm -*- rpm-spec -*-
%global gem_name pets

Name: rubygem-%{gem_name}
Version: 0.2.3
Release: 1%{?dist}
Summary: Suite with predictive tools
License: MIT
URL: https://bitbucket.org/elenarojano/reg2phen/src/master/bin/reg2phen.rb
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# BuildRequires: rubygem(rspec) >= 3.10.0
# BuildRequires: rubygem(rspec) < 3.11
BuildArch: noarch

%description
PETS suite includes three different tools. CohortAnalyzer performs the
calculation of several statistics that gives an overview of a cohort of
patients to analyse. Reg2Phen uses associations between pathological
phenotypes and regions of the genome (these associations can be calculated
from the cohort of patients if they include genotypic & phenotypic information
using NetAnalyzer, another Ruby gem) to find, for a given genomic region,
which pathological phenotypes have been associated with that region. The third
tool, Phen2Reg, is a predictor that using the same associations as Reg2Phen,
predicts which genomic regions can be the cause of a list of pathological
phenotypes observed in a patient.


%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{gem_name}-%{version}

%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec

# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install

%install
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
        %{buildroot}%{gem_dir}/


mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
        %{buildroot}%{_bindir}/

find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

%check
pushd .%{gem_instdir}
# rspec spec
popd

%files
%dir %{gem_instdir}
%{_bindir}/area_under_curve_pr.rb
%{_bindir}/association_metrics_average.rb
%{_bindir}/coPatReporter.rb
%{_bindir}/comPatMondo.rb
%{_bindir}/console
%{_bindir}/evidence_profiler.rb
%{_bindir}/fmeasure_index.rb
%{_bindir}/generate_HPO_IC_table.rb
%{_bindir}/get_PR_values.rb
%{_bindir}/get_network_nodes.rb
%{_bindir}/get_sorted_profs.rb
%{_bindir}/merge_by_cluster.rb
%{_bindir}/merge_pairs.rb
%{_bindir}/paco_translator.rb
%{_bindir}/phen2reg.rb
%{_bindir}/phen2reg_predictor_check.rb
%{_bindir}/profile_cleaner.rb
%{_bindir}/reg2phen.rb
%{_bindir}/region_to_patients_generator.rb
%{_bindir}/relate_CI_to_association_value.rb
%{_bindir}/setup
%exclude %{gem_instdir}/.gitignore
%exclude %{gem_instdir}/.travis.yml
%license %{gem_instdir}/LICENSE.txt
%{gem_instdir}/bin
%{gem_instdir}/external_code
%{gem_instdir}/external_data
%{gem_libdir}
%{gem_instdir}/templates
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%exclude %{gem_instdir}/.rspec
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/pets.gemspec

%changelog
* Tue Sep 14 2021 mockbuilder - 0.2.3-1
- Initial package