Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PanTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
PanTools
Commits
f2765635
Commit
f2765635
authored
10 months ago
by
Workum, Dirk-Jan van
Browse files
Options
Downloads
Patches
Plain Diff
also update frequency property on nucleotide nodes
parent
ea2936ff
Branches
add_gfa_build_pangenome
No related tags found
1 merge request
!198
Draft: construct pangenome database from GFA
Pipeline
#102418
passed
10 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/nl/wur/bif/pantools/construction/build_pangenome/GenomeLayer.java
+10
-2
10 additions, 2 deletions
...if/pantools/construction/build_pangenome/GenomeLayer.java
with
10 additions
and
2 deletions
src/main/java/nl/wur/bif/pantools/construction/build_pangenome/GenomeLayer.java
+
10
−
2
View file @
f2765635
...
@@ -1341,8 +1341,6 @@ public class GenomeLayer {
...
@@ -1341,8 +1341,6 @@ public class GenomeLayer {
targetNode
=
createNewNodeGfa
(
edge
.
getTarget
(),
new
int
[]{
genomeNr
,
sequenceNr
,
pathPosition
},
index
,
nodeCache
);
targetNode
=
createNewNodeGfa
(
edge
.
getTarget
(),
new
int
[]{
genomeNr
,
sequenceNr
,
pathPosition
},
index
,
nodeCache
);
createNewRelationshipGfa
(
sourceNode
,
edge
.
getType
(),
edge
.
getSourceEndOnTarget
(),
targetNode
,
origin
,
pathPosition
,
trsc
);
createNewRelationshipGfa
(
sourceNode
,
edge
.
getType
(),
edge
.
getSourceEndOnTarget
(),
targetNode
,
origin
,
pathPosition
,
trsc
);
sourceNode
=
targetNode
;
sourceNode
=
targetNode
;
//TODO: update the localization information in the edge to the next node
}
}
// connect the last node to the sequence node with FF
// connect the last node to the sequence node with FF
...
@@ -1374,6 +1372,7 @@ public class GenomeLayer {
...
@@ -1374,6 +1372,7 @@ public class GenomeLayer {
newNode
.
setProperty
(
"address"
,
address
);
newNode
.
setProperty
(
"address"
,
address
);
newNode
.
setProperty
(
"length"
,
node
.
getLength
());
newNode
.
setProperty
(
"length"
,
node
.
getLength
());
newNode
.
setProperty
(
"frequencies"
,
new
long
[
GENOME_DB
.
num_genomes
+
1
]);
newNode
.
setProperty
(
"frequencies"
,
new
long
[
GENOME_DB
.
num_genomes
+
1
]);
newNode
.
setProperty
(
"frequency"
,
0
);
newNode
.
setProperty
(
"sequence"
,
node
.
getSequence
());
newNode
.
setProperty
(
"sequence"
,
node
.
getSequence
());
num_bases
+=
node
.
getLength
();
num_bases
+=
node
.
getLength
();
...
@@ -1438,6 +1437,15 @@ public class GenomeLayer {
...
@@ -1438,6 +1437,15 @@ public class GenomeLayer {
frequencies
[
address
[
0
]]++;
frequencies
[
address
[
0
]]++;
newNode
.
setProperty
(
"frequencies"
,
frequencies
);
newNode
.
setProperty
(
"frequencies"
,
frequencies
);
// update the frequency property of the node
final
long
frequency
=
Arrays
.
stream
(
frequencies
).
sum
();
newNode
.
setProperty
(
"frequency"
,
frequency
);
// update global highest_frequency integer
if
(
frequency
>
highest_frequency
)
{
highest_frequency
=
frequency
;
}
// return the new node
// return the new node
return
newNode
;
return
newNode
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment