aboutsummaryrefslogtreecommitdiff
blob: 1078c0c1f79f4b571edd0838b26f0fd2a7c2d9de (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-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit eutils toolchain-funcs

DESCRIPTION="Trimpoly and mdust for trimming and validation of ESTs/DNA sequences"
HOMEPAGE="http://compbio.dfci.harvard.edu/tgi/software/"
for i in seqcl_scripts mdust trimpoly; do
	SRC_URI="${SRC_URI} ftp://occams.dfci.harvard.edu/pub/bio/tgi/software/seqclean/${i}.tar.gz -> ${i}-${PV}.tar.gz"
done

LICENSE="Artistic"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
	dev-lang/perl
	sci-biology/ncbi-tools"
RDEPEND="${DEPEND}"

S=${WORKDIR}

src_prepare() {
	# disable the necessity to install Mailer.pm with this tool
	einfo "Disabling mailer feature within seqclean"
	sed -i 's/use Mailer;/#use Mailer;/' "${S}"/"${PN}"/"${PN}" || die

	epatch "${FILESDIR}"/${P}-build.patch

	tc-export CC CXX
}

src_compile() {
	for i in mdust trimpoly; do
		LDLFAGS="${LDFLAGS}" \
			emake -C "${S}"/${i}
	done
}

src_install() {
	dobin seqclean/{seqclean,cln2qual,bin/seqclean.psx}
	newdoc seqclean/README README.seqclean
	for i in mdust trimpoly; do
		dobin ${i}/${i}
	done

	einfo "Optionally, you might want to download UniVec from NCBI if you do not have your own"
	einfo "fasta file with vector sequences you want to remove from sequencing"
	einfo "reads. See http://www.ncbi.nlm.nih.gov/VecScreen/UniVec.html"
}