https://github.com/zachcp/drawpeptides
small library for making animated gifs of peptides
https://github.com/zachcp/drawpeptides
Last synced: about 1 year ago
JSON representation
small library for making animated gifs of peptides
- Host: GitHub
- URL: https://github.com/zachcp/drawpeptides
- Owner: zachcp
- Created: 2015-01-19T23:28:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-05-31T15:39:23.000Z (about 10 years ago)
- Last Synced: 2025-04-26T04:56:00.564Z (about 1 year ago)
- Language: Clojure
- Size: 37.1 KB
- Stars: 5
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# drawpeptides
Description and motivation can be found at this [blog post](http://zachcp.org/blog/2015/clojure-cdk-peptides/).
## Installation
```
git clone https://github.com/zachcp/drawpeptides.git
cd drawpeptides
lein repl
```
## Usage
The core functions are `makepeptide`, `makeimage` and `peptideanimation`. `makepeptide` takes a vector of keywords and
turns it into a peptide. `makeimage` creaets and image and can take some keyword parameters
to change the size and the CDK options. `peptideanimation` takes a filename and vector of images to create an animatedgif.
```[clojure]
(def aminos (keys AminoAcids))
;make a peptide
(def pep1 (makepeptide (take 3 aminos)))
; make an image
(def image1 (makeimage pep1 :width 800 :height 200 :highlightstyle (. StandardGenerator$HighlightStyle OuterGlow)))
;show it
(show image1)
(show
(makeimage
(makepeptide [:ALA :ALA :ALA :ALA])))
;To generate an animated peptide and write it to the file
(peptideanimation "/Users/yourusername/Desktop/simplepeptide.gif"
[:PHE :ALA :ASP :GLY] :width 400 :height 800)
```

## License
Copyright © 2015 FIXME
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.