Skip to content

Commit

Permalink
temporarily add pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Feb 27, 2024
1 parent 2d11a0e commit 59fc866
Show file tree
Hide file tree
Showing 8 changed files with 761 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
41 changes: 41 additions & 0 deletions pkg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<meta charset="utf-8"/>

# sourmash

🦀
[![](https://img.shields.io/crates/v/sourmash.svg)](https://crates.io/crates/sourmash)
[![Rust API Documentation on docs.rs](https://docs.rs/sourmash/badge.svg)](https://docs.rs/sourmash)
[![build-status]][github-actions]
[![codecov](https://codecov.io/gh/sourmash-bio/sourmash/branch/latest/graph/badge.svg)](https://codecov.io/gh/sourmash-bio/sourmash)
<a href="https://github.com/sourmash-bio/sourmash/blob/latest/LICENSE"><img alt="License: 3-Clause BSD" src="https://img.shields.io/badge/License-BSD%203--Clause-blue.svg"></a>

[build-status]: https://github.com/sourmash-bio/sourmash/workflows/Rust%20checks/badge.svg
[github-actions]: https://github.com/sourmash-bio/sourmash/actions?query=workflow%3A%22Rust+checks%22

----

Compute MinHash signatures for nucleotide (DNA/RNA) and protein sequences.

This is the core library used by sourmash. It exposes a C API that can be
called from FFI in other languages, and it is how we use it in Python for
building the sourmash application (CLI and Python API).

----

sourmash is a product of the
[Lab for Data-Intensive Biology](http://ivory.idyll.org/lab/) at the
[UC Davis School of Veterinary Medicine](http://www.vetmed.ucdavis.edu).

## Support

Please ask questions and files issues
[on Github](https://github.com/sourmash-bio/sourmash/issues).

## Development

Development happens on github at
[sourmash-bio/sourmash](https://github.com/sourmash-bio/sourmash).

## Minimum supported Rust version

Currently the minimum supported Rust version is 1.65.0.
29 changes: 29 additions & 0 deletions pkg/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "sourmash",
"collaborators": [
"Luiz Irber <luiz.irber@gmail.com>"
],
"description": "MinHash sketches for genomic data",
"version": "0.13.0",
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/sourmash-bio/sourmash"
},
"files": [
"sourmash_bg.wasm",
"sourmash.js",
"sourmash_bg.js",
"sourmash.d.ts"
],
"module": "sourmash.js",
"types": "sourmash.d.ts",
"sideEffects": [
"./sourmash.js",
"./snippets/*"
],
"keywords": [
"minhash",
"bioinformatics"
]
}
92 changes: 92 additions & 0 deletions pkg/sourmash.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* tslint:disable */
/* eslint-disable */
/**
*/
export class ComputeParameters {
free(): void;
/**
*/
constructor();
/**
* @param {Uint32Array} ksizes
*/
set_ksizes(ksizes: Uint32Array): void;
/**
* @param {number} scaled
*/
set_scaled(scaled: number): void;
/**
* @param {number} num
*/
set_num(num: number): void;
/**
* @param {boolean} is_protein
*/
set_protein(is_protein: boolean): void;
/**
* @param {boolean} dayhoff
*/
set_dayhoff(dayhoff: boolean): void;
/**
* @param {boolean} hp
*/
set_hp(hp: boolean): void;
/**
* @param {boolean} track
*/
set_track_abundance(track: boolean): void;
/**
* @param {number} seed
*/
set_seed(seed: number): void;
}
/**
*/
export class KmerMinHash {
free(): void;
/**
* @param {number} num
* @param {number} ksize
* @param {boolean} is_protein
* @param {boolean} dayhoff
* @param {boolean} hp
* @param {number} seed
* @param {number} scaled
* @param {boolean} track_abundance
*/
constructor(num: number, ksize: number, is_protein: boolean, dayhoff: boolean, hp: boolean, seed: number, scaled: number, track_abundance: boolean);
/**
* @param {string} buf
*/
add_sequence_js(buf: string): void;
/**
* @returns {string}
*/
to_json(): string;
}
/**
*/
export class Signature {
free(): void;
/**
* @param {ComputeParameters} params
*/
constructor(params: ComputeParameters);
/**
* @param {string} buf
*/
add_sequence_js(buf: string): void;
/**
* @param {File} fp
* @param {Function | undefined} [callback]
*/
add_from_file(fp: File, callback?: Function): void;
/**
* @returns {string}
*/
to_json(): string;
/**
* @returns {number}
*/
size(): number;
}
4 changes: 4 additions & 0 deletions pkg/sourmash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as wasm from "./sourmash_bg.wasm";
import { __wbg_set_wasm } from "./sourmash_bg.js";
__wbg_set_wasm(wasm);
export * from "./sourmash_bg.js";
Loading

0 comments on commit 59fc866

Please sign in to comment.