# rnautils

> Functionality for manipulating RNA secondary structures

Latest version **0.8.2** (published 2016-02-23) · 0 weekly downloads

## Install

```sh
npm install rnautils
pnpm add rnautils
yarn add rnautils
bun add rnautils
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.2 |
| Published | 2016-02-23 |
| First published | 2016-02-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.12.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | pkerpedjiev |

## Links

- npm: https://www.npmjs.com/package/rnautils
- Repository: https://github.com/pkerpedjiev/rnautils
- Issues: https://github.com/pkerpedjiev/rnautils/issues
- npm.io page: https://npm.io/package/rnautils

## Recent versions

- 0.8.2 (latest) — 2016-02-23
- 0.8.1 — 2016-02-22

## README

# rnautils.js

### ColorScheme

Parse a string containing coloring information and store it in an object.

Example:

```javascript
let cs = new ColorScheme('10:red');
```

The important parts of the returned object will
look like this:

```javascript
{ 
  colorsText: '10:red',
  colorsJson: { '': { '10': 'red' } },
  range: [ 'white', 'steelblue' ],
  domain: [ Infinity, -Infinity ] }
}
```

Another exmaple using continuous colors:

```javascript
let cs = new ColorScheme('1:0.7 2:0.8');
```

Yields...

```javascript
{ 
  colorsText: '1:0.7 2:0.8',
  colorsJson: { '': { '1': 0.7, '2': 0.8 } },
  range: [ 'white', 'steelblue' ],
  domain: [ 0.7, 0.8] }
}
```

Apply colors only to molecules with a particular name:

```javascript
let cs = new ColorScheme('>blah\n 7:orange');
```
...

```javascript
{ 
  colorsText: '>blah\n 7:orange',
  colorsJson: { '': {} 'blah': { '7': orange} },
  range: [ 'white', 'steelblue' ],
  domain: [ Infinity, -Infinity] }
}
```

Specify a domain and a range for continuous values:

```javascript
let cs = new ColorScheme('domain=0:10 range=red:green 1: 0.7 2:0.8');
```
...

```javascript
{ 
  colorsText: '1:0.7 2:0.8',
  colorsJson: { '': { '1': 0.7, '2': 0.8 }},
  range: [ 'red', 'green' ],
  domain: [ '0', '10'] }
}
```

Other examples:

```javascript
let cs = new ColorScheme('1-3:red 4,5:blue');
```

## Development

First:

```
npm install
bower install
```

To debug:

```
gulp serve
```

To build:

```
gulp build
```

The output will be placed in the `dist` directory. To use `rnautils` in a web page, simply include `dist/scripts/rnautils.js` in your web page.

---
_Source: https://npm.io/package/rnautils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
