0.7.13-0 • Published 4 years ago
mist3-ts v0.7.13-0
mist3-ts
Under construction package, it shouldn't be really published yet.
Install
npm install mist3-ts
Usage
Class: Genomes
fetchDetails()
const version = 'GCF_000005845.2'
const genome = new Genome(version)
const details = genome.details()
fetchAllGenes()
const version = 'GCF_000005845.2'
const genome = new Genome(version)
const allGenes = genome.fetchAllGenes()
fetchChemotaxis()
const version = 'GCF_000005845.2'
const genome = new Genome(version)
const chemotaxis = genome.fetchChemotaxis()
Class: Genes
fetchByIds()
const genes = new Genes(version)
const geneIds = '29096360,29096359'
const allGenes = genes.fetchByIds(geneIds)
fetchByAnyField()
const genes = new Genes(version)
const locus = 'VC0395_RS19590'
const allGenes = genes.fetchByAnyField(locus)
Class: Taxonomy
getParents()
const taxonomy = new Taxonomy()
const taxid = 362
const parents = taxonomy.getParents(taxid)
Class: Aseq
const aseq = new Aseq(version)
const aseqId = '6C4cMS5Ty-EVszF-Jh-nHA'
const seqInfo = aseq.fetch(aseqId)
Class: GenomeStream
Experimental stream wrap around Genome
class.
import { GenomeStream } from 'mist3-ts';
import through2 from 'through2';
const sink = through2.obj((chunk, enc, next) => {
next();
});
const version = 'GCF_002996345.1';
const gStream = new GenomeStream(100, logLevel)
const genes = []
const startPage = 11
gStream.fetchAllGenes(version, startPage).then(s => {
s.on('data', gene => {
// do something with genes
})
s.on('end', () => {
// All done
})
s.pipe(sink)
})
Alternative URL
MiST3-TS accepts the address of an alternative MiST3 API URL
Example:
const version = 'GCF_000005845.2'
const localApi = 'http://localhost:5000/v1'
const genome = new Genome(version, localApi)
const details = genome.details()
Documentation
...to be continued.
Written with ❤ in Typescript.
0.7.13-0
4 years ago
0.7.12-0
4 years ago
0.7.11-0
4 years ago
0.7.10-1
4 years ago
0.7.9-0
4 years ago
0.7.8-0
4 years ago
0.7.7-0
4 years ago
0.7.6-0
4 years ago
0.7.5-0
4 years ago
0.7.4-1
4 years ago
0.7.3-0
5 years ago
0.7.2-0
5 years ago
0.7.1-0
5 years ago
0.7.0-0
5 years ago
0.6.1-1
5 years ago
0.6.1-0
5 years ago
0.6.0-0
5 years ago
0.5.0-0
5 years ago
0.4.0-0
5 years ago
0.3.2-0
5 years ago
0.3.1-0
5 years ago
0.3.0-1
5 years ago
0.3.0-0
5 years ago
0.2.0-0
5 years ago
0.1.0-1
5 years ago
0.1.0-0
5 years ago
0.0.3-0
5 years ago
0.0.2
5 years ago