Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
minerva
core
Commits
997c2069
Commit
997c2069
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
some debug for CI
parent
f3ba0b64
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!630
WIP: Resolve "The privileges of a new user are not saved in some cases"
,
!386
Resolve "Continous integration tests"
Pipeline
#6334
failed
6 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
annotation/src/main/java/lcsb/mapviewer/annotation/services/MiRNAParser.java
+16
-5
16 additions, 5 deletions
.../java/lcsb/mapviewer/annotation/services/MiRNAParser.java
with
16 additions
and
5 deletions
annotation/src/main/java/lcsb/mapviewer/annotation/services/MiRNAParser.java
+
16
−
5
View file @
997c2069
...
...
@@ -249,7 +249,6 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
* thrown when there is a problem with accessing mirna data file
*/
private
InputStream
getSourceInputStream
()
throws
IOException
{
new
Exception
().
printStackTrace
();
if
(
this
.
sourceInputStream
==
null
)
{
this
.
sourceInputStream
=
new
ByteArrayOutputStream
();
...
...
@@ -298,48 +297,50 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
NPOIFSFileSystem
fileInputStream
=
null
;
try
{
fileInputStream
=
new
NPOIFSFileSystem
(
getSourceInputStream
());
logger
.
debug
(
"debug 1"
);
Workbook
workbook
=
WorkbookFactory
.
create
(
fileInputStream
);
logger
.
debug
(
"debug 2"
);
Sheet
sheet
=
workbook
.
getSheetAt
(
0
);
logger
.
debug
(
"debug 3"
);
Iterator
<
Row
>
rows
=
sheet
.
rowIterator
();
// Skip header
if
(
rows
.
hasNext
())
{
rows
.
next
();
}
logger
.
debug
(
"debug 4"
);
int
counter
=
0
;
while
(
rows
.
hasNext
())
{
logger
.
debug
(
"next row"
+
(
counter
++));
Row
row
=
rows
.
next
();
Cell
targetSpeciesCell
=
row
.
getCell
(
SPECIES_COL
,
Row
.
RETURN_BLANK_AS_NULL
);
MiriamData
organism
=
null
;
logger
.
debug
(
"debug 1"
);
if
(
targetSpeciesCell
!=
null
)
{
targetSpeciesCell
.
setCellType
(
Cell
.
CELL_TYPE_STRING
);
String
value
=
targetSpeciesCell
.
getStringCellValue
();
organism
=
taxonomyBackend
.
getByName
(
value
);
}
logger
.
debug
(
"debug 2"
);
Cell
mirBaseNamecell
=
row
.
getCell
(
MIR_BASE_NAME_COL
,
Row
.
RETURN_BLANK_AS_NULL
);
if
(
mirBaseNamecell
==
null
)
{
continue
;
}
logger
.
debug
(
"debug 3"
);
mirBaseNamecell
.
setCellType
(
Cell
.
CELL_TYPE_STRING
);
String
name
=
mirBaseNamecell
.
getStringCellValue
();
if
(
name
==
null
||
name
.
trim
().
isEmpty
())
{
continue
;
}
logger
.
debug
(
"debug 4"
);
if
(
miRNAs
.
get
(
name
)
==
null
)
{
miRNAs
.
put
(
name
,
new
MiRNA
(
name
));
}
logger
.
debug
(
"debug 5"
);
MiriamData
mirTaRBaseId
=
null
;
Cell
mirTaRBaseIdCell
=
row
.
getCell
(
MIR_TAR_BASE_ID_COL
,
Row
.
RETURN_BLANK_AS_NULL
);
if
(
mirTaRBaseIdCell
==
null
)
{
continue
;
}
else
{
logger
.
debug
(
"debug 6"
);
mirTaRBaseIdCell
.
setCellType
(
Cell
.
CELL_TYPE_STRING
);
String
value
=
mirTaRBaseIdCell
.
getStringCellValue
();
if
(
value
==
null
||
value
.
trim
().
isEmpty
())
{
...
...
@@ -347,17 +348,22 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
}
else
{
mirTaRBaseId
=
new
MiriamData
(
MiriamType
.
MIR_TAR_BASE_MATURE_SEQUENCE
,
value
.
trim
());
}
logger
.
debug
(
"debug 7"
);
}
Cell
hgncCell
=
row
.
getCell
(
GENE_HGNC_ID_COL
,
Row
.
RETURN_BLANK_AS_NULL
);
logger
.
debug
(
"debug 8"
);
if
(
hgncCell
!=
null
)
{
hgncCell
.
setCellType
(
Cell
.
CELL_TYPE_STRING
);
String
geneName
=
hgncCell
.
getStringCellValue
();
logger
.
debug
(
"debug 9"
);
if
(
geneName
!=
null
&&
!
geneName
.
trim
().
isEmpty
())
{
MiriamData
gene
=
null
;
if
(
TaxonomyBackend
.
HUMAN_TAXONOMY
.
equals
(
organism
))
{
logger
.
debug
(
"debug 10"
);
gene
=
new
MiriamData
(
MiriamType
.
HGNC_SYMBOL
,
geneName
.
trim
());
}
else
{
logger
.
debug
(
"debug 11"
);
Cell
entrezCell
=
row
.
getCell
(
GENE_ENTREZ_ID_COL
,
Row
.
RETURN_BLANK_AS_NULL
);
if
(
entrezCell
!=
null
)
{
entrezCell
.
setCellType
(
Cell
.
CELL_TYPE_STRING
);
...
...
@@ -365,9 +371,11 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
// in case of non human target set the entrez
gene
=
new
MiriamData
(
MiriamType
.
ENTREZ
,
entrezVal
.
trim
());
}
logger
.
debug
(
"debug 12"
);
}
MiRNA
rna
=
miRNAs
.
get
(
name
);
Target
target
=
null
;
logger
.
debug
(
"debug 13"
);
for
(
Target
t
:
rna
.
getTargets
())
{
if
(
t
.
getGenes
().
contains
(
gene
))
{
if
(
organism
==
null
&&
t
.
getOrganism
()
==
null
)
{
...
...
@@ -377,6 +385,7 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
}
}
}
logger
.
debug
(
"debug 14"
);
if
(
target
==
null
)
{
target
=
new
Target
(
mirTaRBaseId
,
gene
,
new
ArrayList
<>());
target
.
setType
(
TargetType
.
SINGLE_PROTEIN
);
...
...
@@ -384,6 +393,7 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
target
.
setName
(
geneName
);
rna
.
addTarget
(
target
);
}
logger
.
debug
(
"debug 15"
);
Cell
pubmedCell
=
row
.
getCell
(
INTERACTION_PEDMED_ID_COL
,
Row
.
RETURN_BLANK_AS_NULL
);
if
(
pubmedCell
!=
null
)
{
pubmedCell
.
setCellType
(
Cell
.
CELL_TYPE_STRING
);
...
...
@@ -392,6 +402,7 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
target
.
addReference
(
new
MiriamData
(
MiriamType
.
PUBMED
,
value
));
}
}
logger
.
debug
(
"debug 16"
);
}
}
...
...
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