-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbsmap-2.87.0p1.spec
executable file
·105 lines (90 loc) · 3.19 KB
/
bsmap-2.87.0p1.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Summary: BSMAP for Methylation
Name: bsmap
Version: 2.87.0p1
Release: 1
License: GPL
Vendor: Brown University
Group: Applications/Life Sciences
Source: bsmap-%{version}.tar.gz
Packager: TACC - [email protected]
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
#------------------------------------------------
# BASIC DEFINITIONS
#------------------------------------------------
# This will define the correct _topdir and turn of building a debug package
%include ../rpm-dir.inc
%include ../system-defines.inc
# Compiler Family Definitions
# %include compiler-defines.inc
# MPI Family Definitions
# %include mpi-defines.inc
# Other defs
%define APPS /opt/apps
%define MODULES modulefiles
%define INSTALL_DIR %{APPS}/%{name}/%{version}
%define MODULE_DIR %{APPS}/%{MODULES}/%{name}
%define PNAME %{name}
%define MODULE_VAR TACC_BSMAP
%description
BSMAP is a short reads mapping program for bisulfite sequencing in DNA methylation study. Bisulfite treatment coupled with next generation sequencing could estimate the methylation ratio of every single Cytosine location in the genome by mapping high throughput bisulfite reads to the reference sequences.
## PREP
%prep
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf ${RPM_BUILD_ROOT}
%setup -n %{PNAME}-%{version}
%build
%include ../system-load.inc
module load samtools
module load intel
make CC=icc
%install
mkdir -p $RPM_BUILD_ROOT/%{INSTALL_DIR}
make BIN=$RPM_BUILD_ROOT/%{INSTALL_DIR} CC=icc install
##################################################
# Module Section
##################################################
# ADD ALL MODULE STUFF HERE
rm -rf $RPM_BUILD_ROOT/%{MODULE_DIR}
mkdir -p $RPM_BUILD_ROOT/%{MODULE_DIR}
cat > $RPM_BUILD_ROOT/%{MODULE_DIR}/%{version}.lua << 'EOF'
help (
[[
Documentation for %{PNAME} is available online at the publisher website: https://code.google.com/p/bsmap/
In this version, methratio.py has been patched better memory usage.
For convenience %{MODULE_VAR}_DIR points to the installation directory.
PATH has been updated to include %{PNAME}.
Version %{version}
]])
whatis("Name: ${PNAME}")
whatis("Version: %{version}")
whatis("Category: computational biology, genomics, methylation, aligner")
whatis("Keywords: Biology, Genomics, Mapping")
whatis("Description: BSMAP - short reads mapping software for bisulfite sequencing reads")
whatis("URL: https://code.google.com/p/bsmap/")
setenv("%{MODULE_VAR}_DIR","%{INSTALL_DIR}/")
prepend_path("PATH" ,"%{INSTALL_DIR}/")
prereq("samtools","python")
EOF
#--------------
# Version file.
#--------------
cat > $RPM_BUILD_ROOT%{MODULE_DIR}/.version.%{version} << 'EOF'
#%Module3.1.1#################################################
##
## version file for %{PNAME}-%{version}
##
set ModulesVersion "%{version}"
EOF
#------------------------------------------------
# FILES SECTION
#------------------------------------------------
%files
# Define files permisions, user and group
%defattr(755,root,root,-)
%{INSTALL_DIR}
%{MODULE_DIR}
#------------------------------------------------
# CLEAN UP SECTION
#------------------------------------------------
%post
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf ${RPM_BUILD_ROOT}