├── petlx ├── test │ ├── __init__.py │ └── bio │ │ ├── __init__.py │ │ ├── test_tabix.py │ │ └── test_gff3.py ├── __init__.py └── bio │ ├── __init__.py │ ├── tabix.py │ └── gff3.py ├── requirements.txt ├── rtfd_requirements.txt ├── MANIFEST.in ├── test_requirements.txt ├── fixture ├── test.bed.gz ├── sample.vcf.gz ├── test.bed.gz.tbi ├── sample.vcf.gz.tbi ├── sample.sorted.gff.gz ├── test_noheader.bed.gz ├── sample.sorted.gff.gz.tbi ├── test_noheader.bed.gz.tbi └── sample.vcf ├── docstage ├── 0.1 │ ├── objects.inv │ ├── _static │ │ ├── file.png │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── sidebar.js │ │ ├── default.css │ │ └── doctools.js │ ├── _sources │ │ ├── todo.txt │ │ └── index.txt │ ├── searchindex.js │ ├── _modules │ │ ├── index.html │ │ └── petlx.html │ ├── search.html │ ├── todo.html │ ├── genindex.html │ ├── py-modindex.html │ └── index.html ├── 0.2 │ ├── objects.inv │ ├── _static │ │ ├── file.png │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── sidebar.js │ │ └── default.css │ ├── _sources │ │ ├── array.txt │ │ ├── xlsx.txt │ │ ├── gff3.txt │ │ ├── interval.txt │ │ └── index.txt │ ├── .buildinfo │ ├── searchindex.js │ ├── _modules │ │ └── index.html │ ├── search.html │ ├── py-modindex.html │ ├── xlsx.html │ ├── genindex.html │ ├── gff3.html │ └── index.html ├── 0.2.1 │ ├── objects.inv │ ├── _static │ │ ├── file.png │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── sidebar.js │ │ └── default.css │ ├── _sources │ │ ├── array.txt │ │ ├── xlsx.txt │ │ ├── gff3.txt │ │ ├── interval.txt │ │ └── index.txt │ ├── searchindex.js │ ├── _modules │ │ └── index.html │ ├── search.html │ ├── py-modindex.html │ ├── xlsx.html │ ├── genindex.html │ ├── gff3.html │ └── index.html └── index.html ├── .gitignore ├── .settings └── org.eclipse.core.resources.prefs ├── .pydevproject ├── .project ├── release.txt ├── README.rst ├── README.txt ├── docs ├── bio.rst ├── push.rst ├── index.rst ├── Makefile └── make.bat ├── TODO.rst ├── tox.ini ├── LICENSE.txt ├── setup.py └── examples └── bio.py /petlx/test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | petl>=1.0.0 2 | -------------------------------------------------------------------------------- /rtfd_requirements.txt: -------------------------------------------------------------------------------- 1 | petl>=1.0.0 2 | numpydoc==0.5 3 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.txt 2 | recursive-include docs *.txt 3 | 4 | -------------------------------------------------------------------------------- /test_requirements.txt: -------------------------------------------------------------------------------- 1 | nose 2 | petl>=1.0.0 3 | pyvcf 4 | pysam 5 | -------------------------------------------------------------------------------- /fixture/test.bed.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/test.bed.gz -------------------------------------------------------------------------------- /fixture/sample.vcf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/sample.vcf.gz -------------------------------------------------------------------------------- /fixture/test.bed.gz.tbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/test.bed.gz.tbi -------------------------------------------------------------------------------- /docstage/0.1/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.1/objects.inv -------------------------------------------------------------------------------- /docstage/0.2/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2/objects.inv -------------------------------------------------------------------------------- /fixture/sample.vcf.gz.tbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/sample.vcf.gz.tbi -------------------------------------------------------------------------------- /docstage/0.2.1/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2.1/objects.inv -------------------------------------------------------------------------------- /fixture/sample.sorted.gff.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/sample.sorted.gff.gz -------------------------------------------------------------------------------- /fixture/test_noheader.bed.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/test_noheader.bed.gz -------------------------------------------------------------------------------- /docstage/0.1/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.1/_static/file.png -------------------------------------------------------------------------------- /docstage/0.1/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.1/_static/minus.png -------------------------------------------------------------------------------- /docstage/0.1/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.1/_static/plus.png -------------------------------------------------------------------------------- /docstage/0.2/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2/_static/file.png -------------------------------------------------------------------------------- /docstage/0.2/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2/_static/minus.png -------------------------------------------------------------------------------- /docstage/0.2/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2/_static/plus.png -------------------------------------------------------------------------------- /docstage/0.2.1/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2.1/_static/file.png -------------------------------------------------------------------------------- /docstage/0.2.1/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2.1/_static/minus.png -------------------------------------------------------------------------------- /docstage/0.2.1/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/docstage/0.2.1/_static/plus.png -------------------------------------------------------------------------------- /fixture/sample.sorted.gff.gz.tbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/sample.sorted.gff.gz.tbi -------------------------------------------------------------------------------- /fixture/test_noheader.bed.gz.tbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/petl-developers/petlx/HEAD/fixture/test_noheader.bed.gz.tbi -------------------------------------------------------------------------------- /petlx/test/bio/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import, print_function, division 3 | 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.pyc 3 | *.csv 4 | *.h5 5 | docs/_build 6 | build 7 | MANIFEST 8 | dist 9 | .idea 10 | tmp 11 | .tox/ 12 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jul 12 14:25:12 BST 2012 2 | eclipse.preferences.version=1 3 | encoding//docs/conf.py=utf-8 4 | -------------------------------------------------------------------------------- /docstage/0.2.1/_sources/array.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.array 2 | 3 | Arrays (numpy) 4 | ============== 5 | 6 | .. autofunction:: toarray 7 | -------------------------------------------------------------------------------- /docstage/0.2/_sources/array.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.array 2 | 3 | Arrays (numpy) 4 | ============== 5 | 6 | .. autofunction:: toarray 7 | -------------------------------------------------------------------------------- /docstage/0.2.1/_sources/xlsx.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.xlsx 2 | 3 | Excel files (openpyxl) 4 | ====================== 5 | 6 | .. autofunction:: fromxlsx 7 | 8 | -------------------------------------------------------------------------------- /docstage/0.2/_sources/xlsx.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.xlsx 2 | 3 | Excel files (openpyxl) 4 | ====================== 5 | 6 | .. autofunction:: fromxlsx 7 | 8 | -------------------------------------------------------------------------------- /petlx/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, print_function, division 2 | 3 | 4 | __version__ = '1.0.3' 5 | 6 | 7 | import petlx.push 8 | import petlx.bio 9 | -------------------------------------------------------------------------------- /petlx/bio/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import, print_function, division 3 | 4 | 5 | # activate all extensions 6 | import petlx.bio.gff3 7 | import petlx.bio.tabix 8 | import petlx.bio.vcf 9 | -------------------------------------------------------------------------------- /docstage/0.2.1/_sources/gff3.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.gff3 2 | 3 | GFF3 Utilities 4 | ============== 5 | 6 | .. autofunction:: fromgff3 7 | .. autofunction:: gff3lookup 8 | .. autofunction:: gff3join 9 | .. autofunction:: gff3leftjoin 10 | 11 | 12 | -------------------------------------------------------------------------------- /docstage/0.2/_sources/gff3.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.gff3 2 | 3 | GFF3 Utilities 4 | ============== 5 | 6 | .. autofunction:: fromgff3 7 | .. autofunction:: gff3lookup 8 | .. autofunction:: gff3join 9 | .. autofunction:: gff3leftjoin 10 | 11 | 12 | -------------------------------------------------------------------------------- /docstage/0.2/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 838d05eca36104e4441c195bd01dfea1 4 | tags: fbb0d17656682115ca4d033fb2f83ba1 5 | -------------------------------------------------------------------------------- /docstage/0.1/_sources/todo.txt: -------------------------------------------------------------------------------- 1 | 0.2 2 | --- 3 | 4 | - some sort of interval tree lookup and/or join using bx-python - intervallookup, intervallookupone, intervalrecordlookup, intervalrecordlookupone, intervaljoin 5 | - fromgff3, unpackgff3info 6 | - fromvcf41, meltvcfsampledata, unpackvcfinfo, ... 7 | 8 | -------------------------------------------------------------------------------- /docstage/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | petlx - documentation - Optional extensions to the petl package 4 | 5 | 6 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.pydevproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Default 6 | python 2.7 7 | 8 | /petlx/src 9 | 10 | 11 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | petlx 4 | 5 | 6 | petl 7 | 8 | 9 | 10 | org.python.pydev.PyDevBuilder 11 | 12 | 13 | 14 | 15 | 16 | org.python.pydev.pythonNature 17 | 18 | 19 | -------------------------------------------------------------------------------- /release.txt: -------------------------------------------------------------------------------- 1 | nosetests 2 | sed -i -e 's/.dev0//' petlx/__init__.py 3 | version=`grep __version__ petlx/__init__.py | sed -e "s/.*__version__[ ]=[ ]'\(.*\)'/\1/"` 4 | echo $version 5 | git commit -a -m v$version 6 | git tag -a v$version -m v$version 7 | git push 8 | git push --tags 9 | python setup.py register sdist upload 10 | # increment version and add .dev0 in petlx/__init__.py 11 | git commit -a -m 'increment version'; git push 12 | # activate version at rtfd 13 | # notify 14 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | petlx - Extensions to the petl package 2 | ====================================== 3 | 4 | ``petlx`` is a collection of domain-specific and/or experimental extensions to 5 | `petl `_, a Python package for extracting, 6 | transforming and loading tables of data. 7 | 8 | - Docs: http://petlx.readthedocs.org/ 9 | - Source: https://github.com/alimanfoo/petlx 10 | - Download: http://pypi.python.org/pypi/petlx 11 | - Mailing list: http://groups.google.com/group/python-etl 12 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | petlx - Extensions to the petl package 2 | ====================================== 3 | 4 | ``petlx`` is a collection of domain-specific and/or experimental extensions to 5 | `petl `_, a Python package for extracting, 6 | transforming and loading tables of data. 7 | 8 | - Docs: http://petlx.readthedocs.org/ 9 | - Source: https://github.com/alimanfoo/petlx 10 | - Download: http://pypi.python.org/pypi/petlx 11 | - Mailing list: http://groups.google.com/group/python-etl 12 | -------------------------------------------------------------------------------- /docs/bio.rst: -------------------------------------------------------------------------------- 1 | .. module:: petlx.bio 2 | 3 | Biology 4 | ======= 5 | 6 | GFF3 7 | ---- 8 | 9 | .. autofunction:: petlx.bio.gff3.fromgff3 10 | 11 | Tabix (pysam) 12 | ------------- 13 | 14 | .. note:: 15 | 16 | The `pysam `_ package is required, e.g.:: 17 | 18 | $ pip install pysam 19 | 20 | .. autofunction:: petlx.bio.tabix.fromtabix 21 | 22 | Variant call format (PyVCF) 23 | --------------------------- 24 | 25 | .. note:: 26 | 27 | The `pyvcf `_ package is required, e.g.:: 28 | 29 | $ pip install pyvcf 30 | 31 | .. autofunction:: petlx.bio.vcf.fromvcf 32 | .. autofunction:: petlx.bio.vcf.vcfunpackinfo 33 | .. autofunction:: petlx.bio.vcf.vcfmeltsamples 34 | .. autofunction:: petlx.bio.vcf.vcfunpackcall 35 | -------------------------------------------------------------------------------- /docstage/0.2.1/_sources/interval.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.interval 2 | 3 | Intervals (bx-python) 4 | ===================== 5 | 6 | The package bx.intervals is required. Instructions for installation 7 | can be found at https://bitbucket.org/james_taylor/bx-python/wiki/Home 8 | or try ``pip install bx-python``. 9 | 10 | .. autofunction:: intervallookup 11 | .. autofunction:: intervallookupone 12 | .. autofunction:: intervalrecordlookup 13 | .. autofunction:: intervalrecordlookupone 14 | .. autofunction:: facetintervallookup 15 | .. autofunction:: facetintervallookupone 16 | .. autofunction:: facetintervalrecordlookup 17 | .. autofunction:: facetintervalrecordlookupone 18 | .. autofunction:: intervaljoin 19 | .. autofunction:: intervalleftjoin 20 | 21 | -------------------------------------------------------------------------------- /docstage/0.2/_sources/interval.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx.interval 2 | 3 | Intervals (bx-python) 4 | ===================== 5 | 6 | The package bx.intervals is required. Instructions for installation 7 | can be found at https://bitbucket.org/james_taylor/bx-python/wiki/Home 8 | or try ``pip install bx-python``. 9 | 10 | .. autofunction:: intervallookup 11 | .. autofunction:: intervallookupone 12 | .. autofunction:: intervalrecordlookup 13 | .. autofunction:: intervalrecordlookupone 14 | .. autofunction:: facetintervallookup 15 | .. autofunction:: facetintervallookupone 16 | .. autofunction:: facetintervalrecordlookup 17 | .. autofunction:: facetintervalrecordlookupone 18 | .. autofunction:: intervaljoin 19 | .. autofunction:: intervalleftjoin 20 | 21 | -------------------------------------------------------------------------------- /petlx/test/bio/test_tabix.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import, print_function, division 3 | 4 | 5 | import petl as etl 6 | from petl.test.helpers import ieq 7 | 8 | 9 | # activate extension 10 | import petlx.bio.tabix 11 | 12 | 13 | def test_fromtabix(): 14 | actual = etl.fromtabix('fixture/test.bed.gz', 15 | region='Pf3D7_02_v3:110000-120000') 16 | expect = (('#chrom', 'start', 'end', 'region'), 17 | ('Pf3D7_02_v3', '105800', '447300', 'Core')) 18 | ieq(expect, actual) 19 | 20 | 21 | def test_fromtabix_noheader(): 22 | actual = etl.fromtabix('fixture/test_noheader.bed.gz', 23 | region='Pf3D7_02_v3:110000-120000') 24 | expect = (('Pf3D7_02_v3', '105800', '447300', 'Core'),) 25 | ieq(expect, actual) 26 | -------------------------------------------------------------------------------- /TODO.rst: -------------------------------------------------------------------------------- 1 | v1.0 2 | ==== 3 | 4 | DONE create local branch v1.0 5 | 6 | DONE reorganise project layout, remove src etc. 7 | 8 | DONE update version identifier scheme 9 | 10 | DONE update requirements to need petl >= 1.0 11 | 12 | DONE remove ipython package, update documentation 13 | 14 | DONE migrate push package 15 | 16 | DONE create remote branch v1.0 and sync 17 | 18 | TODO try installing dependencies under py27 and py34 19 | 20 | TODO setup tox for testing under py27 and py34 21 | 22 | TODO rewrite interval module using intervaltree 23 | 24 | TODO rewrite xls module to remove dependency on xlutils 25 | 26 | TODO change all docstring examples to use new import style 27 | 28 | TODO review all docs, add info on how to activate an extension 29 | 30 | TODO change petl integration code in all submodules 31 | 32 | TODO get all doctests running under tox/nose 33 | 34 | TODO whoosh bug 35 | 36 | TODO review issues 37 | 38 | v1.1 39 | ==== 40 | 41 | TODO add validate module 42 | 43 | 44 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # Tox (http://tox.testrun.org/) is a tool for running tests 2 | # in multiple virtualenvs. This configuration file will run the 3 | # test suite on all supported python versions. To use it, "pip install tox" 4 | # and then run "tox" from this directory. 5 | 6 | [tox] 7 | envlist = py26, py27, py34, doctests, docs 8 | indexserver = 9 | preinstall1 = http://pypi.python.org/pypi 10 | 11 | [testenv] 12 | commands = 13 | nosetests -v 14 | deps = 15 | :preinstall1:cython 16 | -rtest_requirements.txt 17 | 18 | [testenv:doctests] 19 | basepython=python3.4 20 | # get stable output for unordered types 21 | setenv = 22 | PYTHONHASHSEED = 42 23 | commands = 24 | nosetests -v --with-doctest --doctest-options=+NORMALIZE_WHITESPACE petlx/bio --stop 25 | deps = 26 | :preinstall1:cython 27 | -rtest_requirements.txt 28 | 29 | [testenv:docs] 30 | # build documentation under similar environment to readthedocs 31 | basepython = python2.6 32 | changedir = docs 33 | deps = 34 | sphinx 35 | -rrtfd_requirements.txt 36 | commands= 37 | sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html 38 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Alistair Miles 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /docstage/0.1/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({objects:{"":{petlx:[0,0,1]},petlx:{fromxlsx:[0,1,1]}},terms:{all:0,code:0,intervalrecordlookupon:1,group:0,sensit:0,should:0,window:0,mail:0,sourc:0,openpyxl:0,read:0,watch:0,requir:0,name:0,manual:0,fromxlsx:0,collect:0,intervaljoin:1,found:0,page:0,wiki:0,list:0,interv:1,some:1,see:0,download:0,home:0,extract:0,intervallookupon:1,out:0,index:0,petl:0,abl:0,ericgazoni:0,tent:0,run:0,checksumfun:0,intervalrecordlookup:1,extens:0,sheet:0,search:0,alimanfoo:0,com:0,etl:0,load:0,overview:0,modul:0,easy_instal:0,filenam:0,instruct:0,linux:0,instal:0,from:0,transform:0,avail:0,petlx:0,sort:1,xlsx:0,option:0,fromvcf41:1,"case":0,none:0,join:1,setup:0,tree:1,can:0,"function":0,unpackgff3info:1,intervallookup:1,indic:0,packag:0,sheet1:0,file:0,tabl:0,pip:0,googl:0,todo:[],excel:0,note:0,python:[0,1],lookup:1,sheetnam:0,you:0,document:0,http:0,distribut:0,fromgff3:1,pypi:0,org:0,mac:0,meltvcfsampledata:1,unpackvcfinfo:1,data:0,bitbucket:0,github:0,doc:[],thi:0},objtypes:{"0":"py:module","1":"py:function"},titles:["petlx - Optional Extensions to the petl Package","0.2"],objnames:{"0":"Python module","1":"Python function"},filenames:["index","todo"]}) -------------------------------------------------------------------------------- /docstage/0.2.1/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx 2 | 3 | petlx - Optional Extensions to the petl Package 4 | =============================================== 5 | 6 | :mod:`petlx` is a collection of extensions to :mod:`petl`, a tentative 7 | Python module for extracting, transforming and loading tables of data. 8 | 9 | - Documentation: http://packages.python.org/petlx 10 | - Source Code: https://github.com/alimanfoo/petlx 11 | - Download: http://pypi.python.org/pypi/petlx 12 | - Mailing List: http://groups.google.com/group/python-etl 13 | 14 | For an overview of all functions in the package, see the 15 | :ref:`genindex`. 16 | 17 | Installation 18 | ------------ 19 | 20 | This module is available from the `Python Package Index 21 | `_. On Linux distributions you 22 | should be able to do ``easy_install petlx`` or ``pip install 23 | petlx``. On Windows or Mac you can download manually, extract and run 24 | ``python setup.py install``. 25 | 26 | Modules 27 | ------- 28 | 29 | .. toctree:: 30 | :maxdepth: 2 31 | 32 | xlsx 33 | array 34 | interval 35 | gff3 36 | 37 | Indices and tables 38 | ------------------ 39 | 40 | * :ref:`genindex` 41 | * :ref:`modindex` 42 | * :ref:`search` 43 | -------------------------------------------------------------------------------- /docstage/0.2/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx 2 | 3 | petlx - Optional Extensions to the petl Package 4 | =============================================== 5 | 6 | :mod:`petlx` is a collection of extensions to :mod:`petl`, a tentative 7 | Python module for extracting, transforming and loading tables of data. 8 | 9 | - Documentation: http://packages.python.org/petlx 10 | - Source Code: https://github.com/alimanfoo/petlx 11 | - Download: http://pypi.python.org/pypi/petlx 12 | - Mailing List: http://groups.google.com/group/python-etl 13 | 14 | For an overview of all functions in the package, see the 15 | :ref:`genindex`. 16 | 17 | Installation 18 | ------------ 19 | 20 | This module is available from the `Python Package Index 21 | `_. On Linux distributions you 22 | should be able to do ``easy_install petlx`` or ``pip install 23 | petlx``. On Windows or Mac you can download manually, extract and run 24 | ``python setup.py install``. 25 | 26 | Modules 27 | ------- 28 | 29 | .. toctree:: 30 | :maxdepth: 2 31 | 32 | xlsx 33 | array 34 | interval 35 | gff3 36 | 37 | Indices and tables 38 | ------------------ 39 | 40 | * :ref:`genindex` 41 | * :ref:`modindex` 42 | * :ref:`search` 43 | -------------------------------------------------------------------------------- /docstage/0.1/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx 2 | 3 | petlx - Optional Extensions to the petl Package 4 | =============================================== 5 | 6 | :mod:`petlx` is a collection of extensions to :mod:`petl`, a tentative 7 | Python module for extracting, transforming and loading tables of data. 8 | 9 | - Documentation: http://packages.python.org/petlx 10 | - Source Code: https://github.com/alimanfoo/petlx 11 | - Download: http://pypi.python.org/pypi/petlx 12 | - Mailing List: http://groups.google.com/group/python-etl 13 | 14 | For an overview of all functions in the package, see the 15 | :ref:`genindex`. 16 | 17 | Installation 18 | ------------ 19 | 20 | This module is available from the `Python Package Index 21 | `_. On Linux distributions you 22 | should be able to do ``easy_install petlx`` or ``pip install 23 | petlx``. On Windows or Mac you can download manually, extract and run 24 | ``python setup.py install``. 25 | 26 | Extracting (reading) tables from Excel files 27 | -------------------------------------------- 28 | 29 | .. autofunction:: petlx.fromxlsx 30 | 31 | Indices and tables 32 | ------------------ 33 | 34 | * :ref:`genindex` 35 | * :ref:`modindex` 36 | * :ref:`search` 37 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from ast import literal_eval 2 | from distutils.core import setup 3 | 4 | 5 | def get_version(source='petlx/__init__.py'): 6 | with open(source) as f: 7 | for line in f: 8 | if line.startswith('__version__'): 9 | return literal_eval(line.split('=')[-1].lstrip()) 10 | raise ValueError("__version__ not found") 11 | 12 | 13 | setup( 14 | name='petlx', 15 | version=get_version(), 16 | author='Alistair Miles', 17 | author_email='alimanfoo@googlemail.com', 18 | package_dir={'': '.'}, 19 | packages=['petlx', 'petlx.test', 20 | 'petlx.bio', 'petlx.test.bio'], 21 | url='https://github.com/alimanfoo/petlx', 22 | license='MIT License', 23 | description='Optional extensions for the petl package.', 24 | long_description=open('README.txt').read(), 25 | classifiers=['Intended Audience :: Developers', 26 | 'License :: OSI Approved :: MIT License', 27 | 'Programming Language :: Python :: 2.6', 28 | 'Programming Language :: Python :: 2.7', 29 | 'Programming Language :: Python :: 3.4', 30 | 'Topic :: Software Development :: Libraries :: Python Modules' 31 | ], 32 | install_requires=['petl>=1.0'] 33 | ) 34 | -------------------------------------------------------------------------------- /docs/push.rst: -------------------------------------------------------------------------------- 1 | .. module:: petlx.push 2 | 3 | Branching Pipelines 4 | =================== 5 | 6 | Introduction 7 | ------------ 8 | 9 | This module provides some functions for setting up branching data 10 | transformation pipelines. 11 | 12 | The general pattern is to define the pipeline, connecting components 13 | together via the ``pipe()`` method call, then pushing data through the 14 | pipeline via the ``push()`` method call at the top of the 15 | pipeline. E.g.:: 16 | 17 | >>> from petl import fromcsv 18 | >>> source = fromcsv('fruit.csv') 19 | >>> from petlx.push import * 20 | >>> p = partition('fruit') 21 | >>> p.pipe('orange', tocsv('oranges.csv')) 22 | >>> p.pipe('banana', tocsv('bananas.csv')) 23 | >>> p.push(source) 24 | 25 | The pipe operator can also be used to connect components in the 26 | pipeline, by analogy with the use of the pipe character in unix/linux 27 | shells, e.g.:: 28 | 29 | >>> from petl import fromcsv 30 | >>> source = fromcsv('fruit.csv') 31 | >>> from petlx.push import * 32 | >>> p = partition('fruit') 33 | >>> p | ('orange', tocsv('oranges.csv') 34 | >>> p | ('banana', tocsv('bananas.csv') 35 | >>> p.push(source) 36 | 37 | Push Functions 38 | -------------- 39 | 40 | .. autofunction:: petlx.push.partition 41 | .. autofunction:: petlx.push.sort 42 | .. autofunction:: petlx.push.duplicates 43 | .. autofunction:: petlx.push.unique 44 | .. autofunction:: petlx.push.diff 45 | .. autofunction:: petlx.push.tocsv 46 | .. autofunction:: petlx.push.totsv 47 | .. autofunction:: petlx.push.topickle 48 | -------------------------------------------------------------------------------- /petlx/test/bio/test_gff3.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import, print_function, division 3 | 4 | 5 | import petl as etl 6 | from petl.test.helpers import eq_ 7 | 8 | 9 | # activate extension 10 | import petlx.bio.gff3 11 | from petlx.bio.gff3 import GFF3_HEADER 12 | 13 | 14 | sample_gff3_filename = 'fixture/sample.gff' 15 | 16 | 17 | def test_fromgff3(): 18 | 19 | features = etl.fromgff3(sample_gff3_filename) 20 | 21 | eq_(GFF3_HEADER, features.header()) 22 | 23 | row = list(features)[1] 24 | eq_('apidb|MAL1', row[0]) 25 | eq_('ApiDB', row[1]) 26 | eq_('supercontig', row[2]) 27 | eq_(1, row[3]) 28 | eq_(643292, row[4]) 29 | eq_('.', row[5]) 30 | eq_('+', row[6]) 31 | eq_('.', row[7]) 32 | eq_('apidb|MAL1', row[8]['ID']) 33 | eq_('MAL1', row[8]['Name']) 34 | eq_('Plasmodium falciparum', row[8]['organism_name']) 35 | 36 | 37 | def test_fromgff3_trailing_semicolon(): 38 | 39 | features = etl.fromgff3(sample_gff3_filename) 40 | 41 | row = list(features)[2] 42 | eq_('apidb|MAL2', row[0]) 43 | eq_('ApiDB', row[1]) 44 | eq_('supercontig', row[2]) 45 | eq_(1, row[3]) 46 | eq_(947102, row[4]) 47 | eq_('.', row[5]) 48 | eq_('+', row[6]) 49 | eq_('.', row[7]) 50 | eq_('apidb|MAL2', row[8]['ID']) 51 | eq_('MAL2', row[8]['Name']) 52 | eq_('Plasmodium falciparum', row[8]['organism_name']) 53 | 54 | 55 | def test_fromgff3_region(): 56 | tbl_features = etl.fromgff3('fixture/sample.sorted.gff.gz', 57 | region='apidb|MAL5') 58 | eq_(7, tbl_features.nrows()) 59 | tbl_features = etl.fromgff3('fixture/sample.sorted.gff.gz', 60 | region='apidb|MAL5:1289593-1289595') 61 | eq_(4, tbl_features.nrows()) 62 | -------------------------------------------------------------------------------- /examples/bio.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import, print_function, division 3 | 4 | 5 | # fromtabix() 6 | ############# 7 | 8 | import petl as etl 9 | # activate bio extensions 10 | import petlx.bio 11 | table1 = etl.fromtabix('fixture/test.bed.gz', 12 | region='Pf3D7_02_v3') 13 | table1 14 | table2 = etl.fromtabix('fixture/test.bed.gz', 15 | region='Pf3D7_02_v3:110000-120000') 16 | table2 17 | 18 | 19 | # fromgff3() 20 | ############ 21 | 22 | import petl as etl 23 | # activate bio extensions 24 | import petlx.bio 25 | table1 = etl.fromgff3('fixture/sample.gff') 26 | table1.look(truncate=30) 27 | # extract from a specific genome region via tabix 28 | table2 = etl.fromgff3('fixture/sample.sorted.gff.gz', 29 | region='apidb|MAL5:1289593-1289595') 30 | table2.look(truncate=30) 31 | 32 | 33 | # fromvcf() 34 | ########### 35 | 36 | import petl as etl 37 | # activate bio extensions 38 | import petlx.bio 39 | table1 = etl.fromvcf('fixture/sample.vcf') 40 | table1.look(truncate=20) 41 | 42 | 43 | # vcfunpackinfo() 44 | ################# 45 | 46 | import petl as etl 47 | # activate bio extensions 48 | import petlx.bio 49 | table1 = ( 50 | etl 51 | .fromvcf('fixture/sample.vcf', samples=None) 52 | .vcfunpackinfo() 53 | ) 54 | table1 55 | 56 | 57 | # vcfmeltsamples() 58 | ################## 59 | 60 | import petl as etl 61 | # activate bio extensions 62 | import petlx.bio 63 | table1 = ( 64 | etl 65 | .fromvcf('fixture/sample.vcf') 66 | .vcfmeltsamples() 67 | ) 68 | table1 69 | 70 | 71 | # vcfunpackcall() 72 | ################# 73 | 74 | import petl as etl 75 | # activate bio extensions 76 | import petlx.bio 77 | table1 = ( 78 | etl 79 | .fromvcf('fixture/sample.vcf') 80 | .vcfmeltsamples() 81 | .vcfunpackcall() 82 | ) 83 | table1 84 | 85 | -------------------------------------------------------------------------------- /fixture/sample.vcf: -------------------------------------------------------------------------------- 1 | ##fileformat=VCFv4.0 2 | ##fileDate=20090805 3 | ##source=myImputationProgramV3.1 4 | ##reference=1000GenomesPilot-NCBI36 5 | ##phasing=partial 6 | ##INFO= 7 | ##INFO= 8 | ##INFO= 9 | ##INFO= 10 | ##INFO= 11 | ##INFO= 12 | ##INFO= 13 | ##INFO= 14 | ##FILTER= 15 | ##FILTER= 16 | ##FORMAT= 17 | ##FORMAT= 18 | ##FORMAT= 19 | ##FORMAT= 20 | ##ALT= 21 | ##ALT= 22 | #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA00001 NA00002 NA00003 23 | 19 111 . A C 9.6 . . GT:HQ 0|0:10,10 0|0:10,10 0/1:3,3 24 | 19 112 . A G 10 . . GT:HQ 0|0:10,10 0|0:10,10 0/1:3,3 25 | 20 14370 rs6054257 G A 29 PASS NS=3;DP=14;AF=0.5;DB;H2 GT:GQ:DP:HQ 0|0:48:1:51,51 1|0:48:8:51,51 1/1:43:5:.,. 26 | 20 17330 . T A 3 q10 NS=3;DP=11;AF=0.017 GT:GQ:DP:HQ 0|0:49:3:58,50 0|1:3:5:65,3 0/0:41:3:.,. 27 | 20 1110696 rs6040355 A G,T 67 PASS NS=2;DP=10;AF=0.333,0.667;AA=T;DB GT:GQ:DP:HQ 1|2:21:6:23,27 2|1:2:0:18,2 2/2:35:4:.,. 28 | 20 1230237 . T . 47 PASS NS=3;DP=13;AA=T GT:GQ:DP:HQ 0|0:54:.:56,60 0|0:48:4:51,51 0/0:61:2:.,. 29 | 20 1234567 microsat1 G GA,GAC 50 PASS NS=3;DP=9;AA=G;AN=6;AC=3,1 GT:GQ:DP 0/1:.:4 0/2:17:2 ./.:40:3 30 | 20 1235237 . T . . . . GT 0/0 0|0 ./. 31 | X 10 rsTest AC A,ATG 10 PASS . GT 0 0/1 0|2 32 | -------------------------------------------------------------------------------- /docstage/0.2.1/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({objects:{"":{petlx:[0,0,1]},"petlx.interval":{facetintervalrecordlookup:[2,1,1],intervallookup:[2,1,1],intervalrecordlookup:[2,1,1],intervaljoin:[2,1,1],intervallookupone:[2,1,1],facetintervalrecordlookupone:[2,1,1],facetintervallookupone:[2,1,1],intervalleftjoin:[2,1,1],facetintervallookup:[2,1,1],intervalrecordlookupone:[2,1,1]},"petlx.xlsx":{fromxlsx:[4,1,1]},"petlx.array":{toarray:[1,1,1]},"petlx.gff3":{gff3leftjoin:[3,1,1],gff3join:[3,1,1],fromgff3:[3,1,1],gff3lookup:[3,1,1]},petlx:{xlsx:[4,0,1],array:[1,0,1],interval:[2,0,1],gff3:[3,0,1]}},terms:{all:0,code:0,partial:1,from:[0,1,2,3,4],queri:2,orang:[1,2],distanc:2,intervalrecordlookupon:2,find:2,row:[1,2,3],group:0,also:[1,2,3],sensit:4,proxim:[3,2],rfacet:2,should:0,window:0,dtype:1,mail:0,arrai:[0,1],match:2,"case":[4,1],non:2,sourc:[0,1,2,3,4],"return":2,string:1,"__getitem__":2,python:[0,2],pypi:0,util:[0,3,2],ericgazoni:4,join:[3,2],requir:[4,2],like:2,foo:[1,2],bar:[1,2],name:[4,2],toarrai:1,quux:2,list:0,fromxlsx:4,infer:1,"try":[4,2],collect:0,intervaljoin:[3,2],each:[1,2],found:[4,2],page:0,wiki:[4,2],right:2,baz:[1,2],manual:0,interv:[0,3,2],some:2,datatyp:1,see:[0,3,2],sampl:1,result:2,download:0,home:[4,2],extract:[0,3,4],intervallookupon:2,out:4,index:[0,2],petl:[0,1,2],abl:0,overlap:2,between:2,"import":[1,2],duplicatekeyerror:2,tent:0,gff3leftjoin:3,run:0,kei:2,exampl:2,checksumfun:4,intervalrecordlookup:2,extens:0,base:3,dictionari:2,org:[0,2,4],valu:2,addit:2,comparison:2,search:0,last:2,traceback:2,facet:[3,2],rais:2,fals:2,alimanfoo:0,com:0,etl:0,first:2,load:[0,1],can:[0,1,2,4],overview:0,modul:[0,2],within:2,easy_instal:0,gff3lookup:3,transform:0,stop:2,filenam:[4,3],instruct:[4,2],seqid:3,linux:0,instal:[0,2,4],miss:2,lstop:2,given:[1,2],sheet:4,start:[3,2],numpi:[0,1],two:2,construct:2,avail:0,strict:2,appl:[1,2],call:2,includ:2,facetintervallookupon:2,petlx:[0,1,2,3,4],conveni:1,type:2,lstart:2,more:2,"function":[0,1],xlsx:4,option:0,specifi:1,github:0,indic:0,examin:1,line:2,facetintervalrecordlookupon:2,"true":2,than:2,must:2,count:1,none:[4,1,2],retriev:2,look:[1,2],keyword:2,setup:0,tree:3,zero:2,structur:1,valuespec:2,record:2,lkp:2,featur:3,intervallookup:2,henc:2,argument:2,james_taylor:2,packag:[0,2,4],sheet1:4,file:[0,3,2,4],tabl:[0,1,2,3,4],pip:[0,2,4],intervalleftjoin:[3,2],facetintervalrecordlookup:2,openpyxl:[0,4],end:[3,2],googl:0,gff3:[0,3],excel:[0,4],facetintervallookup:[3,2],note:2,field:[1,2],other:1,lookup:[3,2],build:3,which:1,sheetnam:4,you:0,document:0,noth:2,begin:2,http:[0,2,4],distribut:0,fromgff3:3,watch:4,pear:1,rstop:2,most:2,mac:0,fruit:2,rstart:2,data:[0,1],recent:2,bitbucket:[4,2],appropri:1,lfacet:2,stdin:2,without:2,thi:0,gff3join:3,oran:1,left:[3,2]},objtypes:{"0":"py:module","1":"py:function"},titles:["petlx - Optional Extensions to the petl Package","Arrays (numpy)","Intervals (bx-python)","GFF3 Utilities","Excel files (openpyxl)"],objnames:{"0":"Python module","1":"Python function"},filenames:["index","array","interval","gff3","xlsx"]}) -------------------------------------------------------------------------------- /docstage/0.2/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({objects:{"":{petlx:[0,0,1]},"petlx.interval":{intervaljoin:[2,1,1],intervallookup:[2,1,1],intervalrecordlookup:[2,1,1],facetintervallookup:[2,1,1],facetintervalrecordlookup:[2,1,1],facetintervalrecordlookupone:[2,1,1],facetintervallookupone:[2,1,1],intervalleftjoin:[2,1,1],intervallookupone:[2,1,1],intervalrecordlookupone:[2,1,1]},"petlx.xlsx":{fromxlsx:[4,1,1]},"petlx.array":{toarray:[1,1,1]},"petlx.gff3":{gff3leftjoin:[3,1,1],gff3join:[3,1,1],fromgff3:[3,1,1],gff3lookup:[3,1,1]},petlx:{xlsx:[4,0,1],array:[1,0,1],interval:[2,0,1],gff3:[3,0,1]}},terms:{all:0,code:0,partial:1,func:[],from:[0,1,2,3,4],queri:2,orang:[1,2],distanc:2,intervalrecordlookupon:2,find:2,row:[1,2,3],group:0,also:[1,2,3],sensit:4,proxim:[3,2],rfacet:2,should:0,list:0,window:0,dtype:1,mail:0,arrai:[0,1],match:2,"case":[4,1],non:2,sourc:[0,1,2,3,4],"return":2,string:1,"__getitem__":2,python:[0,2],pypi:0,util:[0,3,2],ericgazoni:4,join:[3,2],requir:[4,2],like:2,foo:[1,2],bar:[1,2],name:[4,2],toarrai:1,quux:2,baz:[1,2],fromxlsx:4,infer:1,"try":[4,2],collect:0,intervaljoin:[3,2],each:[1,2],found:[4,2],page:0,wiki:[4,2],right:2,manual:0,interv:[0,3,2],some:2,datatyp:1,see:[0,3,2],sampl:1,result:2,download:0,home:[4,2],extract:[0,3,4],intervallookupon:2,out:4,index:[0,2],petl:[0,1,2],abl:0,overlap:2,between:2,"import":[1,2],duplicatekeyerror:2,tent:0,gff3leftjoin:3,run:0,kei:2,exampl:2,checksumfun:4,intervalrecordlookup:2,extens:0,base:3,dictionari:2,org:[0,2,4],valu:2,addit:2,comparison:2,search:0,last:2,traceback:2,facet:2,facetintervallookup:[3,2],fals:2,alimanfoo:0,com:0,etl:0,first:2,load:[0,1],can:[0,1,2,4],overview:0,modul:[0,2],within:2,easy_instal:0,gff3lookup:3,transform:0,stop:2,filenam:[4,3],instruct:[4,2],seqid:3,linux:0,instal:[0,2,4],miss:2,lstop:2,given:[1,2],sheet:4,start:[3,2],numpi:[0,1],two:2,construct:2,avail:0,strict:2,appl:[1,2],call:2,includ:2,facetintervallookupon:2,petlx:[0,1,2,3,4],conveni:1,type:2,lstart:2,more:2,"function":[0,1],xlsx:4,option:0,specifi:1,github:0,indic:0,examin:1,line:2,facetintervalrecordlookupon:2,"true":2,than:2,must:2,count:1,none:[4,1,2],retriev:2,look:[1,2],keyword:2,setup:0,tree:3,zero:2,structur:1,valuespec:2,record:2,lkp:2,featur:3,intervallookup:2,henc:2,argument:2,james_taylor:2,packag:[0,2,4],sheet1:4,file:[0,3,2,4],tabl:[0,1,2,3,4],pip:[0,2,4],intervalleftjoin:[3,2],facetintervalrecordlookup:2,openpyxl:[0,4],end:[3,2],googl:0,gff3:[0,3],excel:[0,4],note:2,field:[1,2],other:1,lookup:[3,2],build:3,which:1,sheetnam:4,you:0,document:0,noth:2,begin:2,http:[0,2,4],distribut:0,fromgff3:3,watch:4,pear:1,rstop:2,most:2,mac:0,fruit:2,rstart:2,data:[0,1],recent:2,bitbucket:[4,2],appropri:1,lfacet:2,stdin:2,rais:2,without:2,thi:0,gff3join:3,oran:1,left:[3,2]},objtypes:{"0":"py:module","1":"py:function"},titles:["petlx - Optional Extensions to the petl Package","Arrays (numpy)","Intervals (bx-python)","GFF3 Utilities","Excel files (openpyxl)"],objnames:{"0":"Python module","1":"Python function"},filenames:["index","array","interval","gff3","xlsx"]}) -------------------------------------------------------------------------------- /docstage/0.1/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Overview: module code — petlx v0.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 40 | 41 |
42 |
43 |
44 |
45 | 46 |

All modules for which code is available

47 | 49 | 50 |
51 |
52 |
53 |
54 |
55 | 67 | 68 |
69 |
70 |
71 |
72 | 84 | 88 | 89 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. py:module:: petlx 2 | 3 | petlx - Extensions to the petl package 4 | ====================================== 5 | 6 | :mod:`petlx` is a collection of domain-specific and/or experimental 7 | extensions to `petl`_, a general purpose Python package for 8 | extracting, transforming and loading tables of data. 9 | 10 | - Documentation: http://petlx.readthedocs.org/ 11 | - Source Code: https://github.com/alimanfoo/petlx 12 | - Download: http://pypi.python.org/pypi/petlx 13 | - Mailing List: http://groups.google.com/group/python-etl 14 | 15 | Please feel free to ask questions via the mailing list 16 | (python-etl@googlegroups.com). 17 | 18 | To report installation problems, bugs or any other issues please email 19 | python-etl@googlegroups.com or `raise an issue on GitHub 20 | `_. 21 | 22 | For an overview of all functions in the package, see the 23 | :ref:`genindex`. 24 | 25 | .. note:: 26 | 27 | Version 1.0 is a new major release of :mod:`petlx`. The content of 28 | this package is significantly changed. See the :ref:`changes` 29 | section below for more information. 30 | 31 | .. _installation: 32 | 33 | Installation 34 | ------------ 35 | 36 | This package is available from the `Python Package Index 37 | `_. If you have `pip 38 | `_ you should be able to do:: 39 | 40 | $ pip install petlx 41 | 42 | You can also download manually, extract and run ``python setup.py 43 | install``. 44 | 45 | 46 | .. _dependencies: 47 | 48 | Dependencies 49 | ------------ 50 | 51 | This package has no installation requirements other than the Python 52 | core modules. 53 | 54 | Some of the functions in this package require installation of third party 55 | packages. This is indicated in the relevant parts of the documentation. 56 | 57 | 58 | .. _modules: 59 | 60 | Modules 61 | ------- 62 | 63 | .. toctree:: 64 | :maxdepth: 2 65 | 66 | bio 67 | push 68 | 69 | .. _changes: 70 | 71 | Changes 72 | ------- 73 | 74 | Version 1.0 75 | ~~~~~~~~~~~ 76 | 77 | Version 1.0 is a new major release of both :mod:`petlx` and 78 | :mod:`petl`. This package has been completely reorganised, and several 79 | areas of functionality have been migrated to `petl`_. The major 80 | changes are described below. 81 | 82 | * The `petlx.xls` module has been migrated to `petl.io.xls` 83 | * The `petlx.xlsx` module has been migrated to `petl.io.xlsx` 84 | * The `petlx.array` module has been migrated to `petl.io.numpy` 85 | * The `petlx.dataframe` module has been migrated to `petl.io.pandas` 86 | * The `petlx.hdf5` module has been migrated to `petl.io.pytables` 87 | * The `petlx.index` module has been migrated to `petl.io.whoosh` 88 | * The `petlx.interval` module has been migrated to `petl.transform.intervals` 89 | * The `display()` and `displayall()` functions from the `petlx.ipython` module have been migrated to `petl.util.vis` 90 | * The `petlx.tabix` module has been renamed to `petlx.bio.tabix` 91 | * The `petlx.gff3` module has been renamed to `petlx.bio.gff3` 92 | * The `petlx.vcf` module has been renamed to `petlx.bio.vcf` 93 | 94 | Please email python-etl@googlegroups.com if you have any questions. 95 | 96 | Indices and tables 97 | ------------------ 98 | 99 | * :ref:`genindex` 100 | * :ref:`modindex` 101 | * :ref:`search` 102 | 103 | .. _petl: http://petl.readthedocs.org/ 104 | -------------------------------------------------------------------------------- /docstage/0.2/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Overview: module code — petlx v0.2 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 40 | 41 |
42 |
43 |
44 |
45 | 46 |

All modules for which code is available

47 | 52 | 53 |
54 |
55 |
56 |
57 |
58 | 70 | 71 |
72 |
73 |
74 |
75 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /petlx/bio/tabix.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import, print_function, division 3 | 4 | 5 | import petl as etl 6 | from petl.compat import text_type 7 | from petl.util.base import Table 8 | 9 | 10 | def fromtabix(filename, reference=None, start=None, stop=None, region=None, 11 | header=None): 12 | """ 13 | Extract rows from a tabix indexed file, e.g.:: 14 | 15 | >>> import petl as etl 16 | >>> # activate bio extensions 17 | ... import petlx.bio 18 | >>> table1 = etl.fromtabix('fixture/test.bed.gz', 19 | ... region='Pf3D7_02_v3') 20 | >>> table1 21 | +---------------+----------+----------+-----------------------------+ 22 | | #chrom | start | end | region | 23 | +===============+==========+==========+=============================+ 24 | | 'Pf3D7_02_v3' | '0' | '23100' | 'SubtelomericRepeat' | 25 | +---------------+----------+----------+-----------------------------+ 26 | | 'Pf3D7_02_v3' | '23100' | '105800' | 'SubtelomericHypervariable' | 27 | +---------------+----------+----------+-----------------------------+ 28 | | 'Pf3D7_02_v3' | '105800' | '447300' | 'Core' | 29 | +---------------+----------+----------+-----------------------------+ 30 | | 'Pf3D7_02_v3' | '447300' | '450450' | 'Centromere' | 31 | +---------------+----------+----------+-----------------------------+ 32 | | 'Pf3D7_02_v3' | '450450' | '862500' | 'Core' | 33 | +---------------+----------+----------+-----------------------------+ 34 | ... 35 | 36 | >>> table2 = etl.fromtabix('fixture/test.bed.gz', 37 | ... region='Pf3D7_02_v3:110000-120000') 38 | >>> table2 39 | +---------------+----------+----------+--------+ 40 | | #chrom | start | end | region | 41 | +===============+==========+==========+========+ 42 | | 'Pf3D7_02_v3' | '105800' | '447300' | 'Core' | 43 | +---------------+----------+----------+--------+ 44 | 45 | """ 46 | 47 | return TabixView(filename, reference, start, stop, region, header) 48 | 49 | 50 | etl.fromtabix = fromtabix 51 | 52 | 53 | class TabixView(Table): 54 | def __init__(self, filename, reference=None, start=None, stop=None, 55 | region=None, header=None): 56 | self.filename = filename 57 | self.reference = reference 58 | self.start = start 59 | self.stop = stop 60 | self.region = region 61 | self.header = header 62 | 63 | def __iter__(self): 64 | from pysam import Tabixfile, asTuple 65 | f = Tabixfile(self.filename, mode='r') 66 | try: 67 | # header row 68 | if self.header is not None: 69 | yield self.header 70 | else: 71 | # assume last header line has fields 72 | h = list(f.header) 73 | if len(h) > 0: 74 | header_line = text_type(h[-1], encoding='ascii') 75 | yield tuple(header_line.split('\t')) 76 | 77 | # data rows 78 | for row in f.fetch(reference=self.reference, start=self.start, 79 | end=self.stop, region=self.region, 80 | parser=asTuple()): 81 | yield tuple(row) 82 | 83 | except: 84 | raise 85 | finally: 86 | f.close() 87 | -------------------------------------------------------------------------------- /docstage/0.2.1/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Overview: module code — petlx v0.2.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 40 | 41 |
42 |
43 |
44 |
45 | 46 |

All modules for which code is available

47 | 52 | 53 |
54 |
55 |
56 |
57 |
58 | 70 | 71 |
72 |
73 |
74 |
75 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docstage/0.1/_modules/petlx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | petlx — petlx v0.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 42 | 43 |
44 |
45 |
46 |
47 | 48 |

Source code for petlx

49 | from petlx.xlsx import fromxlsx
50 | 
51 | 52 |
53 |
54 |
55 |
56 |
57 | 69 | 70 |
71 |
72 |
73 |
74 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docstage/0.1/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Search — petlx v0.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 46 | 47 |
48 |
49 |
50 |
51 | 52 |

Search

53 |
54 | 55 |

56 | Please activate JavaScript to enable the search 57 | functionality. 58 |

59 |
60 |

61 | From here you can search these documents. Enter your search 62 | words into the box below and click "search". Note that the search 63 | function will automatically search for all of the words. Pages 64 | containing fewer words won't appear in the result list. 65 |

66 |
67 | 68 | 69 | 70 |
71 | 72 |
73 | 74 |
75 | 76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 97 | 101 | 102 | -------------------------------------------------------------------------------- /docstage/0.2/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Search — petlx v0.2 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 46 | 47 |
48 |
49 |
50 |
51 | 52 |

Search

53 |
54 | 55 |

56 | Please activate JavaScript to enable the search 57 | functionality. 58 |

59 |
60 |

61 | From here you can search these documents. Enter your search 62 | words into the box below and click "search". Note that the search 63 | function will automatically search for all of the words. Pages 64 | containing fewer words won't appear in the result list. 65 |

66 |
67 | 68 | 69 | 70 |
71 | 72 |
73 | 74 |
75 | 76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 97 | 101 | 102 | -------------------------------------------------------------------------------- /docstage/0.2.1/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Search — petlx v0.2.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 46 | 47 |
48 |
49 |
50 |
51 | 52 |

Search

53 |
54 | 55 |

56 | Please activate JavaScript to enable the search 57 | functionality. 58 |

59 |
60 |

61 | From here you can search these documents. Enter your search 62 | words into the box below and click "search". Note that the search 63 | function will automatically search for all of the words. Pages 64 | containing fewer words won't appear in the result list. 65 |

66 |
67 | 68 | 69 | 70 |
71 | 72 |
73 | 74 |
75 | 76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | 97 | 101 | 102 | -------------------------------------------------------------------------------- /docstage/0.1/todo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 0.2 — petlx v0.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 40 | 41 |
42 |
43 |
44 |
45 | 46 |
47 |

0.2

48 |
    49 |
  • some sort of interval tree lookup and/or join using bx-python - intervallookup, intervallookupone, intervalrecordlookup, intervalrecordlookupone, intervaljoin
  • 50 |
  • fromgff3, unpackgff3info
  • 51 |
  • fromvcf41, meltvcfsampledata, unpackvcfinfo, ...
  • 52 |
53 |
54 | 55 | 56 |
57 |
58 |
59 |
60 |
61 |

This Page

62 | 66 | 78 | 79 |
80 |
81 |
82 |
83 | 95 | 99 | 100 | -------------------------------------------------------------------------------- /docstage/0.1/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Index — petlx v0.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 40 | 41 |
42 |
43 |
44 |
45 | 46 | 47 |

Index

48 | 49 |
50 | F | P 51 |
52 |

F

53 | 54 | 57 |
55 |
fromxlsx() (in module petlx)
56 |
58 | 59 |

P

60 | 61 | 64 |
62 |
petlx (module)
63 |
65 | 66 | 67 | 68 |
69 |
70 |
71 |
72 |
73 | 74 | 75 | 76 | 88 | 89 |
90 |
91 |
92 |
93 | 105 | 109 | 110 | -------------------------------------------------------------------------------- /docstage/0.1/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Python Module Index — petlx v0.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 47 | 48 |
49 |
50 |
51 |
52 | 53 | 54 |

Python Module Index

55 | 56 |
57 | p 58 |
59 | 60 | 61 | 62 | 64 | 65 | 66 | 69 |
 
63 | p
67 | petlx 68 |
70 | 71 | 72 |
73 |
74 |
75 |
76 |
77 | 89 | 90 |
91 |
92 |
93 |
94 | 106 | 110 | 111 | -------------------------------------------------------------------------------- /docstage/0.1/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #303030 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0040D0 } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 44 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 45 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 46 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 47 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 48 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 49 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 50 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 51 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 52 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 53 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 54 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 55 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 56 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 57 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 58 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 59 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 60 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 61 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 62 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docstage/0.2.1/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #303030 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0040D0 } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 44 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 45 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 46 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 47 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 48 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 49 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 50 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 51 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 52 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 53 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 54 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 55 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 56 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 57 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 58 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 59 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 60 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 61 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 62 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docstage/0.2/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #303030 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0040D0 } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 44 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 45 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 46 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 47 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 48 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 49 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 50 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 51 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 52 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 53 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 54 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 55 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 56 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 57 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 58 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 59 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 60 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 61 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 62 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docstage/0.2/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Python Module Index — petlx v0.2 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 43 | 44 |
45 |
46 |
47 |
48 | 49 | 50 |

Python Module Index

51 | 52 |
53 | p 54 |
55 | 56 | 57 | 58 | 60 | 61 | 63 | 66 | 67 | 68 | 71 | 72 | 73 | 76 | 77 | 78 | 81 | 82 | 83 | 86 |
 
59 | p
64 | petlx 65 |
    69 | petlx.array 70 |
    74 | petlx.gff3 75 |
    79 | petlx.interval 80 |
    84 | petlx.xlsx 85 |
87 | 88 | 89 |
90 |
91 |
92 |
93 |
94 | 106 | 107 |
108 |
109 |
110 |
111 | 123 | 127 | 128 | -------------------------------------------------------------------------------- /docstage/0.2.1/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Python Module Index — petlx v0.2.1 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 43 | 44 |
45 |
46 |
47 |
48 | 49 | 50 |

Python Module Index

51 | 52 |
53 | p 54 |
55 | 56 | 57 | 58 | 60 | 61 | 63 | 66 | 67 | 68 | 71 | 72 | 73 | 76 | 77 | 78 | 81 | 82 | 83 | 86 |
 
59 | p
64 | petlx 65 |
    69 | petlx.array 70 |
    74 | petlx.gff3 75 |
    79 | petlx.interval 80 |
    84 | petlx.xlsx 85 |
87 | 88 | 89 |
90 |
91 |
92 |
93 |
94 | 106 | 107 |
108 |
109 |
110 |
111 | 123 | 127 | 128 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | 15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 | 17 | help: 18 | @echo "Please use \`make ' where is one of" 19 | @echo " html to make standalone HTML files" 20 | @echo " dirhtml to make HTML files named index.html in directories" 21 | @echo " singlehtml to make a single large HTML file" 22 | @echo " pickle to make pickle files" 23 | @echo " json to make JSON files" 24 | @echo " htmlhelp to make HTML files and a HTML help project" 25 | @echo " qthelp to make HTML files and a qthelp project" 26 | @echo " devhelp to make HTML files and a Devhelp project" 27 | @echo " epub to make an epub" 28 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 29 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 30 | @echo " text to make text files" 31 | @echo " man to make manual pages" 32 | @echo " changes to make an overview of all changed/added/deprecated items" 33 | @echo " linkcheck to check all external links for integrity" 34 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 35 | 36 | clean: 37 | -rm -rf $(BUILDDIR)/* 38 | 39 | html: 40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 41 | @echo 42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 43 | 44 | dirhtml: 45 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 48 | 49 | singlehtml: 50 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 51 | @echo 52 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 53 | 54 | pickle: 55 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 56 | @echo 57 | @echo "Build finished; now you can process the pickle files." 58 | 59 | json: 60 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 61 | @echo 62 | @echo "Build finished; now you can process the JSON files." 63 | 64 | htmlhelp: 65 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 66 | @echo 67 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 68 | ".hhp project file in $(BUILDDIR)/htmlhelp." 69 | 70 | qthelp: 71 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 72 | @echo 73 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 74 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 75 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/petlx.qhcp" 76 | @echo "To view the help file:" 77 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/petlx.qhc" 78 | 79 | devhelp: 80 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 81 | @echo 82 | @echo "Build finished." 83 | @echo "To view the help file:" 84 | @echo "# mkdir -p $$HOME/.local/share/devhelp/petlx" 85 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/petlx" 86 | @echo "# devhelp" 87 | 88 | epub: 89 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 90 | @echo 91 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 92 | 93 | latex: 94 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 95 | @echo 96 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 97 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 98 | "(use \`make latexpdf' here to do that automatically)." 99 | 100 | latexpdf: 101 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 102 | @echo "Running LaTeX files through pdflatex..." 103 | make -C $(BUILDDIR)/latex all-pdf 104 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 105 | 106 | text: 107 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 108 | @echo 109 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 110 | 111 | man: 112 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 113 | @echo 114 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 115 | 116 | changes: 117 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 118 | @echo 119 | @echo "The overview file is in $(BUILDDIR)/changes." 120 | 121 | linkcheck: 122 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 123 | @echo 124 | @echo "Link check complete; look for any errors in the above output " \ 125 | "or in $(BUILDDIR)/linkcheck/output.txt." 126 | 127 | doctest: 128 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 129 | @echo "Testing of doctests in the sources finished, look at the " \ 130 | "results in $(BUILDDIR)/doctest/output.txt." 131 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | if NOT "%PAPER%" == "" ( 11 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 12 | ) 13 | 14 | if "%1" == "" goto help 15 | 16 | if "%1" == "help" ( 17 | :help 18 | echo.Please use `make ^` where ^ is one of 19 | echo. html to make standalone HTML files 20 | echo. dirhtml to make HTML files named index.html in directories 21 | echo. singlehtml to make a single large HTML file 22 | echo. pickle to make pickle files 23 | echo. json to make JSON files 24 | echo. htmlhelp to make HTML files and a HTML help project 25 | echo. qthelp to make HTML files and a qthelp project 26 | echo. devhelp to make HTML files and a Devhelp project 27 | echo. epub to make an epub 28 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 29 | echo. text to make text files 30 | echo. man to make manual pages 31 | echo. changes to make an overview over all changed/added/deprecated items 32 | echo. linkcheck to check all external links for integrity 33 | echo. doctest to run all doctests embedded in the documentation if enabled 34 | goto end 35 | ) 36 | 37 | if "%1" == "clean" ( 38 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 39 | del /q /s %BUILDDIR%\* 40 | goto end 41 | ) 42 | 43 | if "%1" == "html" ( 44 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 45 | if errorlevel 1 exit /b 1 46 | echo. 47 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 48 | goto end 49 | ) 50 | 51 | if "%1" == "dirhtml" ( 52 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 53 | if errorlevel 1 exit /b 1 54 | echo. 55 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 56 | goto end 57 | ) 58 | 59 | if "%1" == "singlehtml" ( 60 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 61 | if errorlevel 1 exit /b 1 62 | echo. 63 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 64 | goto end 65 | ) 66 | 67 | if "%1" == "pickle" ( 68 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 69 | if errorlevel 1 exit /b 1 70 | echo. 71 | echo.Build finished; now you can process the pickle files. 72 | goto end 73 | ) 74 | 75 | if "%1" == "json" ( 76 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 77 | if errorlevel 1 exit /b 1 78 | echo. 79 | echo.Build finished; now you can process the JSON files. 80 | goto end 81 | ) 82 | 83 | if "%1" == "htmlhelp" ( 84 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 85 | if errorlevel 1 exit /b 1 86 | echo. 87 | echo.Build finished; now you can run HTML Help Workshop with the ^ 88 | .hhp project file in %BUILDDIR%/htmlhelp. 89 | goto end 90 | ) 91 | 92 | if "%1" == "qthelp" ( 93 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 94 | if errorlevel 1 exit /b 1 95 | echo. 96 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 97 | .qhcp project file in %BUILDDIR%/qthelp, like this: 98 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\petlx.qhcp 99 | echo.To view the help file: 100 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\petlx.ghc 101 | goto end 102 | ) 103 | 104 | if "%1" == "devhelp" ( 105 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 106 | if errorlevel 1 exit /b 1 107 | echo. 108 | echo.Build finished. 109 | goto end 110 | ) 111 | 112 | if "%1" == "epub" ( 113 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 117 | goto end 118 | ) 119 | 120 | if "%1" == "latex" ( 121 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 122 | if errorlevel 1 exit /b 1 123 | echo. 124 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 125 | goto end 126 | ) 127 | 128 | if "%1" == "text" ( 129 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 130 | if errorlevel 1 exit /b 1 131 | echo. 132 | echo.Build finished. The text files are in %BUILDDIR%/text. 133 | goto end 134 | ) 135 | 136 | if "%1" == "man" ( 137 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 138 | if errorlevel 1 exit /b 1 139 | echo. 140 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 141 | goto end 142 | ) 143 | 144 | if "%1" == "changes" ( 145 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 146 | if errorlevel 1 exit /b 1 147 | echo. 148 | echo.The overview file is in %BUILDDIR%/changes. 149 | goto end 150 | ) 151 | 152 | if "%1" == "linkcheck" ( 153 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 154 | if errorlevel 1 exit /b 1 155 | echo. 156 | echo.Link check complete; look for any errors in the above output ^ 157 | or in %BUILDDIR%/linkcheck/output.txt. 158 | goto end 159 | ) 160 | 161 | if "%1" == "doctest" ( 162 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 163 | if errorlevel 1 exit /b 1 164 | echo. 165 | echo.Testing of doctests in the sources finished, look at the ^ 166 | results in %BUILDDIR%/doctest/output.txt. 167 | goto end 168 | ) 169 | 170 | :end 171 | -------------------------------------------------------------------------------- /docstage/0.1/_static/sidebar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * sidebar.js 3 | * ~~~~~~~~~~ 4 | * 5 | * This script makes the Sphinx sidebar collapsible. 6 | * 7 | * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds 8 | * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton 9 | * used to collapse and expand the sidebar. 10 | * 11 | * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden 12 | * and the width of the sidebar and the margin-left of the document 13 | * are decreased. When the sidebar is expanded the opposite happens. 14 | * This script saves a per-browser/per-session cookie used to 15 | * remember the position of the sidebar among the pages. 16 | * Once the browser is closed the cookie is deleted and the position 17 | * reset to the default (expanded). 18 | * 19 | * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. 20 | * :license: BSD, see LICENSE for details. 21 | * 22 | */ 23 | 24 | $(function() { 25 | // global elements used by the functions. 26 | // the 'sidebarbutton' element is defined as global after its 27 | // creation, in the add_sidebar_button function 28 | var bodywrapper = $('.bodywrapper'); 29 | var sidebar = $('.sphinxsidebar'); 30 | var sidebarwrapper = $('.sphinxsidebarwrapper'); 31 | 32 | // original margin-left of the bodywrapper and width of the sidebar 33 | // with the sidebar expanded 34 | var bw_margin_expanded = bodywrapper.css('margin-left'); 35 | var ssb_width_expanded = sidebar.width(); 36 | 37 | // margin-left of the bodywrapper and width of the sidebar 38 | // with the sidebar collapsed 39 | var bw_margin_collapsed = '.8em'; 40 | var ssb_width_collapsed = '.8em'; 41 | 42 | // colors used by the current theme 43 | var dark_color = $('.related').css('background-color'); 44 | var light_color = $('.document').css('background-color'); 45 | 46 | function sidebar_is_collapsed() { 47 | return sidebarwrapper.is(':not(:visible)'); 48 | } 49 | 50 | function toggle_sidebar() { 51 | if (sidebar_is_collapsed()) 52 | expand_sidebar(); 53 | else 54 | collapse_sidebar(); 55 | } 56 | 57 | function collapse_sidebar() { 58 | sidebarwrapper.hide(); 59 | sidebar.css('width', ssb_width_collapsed); 60 | bodywrapper.css('margin-left', bw_margin_collapsed); 61 | sidebarbutton.css({ 62 | 'margin-left': '0', 63 | 'height': bodywrapper.height() 64 | }); 65 | sidebarbutton.find('span').text('»'); 66 | sidebarbutton.attr('title', _('Expand sidebar')); 67 | document.cookie = 'sidebar=collapsed'; 68 | } 69 | 70 | function expand_sidebar() { 71 | bodywrapper.css('margin-left', bw_margin_expanded); 72 | sidebar.css('width', ssb_width_expanded); 73 | sidebarwrapper.show(); 74 | sidebarbutton.css({ 75 | 'margin-left': ssb_width_expanded-12, 76 | 'height': bodywrapper.height() 77 | }); 78 | sidebarbutton.find('span').text('«'); 79 | sidebarbutton.attr('title', _('Collapse sidebar')); 80 | document.cookie = 'sidebar=expanded'; 81 | } 82 | 83 | function add_sidebar_button() { 84 | sidebarwrapper.css({ 85 | 'float': 'left', 86 | 'margin-right': '0', 87 | 'width': ssb_width_expanded - 28 88 | }); 89 | // create the button 90 | sidebar.append( 91 | '
«
' 92 | ); 93 | var sidebarbutton = $('#sidebarbutton'); 94 | light_color = sidebarbutton.css('background-color'); 95 | // find the height of the viewport to center the '<<' in the page 96 | var viewport_height; 97 | if (window.innerHeight) 98 | viewport_height = window.innerHeight; 99 | else 100 | viewport_height = $(window).height(); 101 | sidebarbutton.find('span').css({ 102 | 'display': 'block', 103 | 'margin-top': (viewport_height - sidebar.position().top - 20) / 2 104 | }); 105 | 106 | sidebarbutton.click(toggle_sidebar); 107 | sidebarbutton.attr('title', _('Collapse sidebar')); 108 | sidebarbutton.css({ 109 | 'color': '#FFFFFF', 110 | 'border-left': '1px solid ' + dark_color, 111 | 'font-size': '1.2em', 112 | 'cursor': 'pointer', 113 | 'height': bodywrapper.height(), 114 | 'padding-top': '1px', 115 | 'margin-left': ssb_width_expanded - 12 116 | }); 117 | 118 | sidebarbutton.hover( 119 | function () { 120 | $(this).css('background-color', dark_color); 121 | }, 122 | function () { 123 | $(this).css('background-color', light_color); 124 | } 125 | ); 126 | } 127 | 128 | function set_position_from_cookie() { 129 | if (!document.cookie) 130 | return; 131 | var items = document.cookie.split(';'); 132 | for(var k=0; k