Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend
Manage
Activity
Members
Labels
Plan
Issues
2
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
backend
Commits
e66ee5f8
Commit
e66ee5f8
authored
9 months ago
by
Michal Petrovič
Browse files
Options
Downloads
Plain Diff
Merge branch '19-bedgraph-loads-too-long' into 'main'
Resolve "Bedgraph loads too long" Closes
#19
See merge request
!18
parents
4283a1c9
1ee781c5
Branches
Branches containing commit
1 merge request
!18
Resolve "Bedgraph loads too long"
Pipeline
#204004
passed with stages
Stage:
Stage:
Stage:
in 5 minutes and 50 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/cz/mendelu/dnaAnalyser/exporter/ExporterService.java
+25
-25
25 additions, 25 deletions
...java/cz/mendelu/dnaAnalyser/exporter/ExporterService.java
with
25 additions
and
25 deletions
src/main/java/cz/mendelu/dnaAnalyser/exporter/ExporterService.java
+
25
−
25
View file @
e66ee5f8
...
...
@@ -181,13 +181,12 @@ public class ExporterService {
analysisColumnMapper
=
new
ArrayList
<
String
>();;
break
;
}
try
{
// add analysis specific header
result
=
String
.
format
(
result
,
name
,
description
);
// Add analysis specific header
StringBuilder
resultBuilder
=
new
StringBuilder
();
resultBuilder
.
append
(
String
.
format
(
result
,
name
,
description
));
while
(
rs
.
next
())
{
try
{
chromStart
=
rs
.
getInt
(
"POSITION"
);
if
(
sequenceStart
==
null
)
{
...
...
@@ -196,47 +195,48 @@ public class ExporterService {
chromEnd
=
rs
.
getInt
(
"POSITION"
)
+
rs
.
getInt
(
"LENGTH"
);
String
strand
=
null
;
I
nt
eger
score
=
0
;
i
nt
score
=
0
;
if
(
analysis
==
Analysis
.
RLOOP
)
{
strand
=
rs
.
getString
(
"STRAND"
);
I
nt
eger
g3
=
rs
.
getInt
(
"G3"
);
I
nt
eger
g4
=
rs
.
getInt
(
"G4"
);
I
nt
eger
gn
=
rs
.
getInt
(
"GN"
);
i
nt
g3
=
rs
.
getInt
(
"G3"
);
i
nt
g4
=
rs
.
getInt
(
"G4"
);
i
nt
gn
=
rs
.
getInt
(
"GN"
);
D
ouble
rizG
=
rs
.
getDouble
(
"RIZGRICHNESS"
);
D
ouble
rloopG
=
rs
.
getDouble
(
"RLOOPGRICHNESS"
);
d
ouble
rizG
=
rs
.
getDouble
(
"RIZGRICHNESS"
);
d
ouble
rloopG
=
rs
.
getDouble
(
"RLOOPGRICHNESS"
);
I
nt
eger
scoreCalc
=
(
int
)
Math
.
ceil
(-
(
g3
+
g4
*
2
+
gn
*
3
)
*
rizG
*
rloopG
);
i
nt
scoreCalc
=
(
int
)
Math
.
ceil
(-(
g3
+
g4
*
2
+
gn
*
3
)
*
rizG
*
rloopG
);
score
=
strand
.
equals
(
"+"
)
?
Math
.
abs
(
scoreCalc
)
:
scoreCalc
;
}
else
if
(
analysis
==
Analysis
.
QUADRUPLEX
||
analysis
==
Analysis
.
AGGREGATE
)
{
}
else
if
(
analysis
==
Analysis
.
QUADRUPLEX
||
analysis
==
Analysis
.
AGGREGATE
)
{
// G4 Hunter score calculation
score
=
(
int
)
Math
.
ceil
(
rs
.
getDouble
(
"SCORE"
)
*
100
);
}
else
if
(
analysis
==
Analysis
.
ZDNA
)
{
}
else
if
(
analysis
==
Analysis
.
ZDNA
)
{
score
=
(
int
)
Math
.
ceil
(
rs
.
getDouble
(
"SCORE"
));
}
dataValue
=
String
.
format
(
" %d"
,
score
);
}
catch
(
SQLException
e
)
{
// score is for g4hunter, r
}
catch
(
SQLException
e
)
{
log
.
error
(
"Error fetching analysis data: {}"
,
e
);
}
continue
;
// Skip the rest of this loop iteration and continue with the next
}
result
+=
String
.
format
(
format
,
result
Builder
.
append
(
String
.
format
(
format
,
chrom
,
posInGenomeStart
+
chromStart
,
posInGenomeStart
+
chromEnd
,
posInGenomeStart
+
chromStart
,
posInGenomeStart
+
chromEnd
,
dataValue
)
;
)
);
// This is now using StringBuilder
dataValue
=
""
;
}
}
catch
(
NullPointerException
|
NotFoundException
e
)
{
log
.
error
(
"Error finding analysis by id: {}\n {}"
,
id
,
e
);
// Convert the StringBuilder to a String
result
=
resultBuilder
.
toString
();
}
catch
(
SQLException
e
)
{
log
.
error
(
"Error processing result set: {}"
,
e
);
}
// update browser header
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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