Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Remi PLANEL
bioviz-js
Commits
5b5adf36
Commit
5b5adf36
authored
Apr 02, 2019
by
Remi PLANEL
Browse files
Add small gene
parent
3e20d66f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripts/index.ts
View file @
5b5adf36
...
...
@@ -2,7 +2,11 @@ import GeneComponent, { GeneData } from "./component/sequence/gene";
import
{
select
,
Selection
}
from
"
d3-selection
"
;
const
genes
=
[
{
name
:
"
gene 1
"
,
length
:
1000
,
strand
:
1
},
{
name
:
"
gene 2
"
,
length
:
500
,
strand
:
-
1
}
{
name
:
"
gene 2
"
,
length
:
500
,
strand
:
-
1
},
{
name
:
"
gene 3
"
,
length
:
500
,
strand
:
1
},
{
name
:
"
gene 4
"
,
length
:
20
,
strand
:
1
},
{
name
:
"
gene 3
"
,
length
:
250
,
strand
:
-
1
},
]
const
geneComponent
=
GeneComponent
();
...
...
@@ -10,5 +14,5 @@ const geneComponent = GeneComponent();
const
myGenes
=
select
<
SVGGElement
,
Array
<
GeneData
>>
(
"
g#genes
"
);
myGenes
.
datum
(
genes
).
call
(
geneComponent
,
1000
,
5
,
1
0
);
myGenes
.
datum
(
genes
).
call
(
geneComponent
,
1000
,
10
,
5
0
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment