forked from veg/alignment.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FNA Viewer, restore webpack-dev-server.
- Loading branch information
1 parent
d89329b
commit 54aede2
Showing
12 changed files
with
774 additions
and
57 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
File renamed without changes.
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
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
File renamed without changes.
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 |
---|---|---|
@@ -1,24 +1,40 @@ | ||
const path = require("path"), | ||
fs = require("fs"); | ||
|
||
import fastaParser, { fastaToText } from "./../src/helpers/fasta"; | ||
import fastaParser, { | ||
fastaToText, | ||
fnaParser, | ||
fnaToText | ||
} from "./../src/helpers/fasta"; | ||
|
||
const internalFastaDataStructure = [ | ||
{ header: "Seq1", seq: "ATCGTAATTGCA" }, | ||
{ header: "Seq2", seq: "CTCGTAATGGCC" }, | ||
{ header: "Seq3", seq: "GTCGTCAATGCT" } | ||
], | ||
simple_path = path.resolve(__dirname, "..", "dist", "data", "Simple.fasta"), | ||
fasta = fs.readFileSync(simple_path).toString(); | ||
simple_fasta_path = path.resolve( | ||
__dirname, | ||
"..", | ||
"dist", | ||
"data", | ||
"Simple.fasta" | ||
), | ||
simple_fna_path = path.resolve(__dirname, "..", "dist", "data", "Simple.fna"), | ||
fasta = fs.readFileSync(simple_fasta_path).toString(), | ||
fna = fs.readFileSync(simple_fna_path).toString(); | ||
internalFastaDataStructure.number_of_sequences = 3; | ||
internalFastaDataStructure.number_of_sites = 12; | ||
|
||
test("Imports simple fasta correctly.", () => { | ||
internalFastaDataStructure.number_of_sequences = 3; | ||
internalFastaDataStructure.number_of_sites = 12; | ||
const parsedFasta = fastaParser(fasta); | ||
expect(parsedFasta).toEqual(internalFastaDataStructure); | ||
}); | ||
|
||
test("Converts fasta to text correctly.", () => { | ||
const text = fastaToText(internalFastaDataStructure); | ||
expect(text).toEqual(fasta); | ||
test.only("Import simple fna correctly.", () => { | ||
const internalFnaDataStructure = { | ||
fasta: internalFastaDataStructure, | ||
newick: "((Seq1,Seq2),Seq3);" | ||
}, | ||
parsed_fna = fnaParser(fna); | ||
expect(parsed_fna).toEqual(internalFnaDataStructure); | ||
}); |
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
Oops, something went wrong.