summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-chemistry/aria
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-chemistry/aria')
-rw-r--r--sci-chemistry/aria/Manifest1
-rw-r--r--sci-chemistry/aria/aria-2.3.2_p20130826.ebuild89
-rw-r--r--sci-chemistry/aria/files/aria-2.3.2-python.patch30
-rw-r--r--sci-chemistry/aria/files/aria-2.3.2-through-space-2.patch139
-rw-r--r--sci-chemistry/aria/files/aria-2.3.2-through-space.patch118
-rw-r--r--sci-chemistry/aria/metadata.xml8
6 files changed, 385 insertions, 0 deletions
diff --git a/sci-chemistry/aria/Manifest b/sci-chemistry/aria/Manifest
new file mode 100644
index 000000000000..28b40aa5c0c8
--- /dev/null
+++ b/sci-chemistry/aria/Manifest
@@ -0,0 +1 @@
+DIST aria2.3.2_08.26.2013.tar.gz 1878602 SHA256 b9b892de2070a77812733faf4b6a1dbec4bba6dec80e5630088cab8b11cbfaf0 SHA512 a6d8c45218f5d494174587a5f8f1feec940ac8cc4cd7b707dac65b2378219ecf27967e70807e6cb7ae22a7d4aec7239af763f077ad7183c078b1991cac71bc3e WHIRLPOOL 59c0b79fab40201d903c484bf63e8339c235207306efc848965d260c02b00c9a408297df0f211cf45f30d13ec35175bf7d566bb5c6d59b944eb22d9aacf0384d
diff --git a/sci-chemistry/aria/aria-2.3.2_p20130826.ebuild b/sci-chemistry/aria/aria-2.3.2_p20130826.ebuild
new file mode 100644
index 000000000000..7c4026fb1070
--- /dev/null
+++ b/sci-chemistry/aria/aria-2.3.2_p20130826.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk"
+
+inherit eutils python-single-r1 versionator
+
+MY_P="${PN}$(get_version_component_range 1-2 ${PV})"
+DATE="08.26.2013"
+
+DESCRIPTION="Automated NOE assignment and NMR structure calculation"
+HOMEPAGE="http://aria.pasteur.fr/"
+SRC_URI="http://aria.pasteur.fr/archives/${MY_P}.2_${DATE}.tar.gz"
+
+SLOT="0"
+LICENSE="cns"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-tcltk/tix
+ dev-lang/tk
+ >=dev-python/numpy-1.1[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP},tk]
+ >=sci-chemistry/cns-1.2.1-r7[aria,openmp]
+ >=sci-chemistry/ccpn-2.2[${PYTHON_USEDEP}]
+ sci-chemistry/clashlist
+ sci-chemistry/procheck
+ sci-libs/clashscore-db"
+DEPEND="${RDEPEND}"
+
+RESTRICT="fetch"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_nofetch(){
+ einfo "Go to http://aria.pasteur.fr/archives/aria2.3.2.tar.gz/view, download ${A}"
+ einfo "and place it in ${DISTDIR}"
+}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_test(){
+ export CCPNMR_TOP_DIR=$(python_get_sitedir)
+ export PYTHONPATH=.:${CCPNMR_TOP_DIR}/ccpn/python
+ ${PYTHON} check.py || die
+}
+
+src_install(){
+ python_moduleinto ${PN}
+ python_domodule src aria2.py
+ python_moduleinto ${PN}/cns
+ python_domodule cns/{protocols,toppar,src/helplib}
+
+ if use examples; then
+ insinto /usr/share/${P}/
+ doins -r examples
+ fi
+
+ # ENV
+ cat >> "${T}"/20aria <<- EOF
+ ARIA2="$(python_get_sitedir)/${PN}"
+ EOF
+
+ doenvd "${T}"/20aria
+
+ # Launch Wrapper
+ cat >> "${T}"/aria <<- EOF
+ #!/bin/sh
+ export CCPNMR_TOP_DIR="$(python_get_sitedir)"
+ export PYTHONPATH="$(python_get_sitedir)/ccpn/python"
+ exec "${PYTHON}" -O "\${ARIA2}"/aria2.py \$@
+ EOF
+
+ dobin "${T}"/aria
+ dosym aria /usr/bin/aria2
+
+ dodoc README
+ python_optimize "${D}/$(python_get_sitedir)"
+}
diff --git a/sci-chemistry/aria/files/aria-2.3.2-python.patch b/sci-chemistry/aria/files/aria-2.3.2-python.patch
new file mode 100644
index 000000000000..1f9ae1fcc5f6
--- /dev/null
+++ b/sci-chemistry/aria/files/aria-2.3.2-python.patch
@@ -0,0 +1,30 @@
+ src/py/aria/legacy/QualityChecks/Descriptive.py | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/py/aria/legacy/QualityChecks/Descriptive.py b/src/py/aria/legacy/QualityChecks/Descriptive.py
+index ae5913c..550d20c 100644
+--- a/src/py/aria/legacy/QualityChecks/Descriptive.py
++++ b/src/py/aria/legacy/QualityChecks/Descriptive.py
+@@ -1,3 +1,6 @@
++from math import *
++from numpy import *
++
+ class Descriptive:
+ """
+ some basic statistics
+@@ -55,7 +58,6 @@ class Descriptive:
+
+ def getStdDev(self):
+ if( len(self.myData) == 0): return None
+- from math import *
+ if( (self.count - 1) > 0 ):
+ return sqrt( self.pseudoVariance/ (self.count - 1))
+ else:
+@@ -89,7 +91,6 @@ class Descriptive:
+ def getMedian(self):
+ if( len(self.myData) == 0): return None
+ if( self.median == None ):
+- from numpy import *
+ sort(self.myData)
+ if( self.count%2 == 1):
+ self.median = self.myData[(self.count-1)/2]
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
diff --git a/sci-chemistry/aria/files/aria-2.3.2-through-space.patch b/sci-chemistry/aria/files/aria-2.3.2-through-space.patch
new file mode 100644
index 000000000000..bda76aa11c80
--- /dev/null
+++ b/sci-chemistry/aria/files/aria-2.3.2-through-space.patch
@@ -0,0 +1,118 @@
+ src/py/aria/exportToCcpn.py | 24 +++++++++++-------------
+ src/py/aria/importFromCcpn.py | 25 +++++++------------------
+ 2 files changed, 18 insertions(+), 31 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..91ad123 100644
+--- a/src/py/aria/importFromCcpn.py
++++ b/src/py/aria/importFromCcpn.py
+@@ -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
+@@ -952,8 +943,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 +1084,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 +1245,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
diff --git a/sci-chemistry/aria/metadata.xml b/sci-chemistry/aria/metadata.xml
new file mode 100644
index 000000000000..ae9ec7c5f6a4
--- /dev/null
+++ b/sci-chemistry/aria/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>