Skip to content
Commits on Source (7)
......@@ -8,7 +8,11 @@ bdist:
python setup.py bdist --formats=egg
install:
python setup.py install
@which pip > /dev/null
@pip freeze|grep 'pbcore=='>/dev/null \
&& pip uninstall -y pbcore \
|| echo -n ''
@pip install ./
pylint:
pylint --errors-only pbcore/
......@@ -59,3 +63,8 @@ pip-install:
publish-to-pypi:
@echo "I'm not going to do this for you, but you can do it by:"
@echo " % python setup.py sdist upload -r pypi"
xsd-codegen:
rm -f pbcore/io/dataset/pyxb/DataSetXsd.py
./bin/updateXSDs.py ../xsd-datamodels/PacBioDatasets.xsd pbcore/io/dataset/pyxb/
......@@ -2,17 +2,17 @@
type module >& /dev/null || . /mnt/software/Modules/current/init/bash
set -ex
NX3PBASEURL=http://nexus/repository/unsupported/pitchfork/gcc-4.9.2
NX3PBASEURL=http://nexus/repository/unsupported/pitchfork/gcc-6.4.0
export PATH=$PWD/build/bin:/mnt/software/a/anaconda2/4.2.0/bin:$PATH
export PYTHONUSERBASE=$PWD/build
export CFLAGS="-I/mnt/software/a/anaconda2/4.2.0/include"
PIP="pip --cache-dir=$bamboo_build_working_directory/.pip"
module load gcc/4.9.2
module load gcc
rm -rf build
mkdir -p build/bin build/lib build/include build/share
$PIP install --user \
$NX3PBASEURL/pythonpkgs/pysam-0.9.1.4-cp27-cp27mu-linux_x86_64.whl
$NX3PBASEURL/pythonpkgs/pysam-0.13-cp27-cp27mu-linux_x86_64.whl
$PIP install --user -r requirements.txt
$PIP install --user -r requirements-dev.txt
$PIP install --user -e ./
......
#!/usr/bin/env python
from __future__ import print_function
import argparse
import tempfile
import shutil
......@@ -10,7 +11,7 @@ import shlex
def get_files(xsd_dir):
print "Searching ", xsd_dir
print("Searching ", xsd_dir)
files = []
for path, subdirs, fns in os.walk(xsd_dir):
for fn in fns:
......@@ -22,16 +23,16 @@ def copy_xsds(xsd, dest):
"""Go ahead and copy all xsds, there will likely be many dependencies. If
not, xsds are small"""
files = get_files(os.path.dirname(xsd))
print "Copying:"
print("Copying:")
for f in files:
print f
print(f)
for fn in files:
shutil.copy(fn, dest)
def generate_pyxb(xsd, outdir, modname):
cmd = "pyxbgen -u {x} -m {m} --binding-root {p}".format(x=xsd, m=modname,
p=outdir)
print cmd
print(cmd)
subprocess.call(shlex.split(cmd))
if __name__ == "__main__":
......@@ -47,4 +48,4 @@ if __name__ == "__main__":
xsd_name = os.path.basename(args.xsd)
generate_pyxb(os.path.join(tempd, xsd_name), args.outdir, args.mod_name)
shutil.rmtree(tempd)
print("please view commit b7ef4238b63 for additional diffs required for python3 support")
python-pbcore (1.4.2+dfsg-1) UNRELEASED; urgency=medium
python-pbcore (1.5.0+git20180606.43fcd9d+dfsg-1) UNRELEASED; urgency=medium
[ Afif Elghraoui ]
* New upstream version (git f3bcf3a)
......@@ -7,10 +7,10 @@ python-pbcore (1.4.2+dfsg-1) UNRELEASED; urgency=medium
* d/control: use build profile declarations
[ Andreas Tille ]
* Adapt to numpy 1.14 (thanks to Graham Inggs for cherry-picking from
upstream)
* New upstream version
Closes: #900485
* Relax test constraint which is rather a rounding issue
* d/watch: mode=git
-- Afif Elghraoui <afif@debian.org> Sun, 07 Jan 2018 02:03:14 -0500
......
......@@ -5,17 +5,17 @@ Description: Modify setuptools configuration to use nosetests
Author: Afif Elghraoui <afif@ghraoui.name>
Forwarded: not-needed
Last-Update: 2015-08-06
--- python-pbcore.orig/setup.cfg
+++ python-pbcore/setup.cfg
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,5 @@
[metadata]
description-file = README.md
+[nosetests]
+verbosity=2
+where=tests
--- python-pbcore.orig/setup.py
+++ python-pbcore/setup.py
@@ -50,6 +50,7 @@
--- a/setup.py
+++ b/setup.py
@@ -48,6 +48,7 @@ setup(
'data/datasets/yieldtest/*.*']
},
zip_safe = False,
......
......@@ -6,10 +6,10 @@ Description: Ignore hard-coded pyxb version check
Author: Afif Elghraoui <afif@debian.org>
Forwarded: not-needed
Last-Update: 2016-10-09
--- python-pbcore.orig/pbcore/io/dataset/pyxb/DataSetXsd.py
+++ python-pbcore/pbcore/io/dataset/pyxb/DataSetXsd.py
@@ -18,10 +18,10 @@
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:7fa6c9c0-a3d6-11e7-96cb-0026b9fe0a90')
--- a/pbcore/io/dataset/pyxb/DataSetXsd.py
+++ b/pbcore/io/dataset/pyxb/DataSetXsd.py
@@ -18,10 +18,10 @@ import pyxb.utils.six as _six
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:4c2de410-68d0-11e8-b8c4-1803730e031b')
# Version of PyXB used to generate the bindings
-_PyXBVersion = '1.2.4'
......@@ -22,10 +22,10 @@ Last-Update: 2016-10-09
# Import bindings for namespaces imported into schema
import _pbbase as _ImportedBinding__pbbase
--- python-pbcore.orig/pbcore/io/dataset/pyxb/_pbbase.py
+++ python-pbcore/pbcore/io/dataset/pyxb/_pbbase.py
@@ -18,10 +18,10 @@
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:7fa6c9c0-a3d6-11e7-96cb-0026b9fe0a90')
--- a/pbcore/io/dataset/pyxb/_pbbase.py
+++ b/pbcore/io/dataset/pyxb/_pbbase.py
@@ -18,10 +18,10 @@ import pyxb.utils.six as _six
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:4c2de410-68d0-11e8-b8c4-1803730e031b')
# Version of PyXB used to generate the bindings
-_PyXBVersion = '1.2.4'
......@@ -38,10 +38,10 @@ Last-Update: 2016-10-09
# Import bindings for namespaces imported into schema
import pyxb.binding.datatypes
--- python-pbcore.orig/pbcore/io/dataset/pyxb/_pbmeta.py
+++ python-pbcore/pbcore/io/dataset/pyxb/_pbmeta.py
@@ -18,10 +18,10 @@
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:7fa6c9c0-a3d6-11e7-96cb-0026b9fe0a90')
--- a/pbcore/io/dataset/pyxb/_pbmeta.py
+++ b/pbcore/io/dataset/pyxb/_pbmeta.py
@@ -18,10 +18,10 @@ import pyxb.utils.six as _six
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:4c2de410-68d0-11e8-b8c4-1803730e031b')
# Version of PyXB used to generate the bindings
-_PyXBVersion = '1.2.4'
......@@ -53,11 +53,11 @@ Last-Update: 2016-10-09
+# raise pyxb.PyXBVersionError(_PyXBVersion)
# Import bindings for namespaces imported into schema
import _pbrk as _ImportedBinding__pbrk
--- python-pbcore.orig/pbcore/io/dataset/pyxb/_pbrk.py
+++ python-pbcore/pbcore/io/dataset/pyxb/_pbrk.py
@@ -18,10 +18,10 @@
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:7fa6c9c0-a3d6-11e7-96cb-0026b9fe0a90')
import _pbbase as _ImportedBinding__pbbase
--- a/pbcore/io/dataset/pyxb/_pbrk.py
+++ b/pbcore/io/dataset/pyxb/_pbrk.py
@@ -18,10 +18,10 @@ import pyxb.utils.six as _six
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:4c2de410-68d0-11e8-b8c4-1803730e031b')
# Version of PyXB used to generate the bindings
-_PyXBVersion = '1.2.4'
......@@ -69,11 +69,11 @@ Last-Update: 2016-10-09
+# raise pyxb.PyXBVersionError(_PyXBVersion)
# Import bindings for namespaces imported into schema
import pyxb.binding.datatypes
--- python-pbcore.orig/pbcore/io/dataset/pyxb/_pbsample.py
+++ python-pbcore/pbcore/io/dataset/pyxb/_pbsample.py
@@ -18,10 +18,10 @@
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:7fa6c9c0-a3d6-11e7-96cb-0026b9fe0a90')
import _pbbase as _ImportedBinding__pbbase
--- a/pbcore/io/dataset/pyxb/_pbsample.py
+++ b/pbcore/io/dataset/pyxb/_pbsample.py
@@ -18,10 +18,10 @@ import pyxb.utils.six as _six
_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:4c2de410-68d0-11e8-b8c4-1803730e031b')
# Version of PyXB used to generate the bindings
-_PyXBVersion = '1.2.4'
......@@ -85,13 +85,14 @@ Last-Update: 2016-10-09
+# raise pyxb.PyXBVersionError(_PyXBVersion)
# Import bindings for namespaces imported into schema
import pyxb.binding.datatypes
--- python-pbcore.orig/requirements-dev.txt
+++ python-pbcore/requirements-dev.txt
@@ -1,5 +1,5 @@
import _pbbase as _ImportedBinding__pbbase
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,6 +1,6 @@
coverage
nose
-pyxb==1.2.4
+pyxb
sphinx
h5py >= 2.0.1
pysam >= 0.13
Description: Fix FTBFS with NumPy 1.14
Bug-Debian: https://bugs.debian.org/900485
Origin: upstream, https://github.com/PacificBiosciences/pbcore/commit/b7ef4238b6388f984a264b8a912450b652177dbf
Author: David Seifert <dseifert@pacificbiosciences.com>
Last-Update: 2018-01-10
--- a/tests/test_pbdataset.py
+++ b/tests/test_pbdataset.py
@@ -1693,7 +1693,7 @@ class TestDataSet(unittest.TestCase):
self.assertEqual(len(readers[0].referenceInfoTable), 59)
obstbl = [readers[0].referenceInfo('E.faecalis.1')]
exptbl = [(27, 27, 'E.faecalis.1', 'E.faecalis.1', 1482,
- 'a1a59c267ac1341e5a12bce7a7d37bcb', 0L, 0L)]
+ 'a1a59c267ac1341e5a12bce7a7d37bcb', 0, 0)]
self.assertListOfTuplesEqual(obstbl, exptbl)
# TODO: add a bam with a different referenceInfoTable to check merging
# and id remapping:
@@ -2220,7 +2220,7 @@ class TestDataSet(unittest.TestCase):
self.assertEqual(len3, 338114)
obstbl = aln.referenceInfoTable
exptbl = [(1, 1, 'lambda_NEB3011', 'lambda_NEB3011',
- 48502, 'a1319ff90e994c8190a4fe6569d0822a', 0L, 338113L)]
+ 48502, 'a1319ff90e994c8190a4fe6569d0822a', 0, 338113)]
self.assertListOfTuplesEqual(obstbl, exptbl)
self.assertEqual(set(aln.tId), {1})
# + 1, because bounds are inclusive, rather than exclusive
@@ -2247,9 +2247,9 @@ class TestDataSet(unittest.TestCase):
self.assertEqual(len3, 57147)
obstbl = aln.referenceInfoTable
exptbl = [(0, 0, 'ecoliK12_pbi_March2013', 'ecoliK12_pbi_March2013',
- 4642522, '52cd7c5fa92877152fa487906ae484c5', 0L, 57034L),
+ 4642522, '52cd7c5fa92877152fa487906ae484c5', 0, 57034),
(1, 1, 'lambda_NEB3011', 'lambda_NEB3011', 48502,
- 'a1319ff90e994c8190a4fe6569d0822a', 57035L, 57146L)]
+ 'a1319ff90e994c8190a4fe6569d0822a', 57035, 57146)]
self.assertListOfTuplesEqual(obstbl, exptbl)
self.assertEqual(set(aln.tId), {0, 1})
# + 1, because bounds are inclusive, rather than exclusive
@@ -2282,7 +2282,7 @@ class TestDataSet(unittest.TestCase):
self.assertEqual(len3, 65346)
obstbl = aln.referenceInfoTable
exptbl = [(0, 0, 'ecoliK12_pbi_March2013', 'ecoliK12_pbi_March2013',
- 4642522, '52cd7c5fa92877152fa487906ae484c5', 0L, 0L)]
+ 4642522, '52cd7c5fa92877152fa487906ae484c5', 0, 0)]
self.assertListOfTuplesEqual(obstbl, exptbl)
self.assertEqual(set(aln.tId), {0})
self.assertEqual(aln.referenceInfo('ecoliK12_pbi_March2013'),
@@ -2306,7 +2306,7 @@ class TestDataSet(unittest.TestCase):
self.assertEqual(len1 + len2, len3)
self.assertEqual(len3, 160264)
exptbl = [(0, 0, 'ecoliK12_pbi_March2013', 'ecoliK12_pbi_March2013',
- 4642522, '52cd7c5fa92877152fa487906ae484c5', 0L, 0L)]
+ 4642522, '52cd7c5fa92877152fa487906ae484c5', 0, 0)]
obstbl = aln.referenceInfoTable
self.assertListOfTuplesEqual(obstbl, exptbl)
self.assertEqual(set(aln.tId), {0})
@@ -2338,9 +2338,9 @@ class TestDataSet(unittest.TestCase):
# and endrow fields for bams someday...
obstbl = aln.referenceInfoTable
exptbl = [(0, 0, 'ecoliK12_pbi_March2013', 'ecoliK12_pbi_March2013',
- 4642522, '52cd7c5fa92877152fa487906ae484c5', 0L, 0L),
+ 4642522, '52cd7c5fa92877152fa487906ae484c5', 0, 0),
(1, 1, 'lambda_NEB3011', 'lambda_NEB3011', 48502,
- 'a1319ff90e994c8190a4fe6569d0822a', 0L, 0L)]
+ 'a1319ff90e994c8190a4fe6569d0822a', 0, 0)]
self.assertListOfTuplesEqual(obstbl, exptbl)
self.assertEqual(set(aln.tId), {0, 1})
self.assertEqual(aln.referenceInfo('ecoliK12_pbi_March2013'),
@@ -2372,9 +2372,9 @@ class TestDataSet(unittest.TestCase):
self.assertEqual(len4, 160376)
obstbl = aln.referenceInfoTable
exptbl = [(0, 0, 'ecoliK12_pbi_March2013', 'ecoliK12_pbi_March2013',
- 4642522, '52cd7c5fa92877152fa487906ae484c5', 0L, 0L),
+ 4642522, '52cd7c5fa92877152fa487906ae484c5', 0, 0),
(1, 1, 'lambda_NEB3011', 'lambda_NEB3011', 48502,
- 'a1319ff90e994c8190a4fe6569d0822a', 0L, 0L)]
+ 'a1319ff90e994c8190a4fe6569d0822a', 0, 0)]
self.assertListOfTuplesEqual(obstbl, exptbl)
self.assertEqual(set(aln.tId), {0, 1})
self.assertEqual(aln.referenceInfo('ecoliK12_pbi_March2013'),
......@@ -8,7 +8,7 @@ Description: Relax test constraint which is rather a rounding issue
--- a/tests/test_pbdataset.py
+++ b/tests/test_pbdataset.py
@@ -2121,7 +2121,7 @@ class TestDataSet(unittest.TestCase):
@@ -2122,7 +2122,7 @@ class TestDataSet(unittest.TestCase):
2322.805559802698)
self.assertEqual(ds2.metadata.summaryStats.readLenDist.sampleStd,
2322.805559802698)
......
......@@ -5,9 +5,9 @@ Description: Remove cython from requirements.txt
Author: Afif Elghraoui <afif@ghraoui.name
Forwarded: no
Last-Update: 2015-12-13
--- python-pbcore.orig/requirements.txt
+++ python-pbcore/requirements.txt
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,2 @@
-cython
numpy >= 1.7.1
pysam >= 0.9.0
pysam >= 0.13
......@@ -2,5 +2,4 @@ doc-theme.patch
enable-build-time-testing.patch
remove-unnecessary-cython-dep.patch
ignore-pyxb.patch
numpy1.14.patch
relax_test_constraint.patch
version=3
version=4
# For GitHub projects you can use the tags or releases page. Since the archive
# URLs use only the version as the name, it is recommended to use a
# filenamemangle to adjust the name of the downloaded file:
opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/pbcore-$1.tar.gz/" \
https://github.com/PacificBiosciences/pbcore/tags (?:.*/)?v?(\d[\d\.]*)\.tar\.gz
# Upstream is not tagging releases regularly - thus we use mode=git
opts="mode=git,pretty=1.5.0+git%cd.%h,repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,repack,compression=xz" \
https://github.com/PacificBiosciences/pbcore.git HEAD
......@@ -12,9 +12,9 @@
# serve to show the default.
import sys, os
globals = {}
execfile("../pbcore/__init__.py", globals)
__VERSION__ = globals["__VERSION__"]
# don't forget to update setup.py and pbcore/__init__.py too
__VERSION__ = '1.5.0'
# If extensions (or modules to document with autodoc) are in another directory,
......
#################################################################################
# Copyright (c) 2011-2015, Pacific Biosciences of California, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Pacific Biosciences nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
# THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC BIOSCIENCES AND ITS
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PACIFIC BIOSCIENCES OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#################################################################################
from __future__ import absolute_import
__VERSION__ = "1.4.2"
# don't forget to update setup.py and doc/conf.py too
__VERSION__ = "1.5.0"
#################################################################################
# Copyright (c) 2011-2015, Pacific Biosciences of California, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Pacific Biosciences nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
# THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC BIOSCIENCES AND ITS
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PACIFIC BIOSCIENCES OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#################################################################################
from __future__ import absolute_import
from .chemistry import *
#################################################################################
# Copyright (c) 2011-2015, Pacific Biosciences of California, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Pacific Biosciences nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
# THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC BIOSCIENCES AND ITS
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PACIFIC BIOSCIENCES OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#################################################################################
from __future__ import absolute_import
__all__ = ["tripleFromMetadataXML",
"decodeTriple",
......@@ -54,7 +25,7 @@ def _loadBarcodeMappingsFromFile(mapFile):
mappings[(bindingKit, sequencingKit, softwareVersion)] = sequencingChemistry
return mappings
except:
raise ChemistryLookupError, "Error loading chemistry mapping xml"
raise ChemistryLookupError("Error loading chemistry mapping xml")
def _loadBarcodeMappings():
mappingFname = resource_filename(Requirement.parse('pbcore'),'pbcore/chemistry/resources/mapping.xml')
......@@ -87,8 +58,7 @@ def tripleFromMetadataXML(metadataXmlPath):
instrumentControlVersion = ".".join(verComponents)
return (bindingKit, sequencingKit, instrumentControlVersion)
except Exception as e:
raise ChemistryLookupError, \
("Could not find, or extract chemistry information from, %s" % (metadataXmlPath,))
raise ChemistryLookupError("Could not find, or extract chemistry information from, %s" % (metadataXmlPath,))
def decodeTriple(bindingKit, sequencingKit, softwareVersion):
"""
......
......@@ -329,71 +329,68 @@
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<!--=====================================-->
<!-- Updating PA version from 5.0 -> 5.1 -->
<!--=====================================-->
<!-- PA5.1 backward compatibility with iguana chemistry -->
<!-- 2.1 binding kit with 2.0 sequencing plate -->
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>100-862-200</BindingKit>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>100-861-800</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>100-862-200</BindingKit>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>101-093-700</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<!-- Sequel® Sequencing Plate Silwet -->
<!-- 2.1 binding kit with 2.1 sequencing plate (silwet) -->
<!-- SG1/16509P Chemistry update (binding kit only) with 5.0 basecaller (no new training) -->
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>100-862-200</BindingKit>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>101-309-500</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<!-- Sequel® Sequencing Plate Silwet (4 rxn) -->
<!-- SG1/16509P Chemistry update (binding kit only) with 5.0 basecaller (no new training) -->
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>100-862-200</BindingKit>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>101-309-400</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<!-- 2.1 binding kit with 2.0 sequencing plate -->
<!-- SG1/16509P Chemistry update (binding kit only) with 5.0 basecaller (no new training, prototype parts) -->
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>100-861-800</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<BindingKit>101-490-800</BindingKit>
<SequencingKit>101-490-900</SequencingKit>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<!-- SG1/16509P Chemistry update (binding kit only) with 5.0 basecaller (no new training, prototype parts) -->
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>101-093-700</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<BindingKit>101-490-800</BindingKit>
<SequencingKit>101-491-000</SequencingKit>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<!-- 2.1 binding kit with 2.1 sequencing plate (silwet) -->
<!-- SG1/16509P Chemistry update (binding kit only) with 5.1 primary (no new training) -->
<!-- SG1/16509P Chemistry update (binding kit only) with 5.0 basecaller (no new training, prototype parts) -->
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>101-309-500</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<BindingKit>101-500-400</BindingKit>
<SequencingKit>101-490-900</SequencingKit>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
<!-- SG1/16509P Chemistry update (binding kit only) with 5.1 primary (no new training) -->
<!-- SG1/16509P Chemistry update (binding kit only) with 5.0 basecaller (no new training, prototype parts) -->
<Mapping>
<SequencingChemistry>S/P2-C2/5.0</SequencingChemistry>
<BindingKit>101-365-900</BindingKit>
<SequencingKit>101-309-400</SequencingKit>
<SoftwareVersion>5.1</SoftwareVersion>
<BindingKit>101-500-400</BindingKit>
<SequencingKit>101-491-000</SequencingKit>
<SoftwareVersion>5.0</SoftwareVersion>
</Mapping>
</MappingTable>
#################################################################################
# Copyright (c) 2011-2015, Pacific Biosciences of California, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Pacific Biosciences nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
# THIS LICENSE. THIS SOFTWARE IS PROVIDED BY PACIFIC BIOSCIENCES AND ITS
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PACIFIC BIOSCIENCES OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#################################################################################
from __future__ import absolute_import
from pkg_resources import Requirement, resource_filename
......@@ -177,3 +149,6 @@ def getEmptyAlignedBam():
def getMappingXml():
return _getAbsPath("chemistry.xml")
def getWeird():
return _getAbsPath("weird.fa")
"""Doctest resources"""
from __future__ import absolute_import
import os
from pkg_resources import Requirement, resource_filename
......
>chr1
acgtacgtacgtact
\ No newline at end of file