aboutsummaryrefslogtreecommitdiff
blob: d5fb4545e395f73b572174a290cf0cc455a000c3 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

PERL_EXPORT_PHASE_FUNCTIONS=no
inherit perl-module

DESCRIPTION="Detect sequencing project contaminants by mapping reads to taxonomic groups"
HOMEPAGE="http://ccb.jhu.edu/software/kraken
	http://genomebiology.com/2014/15/3/R46"
SRC_URI="http://ccb.jhu.edu/software/kraken/dl/kraken-0.10.5-beta.tgz
	http://ccb.jhu.edu/software/kraken/MANUAL.html"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}
	dev-lang/perl
	net-misc/wget"

S="${WORKDIR}"/kraken-0.10.5-beta

src_prepare(){
	sed -e 's/^CXX = /CXX ?= /' -e 's/^CXXFLAGS = /CXXFLAGS ?= /' -i src/Makefile || die
	echo "exit 0" >> install_kraken.sh || die
}

src_compile(){
	./install_kraken.sh destdir || die
}

src_install(){
	dohtml "${DISTDIR}"/MANUAL.html
	perl_set_version
	insinto ${VENDOR_LIB}/${PN}
	doins destdir/*.pm
	insinto /usr/share/${PN}/util
	doins destdir/*.pl
	chmod -R a+rx "${D}"/"${EPREFIX}"/usr/share/${PN}/util
	rm -f destdir/krakenlib.pm
	dobin destdir/*
}

pkg_postinst(){
	ewarn "Kraken may optionally need <=sci-biology/jellyfish-2 if you want to build your own dbs"
	ewarn "Kraken needs high network bandwidth for its huge downloads, be sure to read"
	ewarn "http://ccb.jhu.edu/software/kraken and prepare at least 160GB of disk space"
	ewarn "Consider placing the db files in ramfs (needs root permissions) taking >75GB RAM"
	ewarn "Results can be visualized with http://sourceforge.net/p/krona/home/krona"
}