GithubHelp home page GithubHelp logo

iqtlabs / squiggle Goto Github PK

View Code? Open in Web Editor NEW
39.0 6.0 9.0 4.32 MB

๐Ÿ“ˆ DNA Sequence Visualization for Humans

Home Page: https://squiggle.readthedocs.io

License: MIT License

Python 100.00%
dna visualization

squiggle's Introduction

This repository has moved to https://github.com/Benjamin-Lee/squiggle

DOI Build Status Docs PyPI

Squiggle is a two-dimensional DNA sequence visualization library that can turn FASTA sequence files like this:

>lcl|NC_000011.10_cds_NP_000509.1_1 [gene=HBB]
ATGGTGCATCTGACTCCTGAGGAGAAGTCTGCCGTTACTGCCCTGTGGGGCAAGGTGAACGTGGATGAAG
TTGGTGGTGAGGCCCTGGGCAGGCTGCTGGTGGTCTACCCTTGGACCCAGAGGTTCTTTGAGTCCTTTGG
GGATCTGTCCACTCCTGATGCTGTTATGGGCAACCCTAAGGTGAAGGCTCATGGCAAGAAAGTGCTCGGT
GCCTTTAGTGATGGCCTGGCTCACCTGGACAACCTCAAGGGCACCTTTGCCACACTGAGTGAGCTGCACT
GTGACAAGCTGCACGTGGATCCTGAGAACTTCAGGCTCCTGGGCAACGTGCTGGTCTGTGTGCTGGCCCA
TCACTTTGGCAAAGAATTCACCCCACCAGTGCAGGCTGCCTATCAGAAAGTGGTGGCTGGTGTGGCTAAT
GCCCTGGCCCACAAGTATCACTAA
>lcl|NC_005100.4_cds_NP_150237.1_1 [gene=HBB]
ATGGTGCACCTGACTGATGCTGAGAAGGCTGCTGTTAATGGCCTGTGGGGAAAGGTGAACCCTGATGATG
TTGGTGGCGAGGCCCTGGGCAGGCTGCTGGTTGTCTACCCTTGGACCCAGAGGTACTTTGATAGCTTTGG
GGACCTGTCCTCTGCCTCTGCTATCATGGGTAACCCTAAGGTGAAGGCCCATGGCAAGAAGGTGATAAAC
GCCTTCAATGATGGCCTGAAACACTTGGACAACCTCAAGGGCACCTTTGCTCATCTGAGTGAACTCCACT
GTGACAAGCTGCATGTGGATCCTGAGAACTTCAGGCTCCTGGGCAACATGATTGTGATTGTGTTGGGCCA
CCACCTGGGCAAGGAATTCTCCCCCTGTGCACAGGCTGCCTTCCAGAAGGTGGTGGCTGGAGTGGCCAGT
GCCCTGGCTCACAAGTACCACTAA

into gorgeous, interactive visualizations like this:

Human Squiggle

(Click the picture to view an interactive version.)

Installation

If you don't have Python 3.5 or greater installed, be sure to get it. To get the current stable version of Squiggle, run:

$ pip install squiggle

Or, alternatively, if you want to get the latest development version:

$ pip install git+https://github.com/Lab41/squiggle.git

Usage

Using Squiggle is as easy as:

$ squiggle your_sequence.fasta

Squiggle has tons of options available to make beautiful, interactive visualizations of DNA sequences. To get a full rundown of the various option, take look at the documentation here.

Citation

Using Squiggle in your research? Please cite it!

  • Lee, B. D. (2018). Squiggle: a user-friendly two-dimensional DNA sequence visualization tool. Bioinformatics. doi:10.1093/bioinformatics/bty807
@article{Lee2018,
  doi = {10.1093/bioinformatics/bty807},
  url = {https://doi.org/10.1093/bioinformatics/bty807},
  year  = {2018},
  month = {sep},
  publisher = {Oxford University Press ({OUP})},
  author = {Benjamin D Lee},
  editor = {John Hancock},
  title = {Squiggle: a user-friendly two-dimensional {DNA} sequence visualization tool},
  journal = {Bioinformatics}
}

squiggle's People

Contributors

benjamin-lee avatar mdshw5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

squiggle's Issues

Use balanced curves for nucleotides

Wouldn't it be better to use curves (i.e., shapes) of equal areas for each of the nucleotides? Right now, A and C have areas of + and - 0.25 units respectively, while G and T have areas of + and - 0.5 units respectively.

In some applications, like data storage in DNA, it is likely that optimal encodings have an equal number of each of the nucleotides, and having balanced representations could make it easier to spot imbalances and thereby compare different encodings visually.

This won't eliminate any of the other benefits stated in the blog post, but I think it will broaden the application of this visualization.

error in examples

Hi,
I have installed squiggle by pip3 but I got this error in running examples:
squiggle ecol.heg.fasta

Visualizing each sequence in black.
0%| | 0/274 [00:00<?, ? seqs/s]BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead
Traceback (most recent call last):
File "/usr/local/bin/squiggle", line 11, in
load_entry_point('squiggle==0.3.1', 'console_scripts', 'squiggle')()
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/squiggle/cli.py", line 223, in visualize
color=seq.color)
File "/usr/local/lib/python3.6/dist-packages/bokeh/plotting/_decorators.py", line 54, in wrapped
return create_renderer(glyphclass, self, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/bokeh/plotting/_renderer.py", line 126, in create_renderer
update_legend(plot, legend_kwarg, glyph_renderer)
File "/usr/local/lib/python3.6/dist-packages/bokeh/plotting/_legends.py", line 56, in update_legend
_LEGEND_KWARG_HANDLERS[kwarg](value, legend, glyph_renderer)
File "/usr/local/lib/python3.6/dist-packages/bokeh/plotting/_legends.py", line 82, in _handle_legend_deprecated
raise ValueError("Bad 'legend' parameter value: %s" % label)
ValueError: Bad 'legend' parameter value: None

The only fasta that I can successfully run is

lcl|NC_000011.10_cds_NP_000509.1_1 [gene=HBB]
ATGGTGCATCTGACTCCTGAGGAGAAGTCTGCCGTTACTGCCCTGTGGGGCAAGGTGAACGTGGATGAAG
TTGGTGGTGAGGCCCTGGGCAGGCTGCTGGTGGTCTACCCTTGGACCCAGAGGTTCTTTGAGTCCTTTGG
GGATCTGTCCACTCCTGATGCTGTTATGGGCAACCCTAAGGTGAAGGCTCATGGCAAGAAAGTGCTCGGT
GCCTTTAGTGATGGCCTGGCTCACCTGGACAACCTCAAGGGCACCTTTGCCACACTGAGTGAGCTGCACT
GTGACAAGCTGCACGTGGATCCTGAGAACTTCAGGCTCCTGGGCAACGTGCTGGTCTGTGTGCTGGCCCA
TCACTTTGGCAAAGAATTCACCCCACCAGTGCAGGCTGCCTATCAGAAAGTGGTGGCTGGTGTGGCTAAT
GCCCTGGCCCACAAGTATCACTAA
lcl|NC_005100.4_cds_NP_150237.1_1 [gene=HBB]
ATGGTGCACCTGACTGATGCTGAGAAGGCTGCTGTTAATGGCCTGTGGGGAAAGGTGAACCCTGATGATG
TTGGTGGCGAGGCCCTGGGCAGGCTGCTGGTTGTCTACCCTTGGACCCAGAGGTACTTTGATAGCTTTGG
GGACCTGTCCTCTGCCTCTGCTATCATGGGTAACCCTAAGGTGAAGGCCCATGGCAAGAAGGTGATAAAC
GCCTTCAATGATGGCCTGAAACACTTGGACAACCTCAAGGGCACCTTTGCTCATCTGAGTGAACTCCACT
GTGACAAGCTGCATGTGGATCCTGAGAACTTCAGGCTCCTGGGCAACATGATTGTGATTGTGTTGGGCCA
CCACCTGGGCAAGGAATTCTCCCCCTGTGCACAGGCTGCCTTCCAGAAGGTGGTGGCTGGAGTGGCCAGT
GCCCTGGCTCACAAGTACCACTAA

Update logo

For simplicity, we'll use the DNAvisualization.org logo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.