{"_id":"@burkov/fornac","_rev":"1-0f4b6a629a99b030e1b6587c08234c19","name":"@burkov/fornac","dist-tags":{"latest":"1.1.10"},"versions":{"1.1.10":{"name":"@burkov/fornac","version":"1.1.10","description":"An RNA secondary structure display component","main":"dist/scripts/fornac.js","repository":{"type":"git","url":"git+https://github.com/BurkovBA/fornac.git"},"engines":{"node":">=0.12.0"},"devDependencies":{"babel-core":"^6.4.0","babel-eslint":"~4.1.8","babel-loader":"^6.2.2","babel-preset-es2015":"~6.3.13","browser-sync":"^2.2.1","css-loader":"~0.23.1","del":"^1.1.1","es6-promise":"^3.1.2","eslint-plugin-react":"~3.16.1","gulp":"^3.9.0","gulp-autoprefixer":"^3.0.1","gulp-babel":"^6.1.1","gulp-cache":"^0.2.8","gulp-cssnano":"^2.0.0","gulp-debug":"~2.1.2","gulp-eslint":"^0.13.2","gulp-htmlmin":"^1.3.0","gulp-if":"^1.2.5","gulp-imagemin":"^2.2.1","gulp-load-plugins":"^0.10.0","gulp-plumber":"^1.0.1","gulp-size":"^1.2.1","gulp-sourcemaps":"^1.5.0","gulp-uglify":"~1.5.2","gulp-useref":"^3.0.0","jquery":"~2.2.0","main-bower-files":"^2.5.0","style-loader":"~0.13.0","webpack-stream":"^3.1.0","wiredep":"^2.2.2","rnautils":"~0.8.1","gulp-jasmine":"~2.3.0"},"eslintConfig":{"env":{"es6":true,"node":true,"browser":true},"rules":{"quotes":[2,"single"]}},"dependencies":{"d3":"~3.5.13","jquery":"~2.2.0"},"gitHead":"76de96564507efa473b37be155d145be052e7a0b","bugs":{"url":"https://github.com/BurkovBA/fornac/issues"},"homepage":"https://github.com/BurkovBA/fornac#readme","_id":"@burkov/fornac@1.1.10","_npmVersion":"5.5.1","_nodeVersion":"9.1.0","_npmUser":{"name":"burkov","email":"vasjaforutube@gmail.com"},"dist":{"integrity":"sha512-G6w7hFrOL3v0jCXQSZnWlWk7dwBR1SoNlL+nQJHw3li4KkjMgW7bPeVWiL80+hllTaQeXWQssOS9wllIrG+qnQ==","shasum":"623ebabfd72a7fbd00e81aaf0156ee8476cf94ce","tarball":"https://registry.npmjs.org/@burkov/fornac/-/fornac-1.1.10.tgz","fileCount":53,"unpackedSize":1242431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa6HLDCRA9TVsSAnZWagAALMgP/2No3DzYVcba/I/3EPvM\n/KlcBKPP5Zkoa3BwiEgC+K7SE9G8DZtPjArmow3WBhNzgMHpMaYbJFGNxHmv\n25h2aOwaMDVizmCUZRMzEy77JTcGtsqRKn2FouvdFXcNbsQMRDADRTeJPcv0\nZfnTqfa4p8AXjO4K7QpkWxbzPIttPRHD8CM0a+faF1bDiHB4Ar6AUpRKRTRv\nyDoLMPBLNktZopKl/YNMuhDVcRd1pPMbBs9vKWJAi1dcJvjWbeaZ5QgfXmiw\nDxFeVEQQnLgJDkcZWnvAcAvyux3jRMRnTepCM22Eg77jzu3MWmW+jdK8nIws\nvb2FuuWAzXm1aD388XCkHxy7vsjVXceaVqDj/KPHpwD5/rqnXkrA+ud7dRSx\nx18+cG+0PzTprw51Pdsh5MohtIeX7zRFQf7Kn7Or9gErrxSEd9GvRcaQbeI0\nvFm9ZFFTfpGSPxME8GRrUCIsdsNLUtkoUuBZ5NdqqF0+7P4nEvDFLR13aE+7\n6M5CRHhDA6mU7R4dxkzLRqVbXRr3yG7bAa5oIoYzAqRfgyJRaVuPkPJt8spP\nywd8Fg537ykmONI/vKdqaX8NLSMZjp0bsHh6W8Y09w53PxyWjq/Hm/barlBm\nEc4B5LLQkN4x75TbWWefTHIJBoPNg3CFnZzHWWnx1/QFBmDFu4C43EKdVhZr\nMduS\r\n=qS1h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXpW1pmzigavWZogWV60lwpqTXImC1dDHIHWG2L/EVvgIgC0bfgvH8N7yJRDCqrVuaxjupJApXLtjcN93zFA6ODRk="}]},"maintainers":[{"name":"burkov","email":"vasjaforutube@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fornac_1.1.10_1525183169331_0.4288453048440608"},"_hasShrinkwrap":false}},"time":{"created":"2018-05-01T13:59:29.260Z","1.1.10":"2018-05-01T13:59:29.451Z","modified":"2022-04-04T21:07:31.907Z"},"maintainers":[{"name":"burkov","email":"vasjaforutube@gmail.com"}],"description":"An RNA secondary structure display component","homepage":"https://github.com/BurkovBA/fornac#readme","repository":{"type":"git","url":"git+https://github.com/BurkovBA/fornac.git"},"bugs":{"url":"https://github.com/BurkovBA/fornac/issues"},"readme":"# FornaContainer\n\nIn many situations, the user interaction is superfluous and the desired goal is\nto simply display a secondary structure on a web page. This is a common\nscenario in, for example, servers that predict a secondary structure. The\noutput, a dot-bracket string can simply be added to a `FornaContainer` object\nto display.\n\n## Trivial Example\n\nBelow is an example of a simple web page which uses a `FornaContainer` to show\na simple RNA molecule:\n\n![blah blah](https://raw.githubusercontent.com/pkerpedjiev/fornac/develop/doc/img/forna-container-screenshot.png \"An example of the FornaContainer\")\n\nThe code for creating this web page is rather straightforward. After importing\nsome necessary javascript files, we create a container using `new\nFornaContainer(\"#rna_ss\", {'applyForce': false})`, passing in `#rna_ss` as the\nid of the `div` which will hold the container and then populate it with a\nstructure and sequence using `container.addRNA`:\n\n```html\n<!DOCTYPE html>\n<meta charset=\"utf-8\">\n\nThis is an RNA container.\n<div id='rna_ss'> </div>\nThis after the RNA container.\n\n    <link rel='stylesheet' type='text/css' href='styles/fornac.css' />\n    <script type='text/javascript' src='scripts/fornac.js'></script>\n    <script type='text/javascript'>\n        var container = new FornaContainer(\"#rna_ss\", {'applyForce': false});\n\n        var options = {'structure': '((..((....)).(((....))).))',\n                        'sequence': 'CGCUUCAUAUAAUCCUAAUGACCUAU'\n        };\n\n        container.addRNA(options.structure, options);\n    </script>\n```\n\n### Cofolded sequences\n\nDisplay two cofolded sequences using the format of [RNAcofold](http://rna.tbi.univie.ac.at/cgi-bin/RNAcofold.cgi):\n\n![Cofolded sequences](https://raw.githubusercontent.com/pkerpedjiev/fornac/master/doc/img/cofold_example.png \"An example of cofolded sequences displayed using the FornaContainer\")\n\n```javascript\n    var container = new fornac.FornaContainer(\"#cofold_ss\",\n            {'applyForce': false, 'allowPanningAndZooming': true, 'initialSize':[500,300]});\n                                                     \n    var options = {'structure': '..((((...))))...((...((...((..&............))...))...))..',\n        'sequence': 'ACGAUCAGAGAUCAGAGCAUACGACAGCAG&ACGAAAAAAAGAGCAUACGACAGCAG'\n    };                                                                                     \n    container.addRNA(options.structure, options);\n    container.setSize(); \n```\n\n## Options\n\nThe `FornaContainer` supports a number of options to allow users to customize how the RNA will be presented.\n\n### applyForce\n\nIndicate whether the force-directed layout will be applied to the displayed\nmolecule. Enabling this option allows users to change the layout of the\nmolecule by selecting and dragging the individual nucleotide nodes\n\n### allowPanningAndZooming [default=true]\n\nAllow users to zoom in and pan the display. If this is enabled then pressing\nthe 'c' key on the keyboard will center the view.\n\n### circularizeExternal [default=true]\n\nThis only makes sense in connection with the `applyForce` argument. If it's\ntrue, the external loops will be arranged in a nice circle. If false, they will\nbe allowed to flop around as the force layout dictates:\n\n<img src=\"https://github.com/pkerpedjiev/fornac/blob/master/doc/img/uncircularized_exterior.png\" width=200 align=center />\n\n### labelInterval [default=10]\n\nChange how often nucleotide numbers are labelled with their number.\n\n\n## Implementation\n\nEach RNA molecule is represented as a JSON file which encodes all of the\ninformation necessary to display it. The example shows a trivial and slightly\nmodified example. `nodeType` can be either `nucleotide` or `label` or `middle`,\nthe latter of which is used only as a placeholder for maintaining an aesthetically\npleasing layout.\n\nThe links can be any of `basepair` (representing a basepair between two\nnucleotides), `backbone` (backbone bond between adjacent nodes), `pseudoknot`\n(pseudoknot, extracted from the specified structure using maximum matching\nalgorithm), `extra` (extra links specified by the user), `label_link` (links\nbetween nucleotides and their nucleotide number labels), `fake` (invisible\nlinks for maintaining the layout),  and `fake_fake` (invisible links for\nmaintaining the layout).\n\nThis structure is initially created in `rnagraph.js` starting from a sequence\nand dotbracket string.\n\n```\n{\n  \"nodes\": \n    [ {\n      \"name\": \"A\",\n      \"num\": 1,\n      \"radius\": 5,\n      \"rna\": null,\n      \"nodeType\": \"nucleotide\",\n      \"structName\": \"empty\",\n      \"elemType\": \"e\",\n      \"uid\": \"44edb966-aca9-4058-a6bc-784a34959329\",\n      \"linked\": false,\n      \"prevNode\": null,\n      \"nextNode\": null,\n      \"x\": 100,\n      \"px\": 100,\n      \"y\": 100,\n      \"py\": 100\n    },\n    ...\n    ],\n  \"links\": \n    [ {\n      \"source\": null,\n      \"target\": null,\n      \"linkType\": \"basepair\",\n      \"value\": 1,\n      \"uid\": \"6664a569-5af1-4d86-8ada-d1c00da72a899f87a224-52a0-4ede-a29c-04fddc09e4c4\"\n      },\n      ...\n    ]\n}\n```\n\n\n## Development\n\nFirst:\n\n```\nnpm install\nbower install\n```\n\nTo debug:\n\n```\ngulp serve\n```\n\nTo build:\n\n```\ngulp build\n```\n\nThe output will be placed in the `dist` directory. To use `fornac` in a web page, simply include `dist/scripts/fornac.js` in your web page.\n\n## Acknowledgements\n\nThanks to [Benedikt Rauscher](https://github.com/bene200) for the Javascript\nversion of the NAView layout and to the creators of\n[VARNA](http://varna.lri.fr/) for the java implementation that it's based on.\n","readmeFilename":"README.md"}