Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added symbols #27

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ef81ba7
Update README.md
dr3y May 27, 2019
fd930f8
added recombinase site renderers
dr3y May 27, 2019
59237e8
Merge branch 'master' of https://github.com/dr3y/dnaplotlib
dr3y May 27, 2019
4993444
reverse crash fix?
dr3y May 27, 2019
e800399
reverse crash fix try 2
dr3y May 27, 2019
0ca5ed3
recombinase spacing bug on reverse fixed?
dr3y May 27, 2019
d1c521f
rna symbol
dr3y May 27, 2019
dcaa3b2
rna symbol
dr3y May 27, 2019
6f74c04
Merge branch 'master' of https://github.com/dr3y/dnaplotlib
dr3y May 27, 2019
bd18e7d
more rna symbol
dr3y May 27, 2019
6c59d16
bugfix
dr3y May 27, 2019
e2eed11
bugfix
dr3y May 28, 2019
dfcaea7
wave end
dr3y May 28, 2019
b82d007
fixed operator and added oriT
testaccountpleaseignore3 May 31, 2019
62c6b05
aptamer added
testaccountpleaseignore3 May 31, 2019
6120aec
fixed up spacing on some symbols, reverse on 5poverhang and 3poverhang
testaccountpleaseignore3 Jun 11, 2019
e1d8c12
updated parts picture
testaccountpleaseignore3 Jun 11, 2019
c44bbbb
Update README.md
dr3y Jun 11, 2019
4ff2d02
Update README.md
dr3y Jun 11, 2019
96336c2
default ncrna length
testaccountpleaseignore3 Jun 12, 2019
f1f85c5
Merge branch 'master' of https://github.com/dr3y/dnaplotlib
testaccountpleaseignore3 Jun 12, 2019
9bd4ea7
made recombinase site bigger
testaccountpleaseignore3 Jun 13, 2019
42f8d92
don't flip attL/R color?
testaccountpleaseignore3 Feb 10, 2020
af301a7
linewidth over 2
dr3y Apr 14, 2020
d3e8d0b
Merge branch 'master' of https://github.com/dr3y/dnaplotlib
dr3y Apr 14, 2020
dc3f076
arrow distance 3/4
dr3y Apr 14, 2020
28a7d2f
1.5x linewidth
dr3y Apr 14, 2020
90a9e87
zero test
dr3y Apr 14, 2020
86dbe50
revert
dr3y Apr 14, 2020
7796a9a
Revert "revert"
dr3y Apr 14, 2020
f131644
testtt
dr3y Apr 14, 2020
8625a55
space a bit
dr3y Apr 14, 2020
42eec90
back to half!!
dr3y Apr 14, 2020
36f2e15
moveitabit
dr3y Apr 14, 2020
b538454
Revert "moveitabit"
dr3y Apr 14, 2020
4d26c79
move tiny bit
dr3y Apr 14, 2020
5af1775
dont change color for reverse integrase site
dr3y Apr 15, 2020
e0ded1f
circular flag in renderDNA
dr3y May 7, 2020
0a0a20c
plasmids are a constant height
dr3y May 7, 2020
c688bb4
edge color
dr3y May 8, 2020
df21418
add vscode to gitignore
dr3y May 28, 2020
e75e10f
Update README.md
dr3y Jun 25, 2020
55ea7b0
gallery view front and center
dr3y Jun 25, 2020
b3233f9
typo
dr3y Jul 29, 2020
6021489
Working on making a "bound protein" representation
dr3y Jan 5, 2021
a5a9965
"simple_plot_design" and Binding as a regulation type
dr3y Jan 6, 2021
a0800eb
remove print statement and default dna renderer
dr3y Jun 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ docs/_build/

# PyBuilder
target/
.vscode/settings.json
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pip install --upgrade --no-deps git+git://github.com/dr3y/dnaplotlib.git@master

# DNAplotlib

DNAplotlib is a library that enables highly customizable visualization of individual genetic constructs and libraries of design variants. It can be thought of in many ways as matplotlib for genetic diagrams. Publication quality vector-based output is produced and all aspects of the rendering process can be easily customized or replaced by the user. DNAplotlib is capable of SBOL Visual compliant diagrams in addition to a format able to better illustrate the precise location and length of each genetic part. This alternative "traced-based" visualization method enables direct comparison with nucleotide-level information such as RNA-seq read depth or other base resolution measures. While it is envisaged that access will be predominantly via the programming interface, several easy to use text-based input formats can be processed by a command-line scripts to facilitate broader usage. DNAplotlib is cross-platform and open-source software released under the OSI OSL-3.0 license.
Expand All @@ -12,8 +14,10 @@ The DNAplotlib library is contained within the `dnaplotlib.py` file in the `lib`
## Getting Started
We provide an extensive gallery of use cases for DNAplotlib in the `gallery` directory. Click on a thumbnail below to go directly to the example code:

### Gallery of all part glyphs
<a href="gallery/all_parts"><img src="gallery/all_parts/actually_all_parts.png" height="700px"/></a>

### Genetic Designs and Annotation
<a href="gallery/all_parts"><img src="gallery/all_parts/all_parts.png" height="160px"/></a>
<a href="gallery/xnor_truthtable"><img src="gallery/xnor_truthtable/xnor_truthtable.png" height="160px"/></a>
<a href="gallery/scatter_annotate"><img src="gallery/scatter_annotate/scatter_annotate.png" height="160px"/></a>
<a href="gallery/offset_features"><img src="gallery/offset_features/offset_features_y_offset.png" height="80px"/></a>
Expand Down
1,094 changes: 858 additions & 236 deletions dnaplotlib/dnaplotlib.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gallery/all_parts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SBOL Visual Parts & Customization

<img src="all_parts.png" width="600px"/>
<img src="actually_all_parts.png" width="600px"/>

Illustration of all SBOL Visual parts in forward and reverse direction. Each part can have its apperance customised to convay further information.
Illustration of all SBOL Visual parts in forward and reverse direction. Each part can have its apperance customised to convey further information.

Binary file added gallery/all_parts/actually_all_parts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions gallery/all_parts/actually_all_parts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#import sys
import dnaplotlib as dpl
import matplotlib.pyplot as plt
#import matplotlib.transforms as mtransforms
#import matplotlib.patches as mpatch
#from matplotlib.patches import FancyBboxPatch
import numpy as np

dnaline = 3
dr = dpl.DNARenderer(scale = 5,linewidth=dnaline)
part_renderers = dr.SBOL_part_renderers()
parts = part_renderers.keys()
dontrender = ['StemTop']
fig1 = plt.figure(figsize=(14,14))
faxes = fig1.subplots(ncols=6,nrows=6)
raxes = np.ravel(faxes)
#print(raxes)
raxind = 0
for part in parts:
if(part in dontrender):
continue
ax = raxes[raxind]
raxind+=1
#plt.Figure(figsize=(.1,.1))
#ax = plt.gca()
design = [{'type':part, 'name':'test', 'fwd':True,\
'opts':{'label':part,'label_size':13,'label_y_offset':-8,'color':(.5,.5,.2)}},
{'type':part, 'name':'testr', 'fwd':False,'opts':{'color':(.2,.5,.5)}}]
start,end = dr.renderDNA(ax,design,part_renderers)
ax.axis('off')
xdist = end-start
delta = xdist*.2
start-=delta
end+=delta
newxdist = end-start
ax.set_xlim([start,end])

ax.set_ylim([-newxdist/2,newxdist/2])
plt.savefig("actually_all_parts.png")
171 changes: 171 additions & 0 deletions gallery/notebooks/interactiveplot.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
matplotlib>=1.5.0
pysbol2
numpy