Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frontend-vue-2
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bioinformatics
frontend-vue-2
Merge requests
!16
Resolve "Zmena highlight pre zdna"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Zmena highlight pre zdna"
14-zmena-highlight-pre-zdna
into
21-pripomienky08022024
Overview
0
Commits
2
Pipelines
3
Changes
3
Merged
Michal Petrovič
requested to merge
14-zmena-highlight-pre-zdna
into
21-pripomienky08022024
1 year ago
Overview
0
Commits
2
Pipelines
3
Changes
3
Expand
Closes
#14 (closed)
0
0
Merge request reports
Compare
21-pripomienky08022024
version 1
58e8a606
1 year ago
21-pripomienky08022024 (base)
and
version 1
latest version
c6c7aeba
2 commits,
1 year ago
version 1
58e8a606
1 commit,
1 year ago
3 files
+
192
−
2
Expand all files
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
src/components/core/visualisation/highlight-zdna.vue
0 → 100644
+
70
−
0
Options
<
template
>
<div
class=
"highlight"
>
<span
v-for=
"part of sequenceHighlight"
:class=
"part.styleClass"
>
{{
part
.
nuclide
}}
</span>
</div>
</
template
>
<
script
>
export
default
{
props
:
[
'
sequence
'
,
'
mask
'
],
data
()
{
return
{}
},
computed
:
{
sequenceHighlight
()
{
const
styleClass
=
{
'
GC
'
:
'
gc
'
,
// Definícia štýlu pre sekvenciu "GC"
'
default
'
:
'
other
'
,
// Predvolený štýl pre ostatné nukleotidy
}
let
ret
=
[]
let
sequence
=
this
.
sequence
.
toUpperCase
()
for
(
var
i
=
0
;
i
<
sequence
.
length
;
i
++
)
{
if
(
sequence
.
substring
(
i
,
i
+
2
)
===
"
GC
"
)
{
ret
.
push
({
styleClass
:
styleClass
[
'
GC
'
]
+
(
this
.
mask
&&
this
.
mask
[
i
]
===
'
W
'
?
'
mutation
'
:
''
),
nuclide
:
"
G
"
,
})
ret
.
push
({
styleClass
:
styleClass
[
'
GC
'
]
+
(
this
.
mask
&&
this
.
mask
[
i
+
1
]
===
'
W
'
?
'
mutation
'
:
''
),
nuclide
:
"
C
"
,
})
i
++
;
// Preskočíme ďalší znak, keďže sme už zvýraznili "GC"
}
else
{
ret
.
push
({
styleClass
:
styleClass
[
'
default
'
]
+
(
this
.
mask
&&
this
.
mask
[
i
]
===
'
W
'
?
'
mutation
'
:
''
),
nuclide
:
sequence
[
i
],
})
}
}
return
ret
},
},
}
</
script
>
<
style
scoped
>
.gc
{
/* Definujte štýly pre zvýraznenie "GC" */
color
:
#dd0000
;
/* Príklad: zelená farba pre "GC" */
}
.other
{
color
:
#0000dd
;
}
.highlight
{
display
:
block
;
word-wrap
:
break-word
;
white-space
:
normal
;
padding
:
0
;
margin
:
0
;
line-height
:
1
;
font-size
:
1.3rem
;
}
</
style
>
\ No newline at end of file