blob: c9181641f3039b1297f14e7b289acd118e4481b5 (
plain)
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
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit perl-functions
DESCRIPTION="Extract ORF/CDS regions from FASTA sequences"
HOMEPAGE="https://github.com/TransDecoder/TransDecoder/wiki"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/TransDecoder/TransDecoder.git"
else
SRC_URI="https://github.com/TransDecoder/TransDecoder/archive/TransDecoder-v${PV}.tar.gz"
KEYWORDS="~amd64"
S="${WORKDIR}/${PN}-${PN}-v${PV}"
fi
LICENSE="BSD-BroadInstitute"
SLOT="0"
RESTRICT="test"
DEPEND="dev-lang/perl:="
RDEPEND="${DEPEND}
sci-biology/cd-hit
sci-biology/parafly
sci-biology/ffindex"
src_prepare() {
rm -rf transdecoder_plugins/cd-hit || die
local f p
for f in PerlLib/*.pm; do
p=$(basename $f .pm)
sed -e "s#use $p;#use TransDecoder::$p;#" \
-i PerlLib/*.pm util/*.pl TransDecoder.LongOrfs TransDecoder.Predict || die
done
eapply "${FILESDIR}"/pfam_runner.pl.patch
eapply_user
}
src_compile() {
einfo "Skipping compilation of bundled cd-hit code, nothing else to do"
}
# avoid fetching 1.5TB "${S}"/pfam/Pfam-AB.hmm.bin, see
# "Re: [Transdecoder-users] Announcement: Transdecoder release r20140704"
# thread in archives. You can get it from
# http://downloads.sourceforge.net/project/transdecoder/Pfam-AB.hmm.bin
src_install() {
dobin TransDecoder.Predict TransDecoder.LongOrfs
insinto /usr/share/${PN}/util
doins util/*.pl
chmod -R a+rx "${ED}"/usr/share/${PN}/util || die
# zap the bundled cdhit binaries copied from transdecoder_plugins/cdhit/ to util/bin
rm -rf util/bin || die
perl_domodule -C ${PN} PerlLib/*.pm
# dodoc Release.Notes
einfo "Fetch your own Pfam-A.hmm (Pfam-AB.hmm is discontinued since 05/2015):"
einfo "wget --mirror -nH -nd ftp://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam-A.hmm.gz"
einfo "hmmpress Pfam-A.hmm.bin"
}
pkg_postinst() {
einfo "It is recommended to use TransDecoder with sci-biology/hmmer-3 or"
einfo "at least with NCBI blast from either:"
einfo " sci-biology/ncbi-blast+ (released more often) or from"
einfo " sci-biology/ncbi-toolkit++ (a huge bundle with releases and less frequent bugfixes)"
}
|