{"_id":"@bighatbio/stat.seqs","_rev":"3-512fdf24be172d3416f044b6a7099b12","name":"@bighatbio/stat.seqs","dist-tags":{"latest":"0.1.22"},"versions":{"0.1.21":{"name":"@bighatbio/stat.seqs","description":"A module to analyze multiple seqs (information content, frequency, ...)","version":"0.1.21","homepage":"https://github.com/BigHat-Biosciences/stat.seqs","author":{"name":"bighat","email":"infotech-admin@bighatbio.com"},"repository":{"type":"git","url":"git://github.com/BigHat-Biosciences/stat.seqs.git"},"bugs":{"url":"https://github.com/BigHat-Biosciences/stat.seqs/issues"},"licenses":[{"type":"MIT","url":"https://github.com/BigHat-Biosciences/stat.seqs/blob/master/LICENSE"}],"main":"lib/index.js","scripts":{"test":"gulp test","prepublish":"gulp","watch":"gulp watch"},"dependencies":{"biojs-events":"0.0.4","underscore":"^1.7.0"},"devDependencies":{"chai":"^1.9.1","del":"^0.1.3","gulp":"^3.9.1","gulp-mocha":"^1.0.0","gulp-watch":"^1.0.2","mkdirp":"^0.5.0","mocha":"~1.20.1"},"keywords":["seqs","msa","entropy","information content","biojs"],"gitHead":"0e11ceb463e376717062861a0650767de2a38888","_id":"@bighatbio/stat.seqs@0.1.21","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7BoETft72upegdlWfSukZKPKdC+8c8y29C4VPt5I1XjLR9DrTm1RmhUrXVJtx81BAlIi0IGFLQtMoGce6JnOfQ==","shasum":"fd0a9125b9efd1837613acc6469afd231715cd17","tarball":"https://registry.npmjs.org/@bighatbio/stat.seqs/-/stat.seqs-0.1.21.tgz","fileCount":11,"unpackedSize":30749,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzbW5kH8WkJ1i4+bcRU7Tf2emp4z0rJaVognZkOuIK8QIgcprG99dmOZd7f/RgsQBCIki6RIoFBriBlTznTPn50R4="}]},"_npmUser":{"name":"bighat","email":"infotech-admin@bighatbio.com"},"directories":{},"maintainers":[{"name":"bighat","email":"infotech-admin@bighatbio.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stat.seqs_0.1.21_1634571660212_0.2747067734012496"},"_hasShrinkwrap":false},"0.1.22":{"name":"@bighatbio/stat.seqs","description":"A module to analyze multiple seqs (information content, frequency, ...)","version":"0.1.22","homepage":"https://github.com/BigHat-Biosciences/stat.seqs","author":{"name":"bighat","email":"infotech-admin@bighatbio.com"},"repository":{"type":"git","url":"git://github.com/BigHat-Biosciences/stat.seqs.git"},"bugs":{"url":"https://github.com/BigHat-Biosciences/stat.seqs/issues"},"licenses":[{"type":"MIT","url":"https://github.com/BigHat-Biosciences/stat.seqs/blob/master/LICENSE"}],"main":"lib/index.js","scripts":{"test":"gulp test","prepublish":"gulp","watch":"gulp watch"},"dependencies":{"biojs-events":"0.0.4","underscore":"^1.7.0"},"devDependencies":{"chai":"^1.9.1","del":"^0.1.3","gulp":"^3.9.1","gulp-mocha":"^1.0.0","gulp-watch":"^1.0.2","mkdirp":"^0.5.0","mocha":"~1.20.1"},"keywords":["seqs","msa","entropy","information content","biojs"],"gitHead":"0e11ceb463e376717062861a0650767de2a38888","_id":"@bighatbio/stat.seqs@0.1.22","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-KSroiCcgHaiB/Om/p/92T1puDNCQSNoH9Tqf5aCoacOdkkPsmC8sqTIVeLFrBA5ghy8N848eDBl8/o1X2sKNgw==","shasum":"ba0e6060ce66c214d074db6db77505a3883e387a","tarball":"https://registry.npmjs.org/@bighatbio/stat.seqs/-/stat.seqs-0.1.22.tgz","fileCount":11,"unpackedSize":30749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzHueCRA9TVsSAnZWagAAIa0QAITw3EaxtcxxPg8FbxAD\nnj4eA9Xzbj6LMuhhUUW8mGvOqIVkDN5e/L4BgJ+aoTA58W3s9JgeJ6fExUVr\nlKKvPCt1Y6JJka86gpkGjjnEY8YMc6/SmlTv6K+hy6YLRbztTUsRPCyrwPeT\nHP8tob+lNh6fG0eZCm3rN6kjDoHXG5BMEtZY5UCqyvLeHfmWB92/on7IYYCD\nDIEtyyCE7GN+NOGNUDg2W+psSv7gES5BLN7eOsE/C7kqIKA2L/oUl5Qq2AHV\nemr614wluPjwWUq31DOWruqJXupxVCySFcMsWzXwnDyTM4JVBpwUukOufNsy\nMhSvQ4pQPJQvLgqJnGDDgw0wbplRatoiOulqLoGiyA97ao5usNTrznz5GwNu\nXa7W9eCfM2YsKBEcFF8BaypYdOS9cNHTbv2ryhXcsi4YH+wE8a5bozswhqOm\nqcfe8nDJ/1HXmHttATZWcz6Yy9T6iUGMQiWUjC9z8pN7tJjqtcnz3uiwvTcd\nvPV+V6rpA2reyTyvrJutwZ+k3FqvFrlWzNITk9s0m3qb1g7vp2C03dKLvKAK\nHD1l1yLTe1XdhLVMMltLP+rz3WV3VRPOfRh2lCfxHCLIHvpWfLw3g6VCmRCx\nsCHyVUeHxIhh5Qo7opsBxIVyJhTwK1/0vybGocN2mNOYGMPvrlseX0GAkbA1\nO+Lg\r\n=GisH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOOPVcgE3L88DR0E76FKPtKl0avgaoKL/rjeH3GNC/VwIhAL+EVhNpI6DVn+JYi92DEN6jiFQ8XHkaUFJFgIogF7xa"}]},"_npmUser":{"name":"bighat","email":"infotech-admin@bighatbio.com"},"directories":{},"maintainers":[{"name":"bighat","email":"infotech-admin@bighatbio.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stat.seqs_0.1.22_1634571885417_0.8882502322082426"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-18T15:41:00.151Z","0.1.21":"2021-10-18T15:41:00.356Z","modified":"2022-04-04T18:46:19.679Z","0.1.22":"2021-10-18T15:44:45.585Z"},"maintainers":[{"name":"bighat","email":"infotech-admin@bighatbio.com"}],"description":"A module to analyze multiple seqs (information content, frequency, ...)","homepage":"https://github.com/BigHat-Biosciences/stat.seqs","keywords":["seqs","msa","entropy","information content","biojs"],"repository":{"type":"git","url":"git://github.com/BigHat-Biosciences/stat.seqs.git"},"author":{"name":"bighat","email":"infotech-admin@bighatbio.com"},"bugs":{"url":"https://github.com/BigHat-Biosciences/stat.seqs/issues"},"readme":"# stat.seqs\n\n[![NPM version](http://img.shields.io/npm/v/stat.seqs.svg)](https://www.npmjs.org/package/stat.seqs) \n[![Build Status](https://secure.travis-ci.org/greenify/stat.seqs.png?branch=master)](http://travis-ci.org/greenify/stat.seqs) \n\n> A module to analyze multiple seqs (information content, frequency, ...)\n\n## Getting Started\nInstall the module with: `npm install stat.seqs`\n\n```javascript\nvar MSAStats = require('stat.seqs');\nvar seqs = [\"AACG\", \"CACG\", \"AAGC\", \"CAAG\"];\nvar stats = MSAStats(seqs);\n```\n\nAll operations are cached, but they will be calculated again if you change the sequences.\n\n## Operations\n\n### Frequency\n\n```\nstats.frequency() // calculates the relative frequency of a base at a given position\n> [ { A: 0.5, C: 0.5 },\n  { A: 1 },\n  { C: 0.5, G: 0.25, A: 0.25 },\n  { C: 0.25, G: 0.75 } ]\n```\n\n### Sequence identity and consensus\n\n```\nstats.consensus() // calculates the consensus\n> \"AACG\"\n\nstats.identity() // identity to the consensus seq\n> [ 1, 0.75, 0.5, 0.5 ]\n\nstats.identity(\"AAAA\") // identity to the given seq\n> [ 0.5, 0.25, 0.5, 0.5 ]\n```\n\n\n### Background distribution\n\n```\nstats.background() // calculates the background distribution of all seqs\n> { A: 0.4375, C: 0.3125, G: 0.25 }\n\nstats.bg = {A: 0.25, C: 0.25, G: 0.25, T: 0.25} // set your own background distribution\n\nstats.useBackground(); // use background distribution in anlysis\n```\n\n### Information content (entropy) and conservation\n\n```\nstats.ic() // calculates the information content\n> [ 1, 0, 1.5, 0.81 ]\n\n// change your alphabet\nstats.setDNA(); // default\nstats.setProtein();\nstats.alphabetSize = 21; // your own size\n\n// now you can scale the information content \nstats.scale(stats.ic());\n> [ 0.5, 0, 0.75, 0.41 ]\n\nstats.conservation() // needs an alphabetSize!\n> [ 1, 2, 0.5, 1.19 ]\nstats.scale(stats.conservation()) // scale conservation \n> [ 0.5, 1, 0.25, 0.59 ]\n\nstats.conservResidue() // calculate conservation per residue\n> [ { A: 0.5, C: 0.5 },\n  { A: 2 },\n  { C: 0.25, G: 0.13, A: 0.13 },\n  { G: 0.89, C: 0.3 } ]\n\nstats.conservResidue({scaled: true}) \n> [ { A: 0.25, C: 0.25 },\n  { A: 1 },\n  { C: 0.13, G: 0.06, A: 0.06 },\n  { G: 0.45, C: 0.15 } ]\n```\n\nScale and conservation require a set `alphabetSize` (default 4);\n\n\n### Conservation with a background distribution\n\n(work in progress)\n\n```\nstats.useBackground(); // by default from all letters\n\nstats.ic() // calculates the information content\nstats.scale(stats.ic());\n\nstats.conservation(\n\nstats.scale(stats.conservation())\n\nstats.conservResidue() \n\nstats.conservResidue({scaled: true}) \n```\n\n### Trivial analysis\n\n```\nstats.maxLength() \n> 4\nstats.gaps() // relative percentage of gaps for a column\n> [0, 0, 0, 0]\n```\n\n### Operate with the sequences\n\n```\nstats.addSeq(\"AAA\")\nstats.addSeqs([\"AAA\", \"AAB\"])\nstats.resetSeqs([\"AAA\", \"AAB\"])\nstats.removeSeq(\"AAA\")\nstats.removeSeq(2) // you can also use indexes\n```\n\n## Contributing\n\nPlease submit all issues and pull requests to the [greenify/stat.seqs](http://github.com/greenify/stat.seqs) repository!\n\n## Support\n\nIf you have any problem or suggestion please open an issue [here](https://github.com/greenify/stat.seqs/issues).\n\n## License \n\nThe MIT License\n\nCopyright (c) 2014, greenify\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"README.md"}