summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-03-21 11:48:20 +0000
committerJustin Lecher <jlec@gentoo.org>2012-03-21 11:48:20 +0000
commitc025d931db07837435d464d91451c4a129f9f99c (patch)
tree9cca3d2e8c4f0ccc18fc2102ade61575f943118b /sci-chemistry
parentInitital addition, written by me (diff)
downloadhistorical-c025d931db07837435d464d91451c4a129f9f99c.tar.gz
historical-c025d931db07837435d464d91451c4a129f9f99c.tar.bz2
historical-c025d931db07837435d464d91451c4a129f9f99c.zip
Added latest correction to through-space patch needed for global name 'excludeSimulated' is not defined
Package-Manager: portage-2.2.0_alpha93/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/aria/ChangeLog11
-rw-r--r--sci-chemistry/aria/aria-2.3.2-r3.ebuild94
-rw-r--r--sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch139
3 files changed, 242 insertions, 2 deletions
diff --git a/sci-chemistry/aria/ChangeLog b/sci-chemistry/aria/ChangeLog
index 040317c19665..da77675600b7 100644
--- a/sci-chemistry/aria/ChangeLog
+++ b/sci-chemistry/aria/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-chemistry/aria
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/aria/ChangeLog,v 1.11 2011/10/11 14:24:22 jlec Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/aria/ChangeLog,v 1.12 2012/03/21 11:48:20 jlec Exp $
+
+*aria-2.3.2-r3 (21 Mar 2012)
+
+ 21 Mar 2012; Justin Lecher <jlec@gentoo.org> +aria-2.3.2-r3.ebuild,
+ +files/aria-2.3.2-through-space-2.patch:
+ Added latest correction to through-space patch needed for global name
+ 'excludeSimulated' is not defined
*aria-2.3.2-r2 (11 Oct 2011)
diff --git a/sci-chemistry/aria/aria-2.3.2-r3.ebuild b/sci-chemistry/aria/aria-2.3.2-r3.ebuild
new file mode 100644
index 000000000000..0d417c1cdad7
--- /dev/null
+++ b/sci-chemistry/aria/aria-2.3.2-r3.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/aria/aria-2.3.2-r3.ebuild,v 1.1 2012/03/21 11:48:20 jlec Exp $
+
+EAPI=3
+
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="tk"
+
+inherit base eutils python versionator
+
+MY_P="${PN}$(get_version_component_range 1-2 ${PV})"
+
+DESCRIPTION="Automated NOE assignment and NMR structure calculation"
+HOMEPAGE="http://aria.pasteur.fr/"
+SRC_URI="http://aria.pasteur.fr/archives/${MY_P}.2.tar.gz"
+
+SLOT="0"
+LICENSE="cns"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples"
+
+RDEPEND="
+ sci-chemistry/clashlist
+ sci-chemistry/procheck
+ sci-libs/clashscore-db
+ dev-python/numpy
+ dev-python/matplotlib[tk]
+ >=sci-chemistry/cns-1.2.1-r7[aria,openmp]
+ >=dev-lang/tk-8.3
+ >=sci-chemistry/ccpn-2.0.5
+ >=dev-tcltk/tix-8.1.4"
+DEPEND="${RDEPEND}"
+
+RESTRICT="fetch"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_nofetch(){
+ einfo "Go to ${HOMEPAGE}, download ${A}"
+ einfo "and place it in ${DISTDIR}"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-python.patch \
+ "${FILESDIR}"/${P}-through-space-2.patch
+}
+
+src_test(){
+ export CCPNMR_TOP_DIR="${EPREFIX}"/$(python_get_sitedir)
+ export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+ $(PYTHON) check.py || die
+}
+
+src_install(){
+ insinto "$(python_get_sitedir)/${PN}"
+ doins -r src aria2.py || die "failed to install ${PN}"
+ insinto "$(python_get_sitedir)/${PN}"/cns
+ doins -r cns/{protocols,toppar,src/helplib} || die "failed to install cns part"
+
+ if use examples; then
+ insinto /usr/share/${P}/
+ doins -r examples || die
+ fi
+
+ # ENV
+ cat >> "${T}"/20aria <<- EOF
+ ARIA2="${EPREFIX}/$(python_get_sitedir)/${PN}"
+ EOF
+
+ doenvd "${T}"/20aria
+
+ # Launch Wrapper
+ cat >> "${T}"/aria <<- EOF
+ #!/bin/sh
+ export CCPNMR_TOP_DIR="${EPREFIX}/$(python_get_sitedir)"
+ export PYTHONPATH="${EPREFIX}/$(python_get_sitedir)/ccpn/python"
+ exec "$(PYTHON)" -O "\${ARIA2}"/aria2.py \$@
+ EOF
+
+ dobin "${T}"/aria || die "failed to install wrapper"
+ dosym aria /usr/bin/aria2
+
+ dodoc README || die
+}
+
+pkg_postinst() {
+ python_mod_optimize ${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${PN}
+}
diff --git a/sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch b/sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch
new file mode 100644
index 000000000000..6a363d098632
--- /dev/null
+++ b/sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch
@@ -0,0 +1,139 @@
+ src/py/aria/exportToCcpn.py | 24 +++++++++++-------------
+ src/py/aria/importFromCcpn.py | 32 ++++++++++++--------------------
+ 2 files changed, 23 insertions(+), 33 deletions(-)
+
+diff --git a/src/py/aria/exportToCcpn.py b/src/py/aria/exportToCcpn.py
+index c742a88..aae7b7d 100644
+--- a/src/py/aria/exportToCcpn.py
++++ b/src/py/aria/exportToCcpn.py
+@@ -1,5 +1,5 @@
+ from ccpnmr.analysis.core.ConstraintBasic import makeNmrConstraintStore, makeStructureGeneration, getFixedResonance
+-from ccpnmr.analysis.core.ExperimentBasic import getOnebondDataDims
++from ccpnmr.analysis.core.ExperimentBasic import getOnebondDataDims, getThroughSpaceDataDims
+ from ccpnmr.analysis.core.AssignmentBasic import assignAtomsToRes, assignResToDim
+ from ccpnmr.analysis.core.PeakBasic import pickPeak, setManualPeakIntensity
+ from ccpnmr.analysis.core.MoleculeBasic import DEFAULT_ISOTOPES
+@@ -791,12 +791,13 @@ def getPeakAssignmentsFromAria2(project, ariaRestraints, namesDict=None,
+ ariaDims = ariaDimDict.get(spectrum)
+ if not ariaDims:
+ ariaDims = [] #[0,1,2]
++ throughSpaceDataDims = getThroughSpaceDataDims(spectrum)
+
+ dataDims = spectrum.sortedDataDims()
+ if len(dataDims) == 3:
+ for dataDim in dataDims:
+ expDimRef = dataDim.findFirstDataDimRef().expDimRef
+- if '1H' in expDimRef.isotopeCodes: # 0 or 2
++ if dataDim in throughSpaceDataDims: # 0 or 2
+ if onebondDims.get(dataDim.dim):
+ if ppmX1 is None:
+ ariaDims.append(2)
+@@ -816,21 +817,18 @@ def getPeakAssignmentsFromAria2(project, ariaRestraints, namesDict=None,
+ ariaDims.append(1)
+
+ else:
+- transfer = spectrum.experiment.findFirstExpTransfer(transferType='through-space') or \
+- spectrum.experiment.findFirstExpTransfer(transferType='NOESY')
+
++ i = 0
+ for dataDim in dataDims:
+- expDimRefs = [dataDimRef.expDimRef for dataDimRef in dataDim.dataDimRefs]
+- i = 0
+- for expDimRef in transfer.sortedExpDimRefs():
+- if expDimRef in expDimRefs:
+- ariaDims.append(i)
+- boundDim = onebondDims.get(dataDim.dim)
+- if boundDim:
+- ariaDims.append(i+1)
+-
++ if dataDim in throughSpaceDataDims:
++ ariaDims.append(i)
++ boundDim = onebondDims.get(dataDim.dim)
++ if boundDim:
++ ariaDims.append(i+1)
++
+ i += 2
+
++
+ ariaDimDict[spectrum] = ariaDims
+
+ if namesDict:
+diff --git a/src/py/aria/importFromCcpn.py b/src/py/aria/importFromCcpn.py
+index a65ae3e..f63ba16 100644
+--- a/src/py/aria/importFromCcpn.py
++++ b/src/py/aria/importFromCcpn.py
+@@ -165,7 +165,7 @@ def getStructureEnsembles(project, ccpChains):
+
+ return ensembles
+
+-def getNoesyPeakLists(project, molSystem=None):
++def getNoesyPeakLists(project, molSystem=None, excludeSimulated=True):
+ """Descrn: Get the NOE peak lists from a CCPN project. Can filter if appropriate to a given
+ molecular system if passed in.
+ Inputs: Implementation.Project, ccp.molecule.MolSystem.MolSystem
+@@ -196,19 +196,10 @@ def getNoesyPeakLists(project, molSystem=None):
+
+ for spectrum in experiment.dataSources:
+ if (spectrum.dataType == 'processed') and (spectrum.numDim > 1):
+-
+- isotopes = []
+- for dataDim in spectrum.dataDims:
+- for expDimRef in dataDim.expDim.expDimRefs:
+- if expDimRef.measurementType in ('shift','Shift'):
+- isotope = ','.join(expDimRef.isotopeCodes)
+- isotopes.append(isotope)
+- break
+-
+- if isotopes.count('1H') > 1:
+- for peakList in spectrum.peakLists:
+- if peakList.findFirstPeak():
+- peakLists.append(peakList)
++ for peakList in spectrum.sortedPeakLists():
++ if excludeSimulated and peakList.isSimulated:
++ continue
++ peakLists.append(peakList)
+
+
+ return peakLists
+@@ -490,7 +481,10 @@ def makeAriaChain(ccpChain):
+ # Does below work for DNA/RNA?
+
+ aria_settings = ChainSettings()
+- aria_settings['type'] = chainTypeMapping[ccpChain.molecule.molType]
++ # wb104: below changed 31 Oct 2011 to try and get around case when molType is None
++ #aria_settings['type'] = chainTypeMapping[ccpChain.molecule.molType]
++ molType = ccpChain.molecule.molType or 'protein'
++ aria_settings['type'] = chainTypeMapping[molType]
+
+ aria_chain = Chain(settings=aria_settings, segid=string_to_segid(ccpChain.code))
+
+@@ -952,8 +946,6 @@ def makeAriaSpectrum(peakList, ariaMolecule, filterRejected=True):
+ expDimRefDict = {}
+
+ for expDimRef in transfer.sortedExpDimRefs():
+- if expDimRef.isotopeCodes != ('1H',):
+- raise Exception('Not an H-H experiment')
+
+ onebondTransfer = expDimRef.findFirstExpTransfer(transferType='onebond')
+
+@@ -1095,7 +1087,7 @@ def getAriaAtomsFromResonance(resonance, ariaMolecule, cache={}):
+
+ # TJS modify to return just a list of atoms, rather than a list of list
+ ariaAtoms = []
+- for atom in atomSet.sortedAtoms():
++ for atom in atomSet.atoms:
+ ariaAtom = ariaResidue.atoms.get(atom.name)
+ if not ariaAtom:
+ messager.warning('Could not find ARIA Atom for CCPN atom %d%s %s' % (residue.seqCode,residue.ccpCode, atom.name))
+@@ -1256,9 +1248,9 @@ def getAriaDistanceRestraintsList(constraint_list, constraint_type, aria_mol):
+ restraint.setWeight(weight)
+
+
+- for constrItem in distConstr.sortedItems():
++ for constrItem in distConstr.items:
+
+- reso1, reso2 = constrItem.sortedResonances()
++ reso1, reso2 = constrItem.resonances
+
+ # TJS fix for mapping prochirals
+ # always use real resonnances where possible