Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UNLOCK
kubernetes
Commits
1ee32167
Commit
1ee32167
authored
May 11, 2021
by
Koehorst, Jasper
Browse files
uuid only for container name and changed logging for metagenomics.java
parent
e5441a28
Pipeline
#22685
passed with stage
in 1 minute and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/nl/munlock/kubernetes/Kubernetes.java
View file @
1ee32167
...
...
@@ -253,13 +253,13 @@ public class Kubernetes {
log
.
info
(
"CWL: "
+
cwlFile
);
String
uuid
=
UUID
.
randomUUID
().
toString
();
String
yamlName
=
new
File
(
yamlFile
).
getName
();
//
String uuid = UUID.randomUUID().toString();
//
String yamlName = new File(yamlFile).getName();
V1PodTemplateSpec
template
=
new
V1PodTemplateSpec
();
// Defines the docker container
V1Container
containerItem
=
new
V1Container
();
containerItem
.
name
(
uuid
+
"_"
+
yamlName
);
containerItem
.
name
(
UUID
.
randomUUID
().
toString
()
);
containerItem
.
image
(
"docker-registry.wur.nl/unlock/docker"
);
V1ResourceRequirements
resource
=
new
V1ResourceRequirements
();
...
...
src/main/java/nl/munlock/yaml/MetaGenomics.java
View file @
1ee32167
...
...
@@ -45,8 +45,8 @@ public class MetaGenomics {
HashSet
<
String
>
filePaths
=
new
HashSet
<>();
if
(
assay
.
getClassTypeIri
().
endsWith
(
"DNASeqAssay"
))
{
log
.
info
(
"=============================================="
);
log
.
info
(
assay
.
getResource
().
getURI
());
log
.
debug
(
"=============================================="
);
log
.
debug
(
assay
.
getResource
().
getURI
());
// Fill object
WorkflowMetagenomics
workflow
=
new
WorkflowMetagenomics
();
...
...
@@ -58,14 +58,14 @@ public class MetaGenomics {
String
destination
=
assay
.
getLogicalPath
().
replaceAll
(
"/Unprocessed.*"
,
"/processed/"
)
+
"/"
+
commandOptions
.
wid
;
for
(
Data_sample
data_sample
:
assay
.
getAllFile
())
{
log
.
error
(
data_sample
.
getResource
().
getURI
());
log
.
debug
(
data_sample
.
getResource
().
getURI
());
// Parse each sequence dataset, as we might have overlapping identifiers in the future...
SequenceDataSet
sequenceDataSet
=
(
SequenceDataSet
)
data_sample
;
// If file already processed skip...
if
(
filePaths
.
contains
(
new
URL
(
sequenceDataSet
.
getContentUrl
()).
getPath
()))
continue
;
if
(
sequenceDataSet
.
getSeqPlatform
().
getIRI
().
endsWith
(
"Illumina"
))
{
log
.
info
(
"illumina sequence data detected"
);
log
.
debug
(
"illumina sequence data detected"
);
PairedSequenceDataSet
pairedSequenceDataSet
=
(
PairedSequenceDataSet
)
data_sample
;
workflow
.
addForward_reads
(
new
URL
(
pairedSequenceDataSet
.
getContentUrl
()).
getPath
());
workflow
.
addReverse_reads
(
new
URL
(
pairedSequenceDataSet
.
getPaired
().
getContentUrl
()).
getPath
());
...
...
@@ -110,8 +110,6 @@ public class MetaGenomics {
// Fix Clazz > Class
Workflow
.
fixClazz
(
yamlName
);
log
.
info
(
"NOT FINISHED YET"
);
// Save to iRODS
IRODSFile
destFile
=
connection
.
fileFactory
.
instanceIRODSFile
(
assay
.
getLogicalPath
()
+
"/"
+
yamlName
);
...
...
@@ -135,8 +133,8 @@ public class MetaGenomics {
// OU level
for
(
String
observationUnitURL
:
observationUnitsList
)
{
log
.
info
(
"=============================================="
);
log
.
info
(
observationUnitURL
);
log
.
debug
(
"=============================================="
);
log
.
debug
(
observationUnitURL
);
// Fill object
WorkflowMetagenomics
workflow
=
new
WorkflowMetagenomics
();
...
...
@@ -167,7 +165,7 @@ public class MetaGenomics {
continue
;
if
(
sequenceDataSet
.
getSeqPlatform
().
getIRI
().
endsWith
(
"Illumina"
))
{
log
.
info
(
"illumina sequence data detected"
);
log
.
debug
(
"illumina sequence data detected"
);
PairedSequenceDataSet
pairedSequenceDataSet
=
(
PairedSequenceDataSet
)
data_sample
;
workflow
.
addForward_reads
(
new
URL
(
pairedSequenceDataSet
.
getContentUrl
()).
getPath
());
workflow
.
addReverse_reads
(
new
URL
(
pairedSequenceDataSet
.
getPaired
().
getContentUrl
()).
getPath
());
...
...
@@ -214,8 +212,6 @@ public class MetaGenomics {
// Fix Clazz > Class
Workflow
.
fixClazz
(
yamlName
);
log
.
info
(
"NOT FINISHED YET"
);
// Save to iRODS
IRODSFile
destFile
=
connection
.
fileFactory
.
instanceIRODSFile
(
observationUnit
.
getLogicalPath
()
+
"/"
+
yamlName
);
...
...
Write
Preview
Supports
Markdown
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