{"id":13690252,"url":"https://github.com/sacdallago/protein","last_synced_at":"2025-08-07T20:54:16.972Z","repository":{"id":65476026,"uuid":"110270270","full_name":"sacdallago/protein","owner":"sacdallago","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-09T08:41:27.000Z","size":1709,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T01:59:57.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://christian.dallago.us/protein","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sacdallago.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-10T16:48:57.000Z","updated_at":"2020-04-09T08:41:30.000Z","dependencies_parsed_at":"2023-01-25T15:01:12.192Z","dependency_job_id":null,"html_url":"https://github.com/sacdallago/protein","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sacdallago%2Fprotein","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sacdallago%2Fprotein/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sacdallago%2Fprotein/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sacdallago%2Fprotein/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sacdallago","download_url":"https://codeload.github.com/sacdallago/protein/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998721,"owners_count":21678007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T16:00:50.797Z","updated_at":"2025-05-02T06:32:25.755Z","avatar_url":"https://github.com/sacdallago.png","language":"JavaScript","funding_links":[],"categories":["Biology"],"sub_categories":[],"readme":"# Protein\n***\n\n## How to use\nRequire this package via npm, then:\n\n1. In a node application:\n    ```javascript\n    const Protein = require('protein');\n\n    let testText = \"ABBABABABABABABA\";\n\n    let parsingFunction = Protein.autodetect(testText);\n\n    if(parsingFunction !== undefined){\n        parsingFunction(testText)\n            .then(([proteins, _]) =\u003e {\n                proteins.forEach(p =\u003e console.log(p));\n            });\n    }\n    ```\n\n2. For use in web pages\n    ```html\n    \u003cscript src=\"path/to/build/protein-browser.js\"\u003e\u003c/script\u003e\n\n    \u003cscript\u003e\n         Protein.fromAccession(\"P12345\")\n                 .then(([proteins, raw]) =\u003e {\n                     var retrievedProtein = proteins[0];\n                     createElement(JSON.stringify(retrievedProtein));\n                 })\n                 .catch(() =\u003e {\n                     console.error(\"could not GET protein by accession\");\n                 });\n    \u003c/script\u003e\n    ```\n\n3. Use non-transpiled methods (e.g. React)\n    ```javascript\n    import { fromAccession } from 'protein/lib/browser';\n\n\n    Protein.fromAccession(\"P12345\")\n        .then(([proteins, raw]) =\u003e {\n            var retrievedProtein = proteins[0];\n            createElement(JSON.stringify(retrievedProtein));\n        })\n        .catch(() =\u003e {\n            console.error(\"could not GET protein by accession\");\n        });\n    ```\n\nYou can refer to the `examples` folder for complete examples and the `docs` for documentation.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsacdallago%2Fprotein","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsacdallago%2Fprotein","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsacdallago%2Fprotein/lists"}