{"id":42712148,"url":"https://github.com/scholer/gelutils","last_synced_at":"2026-01-29T15:12:03.707Z","repository":{"id":21252893,"uuid":"24568423","full_name":"scholer/gelutils","owner":"scholer","description":"Tools and utilities for converting and annotating GEL files (and TIFF, PNG).","archived":false,"fork":false,"pushed_at":"2023-10-03T20:51:36.000Z","size":834,"stargazers_count":8,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-07T01:18:53.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scholer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-28T19:30:42.000Z","updated_at":"2024-04-03T12:04:04.000Z","dependencies_parsed_at":"2023-01-13T21:22:02.665Z","dependency_job_id":null,"html_url":"https://github.com/scholer/gelutils","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/scholer/gelutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scholer%2Fgelutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scholer%2Fgelutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scholer%2Fgelutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scholer%2Fgelutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scholer","download_url":"https://codeload.github.com/scholer/gelutils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scholer%2Fgelutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28880017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-29T15:12:02.822Z","updated_at":"2026-01-29T15:12:03.700Z","avatar_url":"https://github.com/scholer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nGELUTILS\n========\n\nTools and utilities for working with scientific GEL files.\nMakes it easy to convert and annotate .GEL or .TIFF image files from e.g. Typhoon scanners and GelDocs.\n\nThe primary use of this application/package is to add lane annotations to gel images.\nThe application can be installed and used as any other application,\ne.g. by simply double-clicking a .GEL file and then selecting the annotate-gel application to annotate the gel.\nIt features a simple GUI where you can add the text you want to display above each lane and\nconfigure how the final gel image appears.\nGels can be scaled, cropped, rotated, etc.\nThe application will export a SVG file with the cropped/rotated gel image, overlayed by the given annotations.\nThe SVG file can be automatically converted to a PNG, which is sometimes more convenient for presentation usage.\n\n\n\nFAQ: What are GEL images and who cares?\n---------------------------------------\n\nGels are widely used in molecular biology and biotechnology for analyzing the size of biological molecules, e.g. DNA or\nproteins.\nWhen analysing samples on gels via gelelectrophoresis, samples are loaded at the top of the gel in well/indentations at\nthe top of the gel. Charged molecules are then dragged through the gel by applying an electric field across the gel.\nLarger molecules have more interaction with the gel matrix. This drag reduces the migration rate through the gel.\nSmaller molecules travels faster through the gel.\nThis creates a pattern of bands on the gel.\nBands from the a sample in one well will form a vertical \"lane\" as they travel through the gel.\n\n\n\nFeatures and basic usage:\n-------------------------\n\nCurrent features:\n* Quickly annotate lanes on gel using sample names from a plain text file.\n* Linearize GEL files stored in MD GEL squareroot format (e.g. gel files from Typhoon scanners).\n* A simple GUI to control the program.\n\nBasic usage:\n* Open your gel image with the included AnnotateGel App.\n* Type lane annotations in the text box to the left,\n* Configure image processing by altering the YAML-formatted dict in the text box to the right.\n* Click \"Annotate Gel\" to create an SVG file with your gel image and the annotations overlayed at the top of the gel.\n\n\n\nBugs, feature suggestions and pull requests:\n--------------------------------------------\n\nIf you find any bugs, please let me know -- they are usually very easy and fast to fix.\n\nAlso feel free to write me with feature suggestions.\nOr, even better: Fork this repository, fix the bugs and\nimplement the features as you want, then send me a pull request :)\n\n\n\nInstallation:\n--------------\n\n**Command-line installation using pip:**\n* This may be the easiest way to get and install gelutils.\n* First, if you are using environments, create a new environment for gelutils -- or activate an existing environment you want to install gelutils into.\n    * If using Anaconda, create a conda environment that includes ```numpy, pyyaml, six, pillow=2.7, cffi```.\n    * Example: ```conda create -n gelutils six numpy pillow=2.7 pyyaml cffi```\n* Then install gelutils using ```pip install gelutils```.\n\n\n**Install gelutils in editable mode:**\n* Activate/create environment for gelutils.\n* Go to the folder where you want to place the gelutils package source.\n* Install gelutils using ```pip install -e git+https://github.com/scholer/gelutils```\n\n\n**Manual installation from source:**\n* Download / git clone, go to the root directory. If you type ```ls``` (or ```dir``` on Windows) you should see README.md and REQUIREMENTS.txt files.\n* If you are using Python environments, activate the environment you want to use for gelutils.\n    * To create new conda environment for gelutils, type: ```conda create -n gelutils --file REQUIREMENTS.txt```\n    * If the packages are not all available from Anaconda, type:\n    ```conda create -n gelutils six numpy pillow=2.7 pyyaml cffi```,\n    and use pip to install the rest.\n* Make sure you have all required dependencies, e.g. using ```pip install -r REQUIREMENTS.txt```.\n* Install using ```pip install -e .``` (the period at the end means \"the current directory\").\n\n\n**Upgrading Gelutils:**\n\nTo update gelutils to the newest version, activate the python environment where you installed gelutils (if any),\nthen run: \n\n```\npip install -U gelutils\n```\n\n\n**Python Installation:**\n\nIn general, I recommend using either Anaconda or a package manager to install Python and pip.\nAnaconda is available from [here](https://www.continuum.io/downloads).\nIf you are already using a package manager (e.g. [chocolatey](https://chocolatey.org/) on Windows),\nyou may want to use your package manager to install Python.\n\nInside your Python distribution you may want to have separate Python **environments**.\n*Why do you need \"environments\"?*\n *  A: Some Python applications may require a very specific set of dependencies, which can sometimes be incompatible.\n    For example, Gelutils requires a specific version of Pillow, an image processing library.\n    Using the current version of Pillow, or a very old version, will give an error.\n    However, what if you have another Python package or application which requires the newest version of Pillow?\n    How do you make these work together, using the same Python installation?\n    The answer is to have separate Python environments, one for each application.\n\nEnvironments can be created and managed in a couple of different ways:\n * If you are using the Anaconda Python distribution, use ```conda``` command line tool\n   to create environments and install packages (using ```pip``` when a conda package is not yet available).\n\n\n**Cairo installation:**\n\nCairo is used for converting the annotated SVG files to PNG.\n\nCairo is an external graphics library, used by e.g. the GTK+ graphics toolkit used by many apps.\n\nIf you have GTK+ installed, you may already have the required Cairo dependency.\n\nOtherwise, you will have to obtain the needed DLL.\n\nThe easiest way to intall the required DLL is to use [Alexander Shaduri’s GTK+ installer](https://gtk-win.sourceforge.io/home/index.php/Main/Downloads).\n\nIf you do not want to install GTK+, you can also just extract the GTK+ installer to a temporary directory (using e.g. 7zip), and copy the file `libcairo-2.dll` to `\u003cPYTHON INSTALL DIR\u003e\\Library\\bin`.\n\nTo check if Cairo has been installed, you can invoke one of the following commands from the terminal:\n\n    $ python -c \"import ctypes.util; print(ctypes.util.find_library('libcairo-2'))\"\n    $ python -c \"import cairosvg\"\n\n\n\n\nAlternatives and prior art:\n---------------------------\n\nHere is a quick list of alternative tools for annotating Gel Images:\n\n* Gel Annotator (this project).\n* gelImage\n    * A single-file Python GUI program to annotate TIFF gel images using wxPython and Cairo. \n    * Last updated 2015.\n    * https://github.com/openpaul/gelImage\n* GelScape\n    * A wep-app for annotating gel images. Requires Java-enabled browser.\n    * Also available as an offline Java app, which I haven't tried.\n    * Last updated 2003.\n    * Code not available on website or GitHub.\n* General vector-graphics apps:\n    * Adobe Illustrator.\n    * InkScape.\n    * PowerPoint.\n* Generic image apps:\n    * ImageJ.\n* Python, Pillow, and Matplotlib to annotate the image.\n* \n\n\n\nTroubleshooting:\n----------------\n\nGenerally, one cause of troubles during installation is the Cairo dependencies.\nCairo is used to convert SVG files to PNG, but is not strictly needed if you only need the SVG files.\nIt is also possible to use other methods to convert SVG files to PNG, e.g. ImageMagick, Illustrator, Preview, etc.\nIf you find that you cannot resolve Cairo-related issues during installation, you can install Gelutils without it using\n```pip install --no-deps gelutils svgwrite pyyaml six Pillow==2.7 numpy```, then\n\n\nThe cairocffi dependency uses the C Foreign Function Interface (c ffi) to interact with Cairo C code.\nIn order to compile cairocffi, you must have ```libffi-dev``` installed.\n* On Linux: ```sudo apt-get install libffi-dev``` (sometimes called _libffi-devel_)\n\n\nIf you get a \"compiler\" error, make sure you have a compiler installed.\n* On Linux/Ubuntu, install with ```sudo apt-get install gcc```.\n* On OS X, simply typing gcc should allow you to install the Mac developer tools.\n* On Windows, hopefully pip can find a binary wheel for you because building on Windows is still a PITA.\n    * The ```cffi``` library is generally available as a binary wheel for Anaconda.\n    If ```cffi``` install is your problem and you are using Anaconda, try installing ```cffi``` using: ```conda install cffi```.\n\n\n\nTips and Tricks:\n----------------\n\n\n### View/Open images after annotation: ###\n\n* If you set ```open_webbrowser=true``` in the AnnotateGel app, it will use the webbrowser module to view the annotated SVG images.\n* This works really well if e.g. Google Chrome is your default app for viewing SVG files.\n* If, however, you have Adobe Illustrator (or similar) installed, this might be the default App for SVG files.\n* This is not always optimal, since you will automatically see the latest version of the SVG file.\n* To change the default app for viewing SVG files:\n    * OSX: Right-click an SVG file, select ```Get Info``` in the context menu, then under ```Open with``` select the proper app, then ''make sure you click the \"Change All...\" button to make the change apply for all SVG files (otherwise it will only apply to that one file).\n    * Windows: Shift + right-click an SVG file, select ```Open with```, then \"Select file / other...\", then select the proper app. This will generally apply to all files of the same filetype.\n\n\n### Making AnnotateGel the default app for GEL and GAML files: ###\n\nUsing AnnotateGel as the default app for opening GEL or GAML files is fairly easy on Windows. However, on OS X, it requires a little bit of work.\n* Before you proceed, determine where AnnotateGel was installed when you did ```pip install``` as the final installation step above. See the section below to determine where AnnotateGel is located.\n\nOn Windows, to use AnnotateGel as default application:\n* Shift + right-click a .gel file, select \"Open with...\", then \"Browse...\", then locate AnnotateGel and select OK.\n\nOn OS X, using AnnotateGel as a default app is a little more involved. I suggest taking a look at these references:\n[mborgerson](https://mborgerson.com/creating-an-executable-from-a-python-script), [stackexchange](http://apple.stackexchange.com/questions/153818/make-a-python-program-an-application/153828#153828).\nBut in short, the process looks like this:\n* Open Automator (cmd+space, then type Automator).\n* Create a new \"Application\" document.\n* Add a \"shell script\" action to your workflow.\n* Under ```Shell:``` select ```/bin/bash```, and under ```Pass input:``` select ```as arguments```.\n* In the text box type: ```/path/to/bin/AnnotateGel \"$@\"``` (where ```/path/to/bin/AnnotateGel``` is the file location where AnnotateGel was installed, see below).\n* Save this workflow as \"AnnotateGel.app\" (Menu \"File -\u003e Save\" or Cmd+s). You can save it in whatever location you want, e.g. under \"Applications\", where you have your other applications.\n* Now right-click a .gel file, select \"Get Info\", then under \"Open with\" select \"Other...\", then browse to select the \"AnnotateGel.app\" workflow/file you just saved with Automator. Check \"Always Open With\", and press \"Add\".\n* Still in the \"Get Info\" window, press the \"Change All...\" button to use AnnotateGel.app to open all files.\n* If you want to use AnnotateGel.app to also open .gaml files (gel annotation config files), simply right-click a .gaml file and repeat the previous two steps.\n\n\n\n### Where is AnnotateGel and other gelutils apps installed? ###\n\nThe location where ```pip install``` installs the AnnotateGel executable files (aka binaries/scripts/apps) depends on (1) your platform, (2) your python distribution, and (3) whether you are using a python environment.\n\nThe easiest way to find AnnotateGel is to just search for it:\n* OS X: Open Spotlight (Cmd + space), then type ```AnnotateGel```.\n* Windows: Use Windows Search/Explorer (WindowsKey + F) or your preferred file-finder to find the AnnotateGel file. Note that Windows search sometimes doesn't find new files right away, and may need considerable time to \"re-index\" the file before it can be found. Blame Microsoft.\n* Linux: Open terminal and type: ```find -name AnnotateGel ~/```. If it doesn't find anything in your home folder, try ```find -name AnnotateGel /```.\n\nLets go though some examples of where AnnotateGel is typically found after installation:\n* Example 1: On OS X (platform) using Anaconda python distribution and installing in a python environment called \"gelutils\", the path to the installed AnnotateGel executable is ```/Users/rasmus/anaconda3/envs/gelutils/bin/AnnotateGel```.\n* Example 2: On OS X (platform) using Anaconda python distribution and not using environments (aka \"the default environment\"), the path to the installed AnnotateGel executable is ```/Users/rasmus/anaconda3/bin/AnnotateGel```.\n* Example 3: On OS X (platform) using the official python distribution from python.org and not using environments (aka \"the default environment\"), the path to the installed AnnotateGel executable is ```/Library/Frameworks/Python.framework/Versions/3.4/bin/AnnotateGel```.\n\n\n\nTODO:\n-----\n\nBetter icons:\n* A better App icon.\n* An icon for yaml/gaml files.\n* An icon for gel files.\n\n\nDocumentation:\n--------------\n\nPlease refer to the files in the 'doc/' directory for help and documentation.\nAnd, of course, the source if you are so inclined.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscholer%2Fgelutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscholer%2Fgelutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscholer%2Fgelutils/lists"}