Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Remi PLANEL
bioviz-js
Commits
5979695a
Commit
5979695a
authored
Apr 10, 2019
by
Remi PLANEL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename genome-rule to chromosome-rule
parent
4b823712
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
src/scripts/component/genome-browser.ts
src/scripts/component/genome-browser.ts
+7
-7
src/scripts/component/rules/brushable-chromosome-rule.ts
src/scripts/component/rules/brushable-chromosome-rule.ts
+1
-3
src/scripts/component/rules/chromosome-rule.ts
src/scripts/component/rules/chromosome-rule.ts
+0
-0
No files found.
src/scripts/component/genome-browser.ts
View file @
5979695a
import
GeneComponent
from
"
./sequence/gene
"
;
import
GenomeAxis
from
"
./rules/
gen
ome-rule
"
;
import
Brushable
GenomeAxis
from
"
./rules/brushable-
gen
ome-rule
"
;
import
ChromosomeRule
from
"
./rules/
chromos
ome-rule
"
;
import
Brushable
ChromosomeRule
from
"
./rules/brushable-
chromos
ome-rule
"
;
// D3
import
{
select
,
Selection
}
from
"
d3-selection
"
;
import
{
drag
}
from
"
d3-drag
"
;
...
...
@@ -11,9 +11,9 @@ import { GeneData, GenomeBrowserData, GenericAxisData, BrushableAxisData } from
export
default
function
()
{
const
selectedChromosome
Axis
=
GenomeAxis
();
const
selectedChromosome
Rule
=
ChromosomeRule
();
const
geneComponent
=
GeneComponent
();
const
wholeChromosome
Axis
=
Brushable
GenomeAxis
();
const
wholeChromosome
Rule
=
Brushable
ChromosomeRule
();
let
width
=
900
;
let
genomesBrowserU
:
Selection
<
SVGElement
,
GenomeBrowserData
,
SVGElement
,
any
>
|
null
=
null
;
...
...
@@ -84,13 +84,13 @@ export default function () {
genomesBrowserU
.
select
<
SVGElement
>
(
"
g.axis
"
)
.
datum
(
axis
)
.
call
(
selectedChromosome
Axis
,
width
,
70
);
.
call
(
selectedChromosome
Rule
,
width
,
70
);
genomesBrowserU
.
select
<
SVGElement
>
(
"
.genes
"
)
.
attr
(
"
transform
"
,
"
translate(0, 80)
"
)
.
datum
(
genes
)
.
call
(
geneComponent
,
selectedChromosome
Axis
.
scale
(),
30
)
.
call
(
geneComponent
,
selectedChromosome
Rule
.
scale
(),
30
)
}
};
...
...
@@ -99,7 +99,7 @@ export default function () {
genomesBrowserU
.
select
<
SVGElement
>
(
"
g.chromosome-axis
"
)
.
datum
(({
axis
:
{
global
}
})
=>
global
)
.
call
(
wholeChromosome
Axis
,
width
,
0
);
.
call
(
wholeChromosome
Rule
,
width
,
0
);
}
}
...
...
src/scripts/component/rules/brushable-
gen
ome-rule.ts
→
src/scripts/component/rules/brushable-
chromos
ome-rule.ts
View file @
5979695a
import
{
BrushableAxisData
,
GenericAxisData
}
from
"
../../types
"
;
import
{
select
,
Selection
}
from
"
d3-selection
"
;
import
{
scaleLinear
}
from
"
d3-scale
"
;
import
GenomeAxis
from
"
./
gen
ome-rule
"
;
import
GenomeAxis
from
"
./
chromos
ome-rule
"
;
import
{
brushX
,
BrushBehavior
}
from
"
d3-brush
"
;
import
{
html
}
from
"
d3
"
;
export
default
function
()
{
const
genomeAxisComponent
=
GenomeAxis
();
...
...
src/scripts/component/rules/
gen
ome-rule.ts
→
src/scripts/component/rules/
chromos
ome-rule.ts
View file @
5979695a
File moved
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