Biological Sequence in Javascript written in Typescript.
Note: This package is under development and is in alpha. I build it for myself and others, but the functionalities appear as I need them. Please, use it at your own risk.
Note2: That being said, please reach out to contribute, suggest changes and submit issues. Cheers.
Usage
This package can be used by researchers at different levels of programming skills.
Beginner
BioSeqTS provides high-level functionality if you are just starting to play with bioinformatics and just want a library that reads FASTA files for example.
We can easily accomplish that by:
const sequenceData = fs const fu = const bioSeqSet = fu console/*BioSeqSet { set: [ BioSeq { seq: 'AAAACCC', header: 'seq1' }, BioSeq { seq: 'DDDFFFF', header: 'seq2' }, ... ], partitionTable: [ [ 1, 7 ] ] }}*/
But once we load these as BioSeq
objects in a BioSeqSet
, it packs a lot of other goodies.
For example, it is easy to write these sequences again in fasta format:
const fu = const fasta = fu console/*>seq1AAAACCC>seq2DDDFFFF*/
Intermediate
Let's say we want to concatenate several Fasta files. Assuming we already read the file content (string) into an array, let's write a simple function to concatenate the alignment.
; const concatMultipleFasta = ListOfRawSequencesInFasta: string: { const seqRefRaw = ListOfRawSequencesInFasta; const fastaU = ; let concatenated = fastaU; ListOfRawSequencesInFasta; return fastaU;}; /*This function returns a fasta formatted string with the concatenated alignment keeping the header of the first file.*/
Advanced
TODO
Install
npm install bioseq-ts
Developer's Documentation
If you even more curious about the logic behind some of the choices we made here, please check it out the dev README
... to be continued.
Written with ❤ in Typescript.