pssh-parser
v0.1.51
Published
A simple pssh parser
Downloads
14
Maintainers
Readme
pssh-parser
A simple JS pssh parser
How to use
Require this package via npm, download pssh.js
or pssh.min.js
, then:
const psshParser = require('pssh-parser');
IMPORTANT: This package uses Destructuring assignments. These are supported out of the box only starting with Node V6. You can check compatibility through this table.
After that you can use the following functions:
Parse PSSH text file entry.
const fs = require('fs');
fs.readFile(psshFile.path, 'utf8', function (error, data) {
var entries = psshParser.parsePSSH2file(data);
}
The entries
variable will be an array of the form:
[
{
protein_sequence_hash: "abcdef123",
PDB_chain_hash: "abcdef123",
Repeat_domains: "1",
E_value: "1E2",
Identity_Score: "0.2",
Match_length: "123",
Alignment: "1:30"
}, ...
]