Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

blosum

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blosum - npm Package Compare versions

Comparing version
1.1.0
to
1.1.1
+4
-3
PKG-INFO
Metadata-Version: 2.1
Name: blosum
Version: 1.1.0
Version: 1.1.1
Summary: A simple BLOSUM toolbox without dependencies.

@@ -39,3 +39,3 @@ Home-page: https://github.com/not-a-feature/blosum

### Default BLOSUM
This package comes with the most commonly used BLOSUM matrices built in.
This package provides with the commonly used BLOSUM matrices.
You can choose from BLOSUM 45, 50, 62, 80 and 90.

@@ -60,3 +60,4 @@

```
# One Header Line
# Comments should start with #
# Each value should be seperated by one or many whitespace
A R N D

@@ -63,0 +64,0 @@ A 5 -2 -1 -2

@@ -32,3 +32,3 @@ ![blosum](https://github.com/not-a-feature/blosum/raw/main/blosum.png)

### Default BLOSUM
This package comes with the most commonly used BLOSUM matrices built in.
This package provides with the commonly used BLOSUM matrices.
You can choose from BLOSUM 45, 50, 62, 80 and 90.

@@ -53,3 +53,4 @@

```
# One Header Line
# Comments should start with #
# Each value should be seperated by one or many whitespace
A R N D

@@ -56,0 +57,0 @@ A 5 -2 -1 -2

[metadata]
name = blosum
version = 1.1.0
version = 1.1.1
description = A simple BLOSUM toolbox without dependencies.

@@ -5,0 +5,0 @@ long_description = file: README.md

Metadata-Version: 2.1
Name: blosum
Version: 1.1.0
Version: 1.1.1
Summary: A simple BLOSUM toolbox without dependencies.

@@ -39,3 +39,3 @@ Home-page: https://github.com/not-a-feature/blosum

### Default BLOSUM
This package comes with the most commonly used BLOSUM matrices built in.
This package provides with the commonly used BLOSUM matrices.
You can choose from BLOSUM 45, 50, 62, 80 and 90.

@@ -60,3 +60,4 @@

```
# One Header Line
# Comments should start with #
# Each value should be seperated by one or many whitespace
A R N D

@@ -63,0 +64,0 @@ A 5 -2 -1 -2

@@ -30,3 +30,2 @@ """

https://www.ncbi.nlm.nih.gov/IEB/ToolBox/C_DOC/lxr/source/data/BLOSUM62
"""

@@ -63,26 +62,28 @@

# Skip header line
content = content[1:]
blosumDict = {}
# Extract labels
labels = content[0]
labelslist = labels.split()
header = True
for line in content:
line = line.strip()
# Check if quadratic
if not len(labelslist) == len(content)-1:
raise EOFError("Blosum file is not quadratic.")
# Skip comments starting with #
if line.startswith("#"):
continue
# Check if all AA are covered
if not len(labelslist) == 25:
warn(UserWarning("Blosum matrix may not cover all amino-acids"))
linelist = line.split()
# Skip label line
content = content[1:]
# Extract labels only once
if header:
labelslist = linelist
header = False
blosumDict = {}
# For each line
for line in content:
linelist = line.split()
if len(linelist) < 0:
break
# Check if all AA are covered
if not len(labelslist) == 25:
warn(UserWarning("Blosum matrix may not cover all amino-acids"))
continue
if not len(linelist) == len(labelslist) + 1:
# Check if line has as may entries as labels
raise EOFError("Blosum file is missing values.")
# Add Line/Label combination to dict

@@ -92,2 +93,5 @@ for index, lab in enumerate(labelslist, start=1):

# Check quadratic
if not len(blosumDict) == len(labelslist)**2:
raise EOFError("Blosum file is not quadratic.")
self.matrix = blosumDict

@@ -94,0 +98,0 @@