index.ts 601 Bytes
Newer Older
1
import GeneComponent, { GeneData } from "./component/sequence/gene";
Remi  PLANEL's avatar
Remi PLANEL committed
2
import { select } from "d3-selection";
Remi  PLANEL's avatar
Remi PLANEL committed
3
const genes = [
Remi  PLANEL's avatar
Remi PLANEL committed
4
5
6
7
8
9
    { name: "gene 1", strand: "-", begin: 20815, end: 21078, gene: "insA" },
    { name: "gene 2", strand: "+", begin: 21181, end: 21399, gene: "yaaY" },
    { name: "gene 3", strand: "+", begin: 21407, end: 22348, gene: "ribF" },
    { name: "gene 4", strand: "+", begin: 22391, end: 25207, gene: "ileS" }


Remi  PLANEL's avatar
Remi PLANEL committed
10

Remi  PLANEL's avatar
Remi PLANEL committed
11
12
13
14
15
]

const geneComponent = GeneComponent();


16
const myGenes = select<SVGGElement, Array<GeneData>>("g#genes");
Remi  PLANEL's avatar
Remi PLANEL committed
17

Remi  PLANEL's avatar
Remi PLANEL committed
18
myGenes.datum(genes).call(geneComponent, 1000, 10, 50);
Remi  PLANEL's avatar
Remi PLANEL committed
19