-
Notifications
You must be signed in to change notification settings - Fork 16
/
README
106 lines (71 loc) · 4.39 KB
/
README
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
106
This is a Perl interface to the HTS Library. See http://htslib.org
Bio::DB::HTS supports a wide range of install configurations, with two scripts - Build.PL and INSTALL.pl.
For a list of the ways it can be used, with examples in action see
https://github.com/Ensembl/Bio-DB-HTS/blob/main/scripts/build_options.sh
(link to scripts/build_options.sh in the Bio::DB::HTS GitHub repo at https://github.com/Ensembl/Bio-DB-HTS)
## ONE-STEP INSTALLATION (INSTALL.pl)
In the root directory of this distribution you will find the script INSTALL.pl. Running this will download the latest released version of this module (from CPAN) and HTSlib (from GitHub) into a temporary directory, compile them, test and install Bio::DB::HTS. If you wish to install a version of Bio::DB::HTS downloaded (and possibly edited) from GitHub please use Build.PL as documented in the Multi-Step Installations section below.
Simply run:
```
perl INSTALL.pl
```
It will not install HTSlib at the system level - if desired this can be accomplished by changing into the downloaded htslib sub-directory and typing
```
#These commands may need sudo...
#make and install the program
make install
#refresh the installed library listed
ldconfig
```
When invoked, Bio::DB::HTS will try to use HTSlib from its downloaded location. If this is removed it requires htslib to be installed on the system, or LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on Mac OSX) should contain the directory containing libhts.so.
Alternatively
```
perl INSTALL.pl --static
```
will install a version of Bio::DB::HTS. Be aware that this option depends on your system supporting it, and upgrades to HTSlib will require a rebuild of Bio::DB::HTS.
## MULTI-STEP INSTALLATIONS (Build.PL)
You may require a more custom install e.g. a specific or customised version of HTSlib, HTSlib installed in a specific directory, or statically included, or Bio::DB::HTS installed in a specific location. Typically these will involve downloading, compiling and installing HTSlib first, followed by downloading compiling and installing Bio::DB:HTS.
You can see various examples of installing HTSlib and then Bio::DB::HTS using Build.PL by examining scripts/build_options.sh
### TROUBLESHOOTING
If you encounter problems during compiling, you may need to edit
Build.PL so that extra_compiler_flags matches the CFLAGS and DFLAGS
settings in the HTSlib Makefile. Here are some common problems:
1. When building this module, you get an error like the following:
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
To fix this, edit the Makefile in the Samtools distribution by adding
"-fPIC" to the CFLAGS line. While you're at it, you may also wish to
get rid of a bunch of unused variable warnings that appears under
recent versions of gcc. The modified CFLAGS will look like this
CFLAGS= -g -Wall -Wno-unused -Wno-unused-result -O2 -fPIC #-m64 #-arch ppc
Then do "make clean; make" in the Samtools directory to recompile the
library. After this you should be able to build this module without
errors.
2. When building this module, you get an error about a missing math
library.
To fix this, follow the recipe in (1) except add -m64 to CFLAGS so it
looks like this:
CFLAGS= -g -Wall -O2 -fPIC #-m64 #-arch ppc
3. Remote file access over https is possible using libcurl when compiling HTSlib
autoconf
./configure --enable-libcurl
4. "Failed to populate reference for id X" error message
This is probably an indication that the CRAM Reference archive is unavailable.
## TESTING AND CONTRIBUTING
You can obtain the most recent development version of this module via
its GitHub site at https://github.com/Ensembl/Bio-DB-HTS. Please
feel free to submit bug reports, patches, etc. via GitHub.
### AUTHOR
Rishi Nag <rishi@ebi.ac.uk>
based on Bio::DB::Sam by Lincoln Stein
### COPYRIGHT
Copyright [2015-2023] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.