-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding a umd example to the readme and updating the validation functi…
…on slightly
- Loading branch information
Showing
3 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<html> | ||
<head> | ||
<script src="https://unpkg.com/bio-parsers/umd/bio-parsers.js"></script> | ||
<!-- you can also specify a version: <script src="https://unpkg.com/bio-parsers@8.3.11/umd/bio-parsers.js"></script> --> | ||
<script> | ||
async function main() { | ||
var jsonOutput = await window.bioParsers.genbankToJson( | ||
`LOCUS kc2 108 bp DNA linear 01-NOV-2016 | ||
COMMENT teselagen_unique_id: 581929a7bc6d3e00ac7394e8 | ||
FEATURES Location/Qualifiers | ||
CDS 1..108 | ||
/label="GFPuv" | ||
misc_feature 61..108 | ||
/label="gly_ser_linker" | ||
bogus_dude 4..60 | ||
/label="ccmN_sig_pep" | ||
misc_feature 4..60 | ||
/label="ccmN_nterm_sig_pep" | ||
/pragma="Teselagen_Part" | ||
/preferred5PrimeOverhangs="" | ||
/preferred3PrimeOverhangs="" | ||
ORIGIN | ||
1 atgaaggtct acggcaagga acagtttttg cggatgcgcc agagcatgtt ccccgatcgc | ||
61 ggtggcagtg gtagcgggag ctcgggtggc tcaggctctg ggg | ||
//` | ||
); | ||
console.log('jsonOutput:', jsonOutput); | ||
|
||
var genbankString = window.bioParsers.jsonToGenbank(jsonOutput[0].parsedSequence); | ||
console.log(genbankString); | ||
} | ||
main(); | ||
</script> | ||
</head> | ||
</html> |