Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
617ccb48
Commit
617ccb48
authored
9 years ago
by
kohleman
Browse files
Options
Downloads
Patches
Plain Diff
added extra fields, like SAMPLE_TYPE and SAMPLE_CODE
SVN: 34463
parent
c95de044
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/metadata/create_metadata.java
+40
-1
40 additions, 1 deletion
.../java/ch/ethz/bsse/cisd/dsu/metadata/create_metadata.java
with
40 additions
and
1 deletion
deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/metadata/create_metadata.java
+
40
−
1
View file @
617ccb48
...
@@ -57,14 +57,26 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria;
...
@@ -57,14 +57,26 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria;
public
class
create_metadata
public
class
create_metadata
{
{
private
static
final
String
SEQUENCER
=
"SEQUENCER"
;
private
static
final
String
SEQUENCER_MODEL
=
"SEQUENCER_MODEL"
;
private
static
final
String
ILLUMINA_FLOW_LANE
=
"ILLUMINA_FLOW_LANE"
;
private
static
final
String
LANE_NUMBER
=
"LANE_NUMBER"
;
private
static
final
String
TSV_ENDING
=
".tsv"
;
private
static
final
String
TSV_ENDING
=
".tsv"
;
private
static
final
String
FLOW_CELL_PROPERTIES_NAME
=
"FLOW_CELL_PROPERTIES"
;
private
static
final
String
FLOW_CELL_PROPERTIES_NAME
=
"FLOW_CELL_PROPERTIES"
;
private
static
final
String
EXPERIMENT_NAME
=
"EXPERIMENT"
;
private
static
final
String
EXPERIMENT_NAME
=
"EXPERIMENT"
;
private
static
final
String
SAMPLE_CODE
=
"SAMPLE_CODE"
;
private
static
final
String
SAMPLE_TYPE_ILLUMINA_SEQUENCING
=
"ILLUMINA_SEQUENCING"
;
private
static
final
String
SAMPLE_TYPE_ILLUMINA_SEQUENCING
=
"ILLUMINA_SEQUENCING"
;
private
static
final
String
SAMPLE_TYPE
=
"SAMPLE_TYPE"
;
private
static
final
String
INDEX1_NOINDEX_VALUE
=
"NOINDEX"
;
private
static
final
String
INDEX1_NOINDEX_VALUE
=
"NOINDEX"
;
private
static
final
String
DATASET_TYPE_CODE_FASTQ_GZ
=
"FASTQ_GZ"
;
private
static
final
String
DATASET_TYPE_CODE_FASTQ_GZ
=
"FASTQ_GZ"
;
...
@@ -84,6 +96,16 @@ public class create_metadata
...
@@ -84,6 +96,16 @@ public class create_metadata
private
static
final
char
[]
HEX_CHARACTERS
=
private
static
final
char
[]
HEX_CHARACTERS
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
};
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
,
};
private
static
final
Map
<
String
,
String
>
SEQUENCER_NAMING
;
static
{
SEQUENCER_NAMING
=
new
HashMap
<
String
,
String
>();
SEQUENCER_NAMING
.
put
(
"D00535"
,
"Illumina HiSeq 2500"
);
SEQUENCER_NAMING
.
put
(
"J00121"
,
"Illumina HiSeq 3000"
);
SEQUENCER_NAMING
.
put
(
"M01761"
,
"Illumina MiSeq"
);
SEQUENCER_NAMING
.
put
(
"NS500318"
,
"Illumina NextSeq 500"
);
}
public
static
void
main
(
String
[]
args
)
public
static
void
main
(
String
[]
args
)
{
{
try
try
...
@@ -131,6 +153,11 @@ public class create_metadata
...
@@ -131,6 +153,11 @@ public class create_metadata
for
(
String
sampleCode
:
sampleCodeList
)
for
(
String
sampleCode
:
sampleCodeList
)
{
{
List
<
Sample
>
sampleList
=
searchSample
(
infoService
,
sessionToken
,
sampleCode
,
fetchOptions
);
List
<
Sample
>
sampleList
=
searchSample
(
infoService
,
sessionToken
,
sampleCode
,
fetchOptions
);
if
(
sampleList
.
size
()
<
1
)
{
System
.
out
.
println
(
sampleCode
+
" Not found!"
);
}
SortedMap
<
String
,
SortedMap
<
String
,
String
>>
sampleMap
=
getProperties
(
sampleList
);
SortedMap
<
String
,
SortedMap
<
String
,
String
>>
sampleMap
=
getProperties
(
sampleList
);
SortedMap
<
String
,
SortedMap
<
String
,
String
>>
flowcellMap
=
null
;
SortedMap
<
String
,
SortedMap
<
String
,
String
>>
flowcellMap
=
null
;
String
flowcellCode
=
""
;
String
flowcellCode
=
""
;
...
@@ -142,9 +169,14 @@ public class create_metadata
...
@@ -142,9 +169,14 @@ public class create_metadata
HashMap
<
String
,
Integer
>
dbResult
=
DbAccess
.
doQuery
(
connection
,
permId
);
HashMap
<
String
,
Integer
>
dbResult
=
DbAccess
.
doQuery
(
connection
,
permId
);
for
(
Sample
child
:
children
)
for
(
Sample
child
:
children
)
{
{
if
(
child
.
getSampleTypeCode
().
equals
(
"
ILLUMINA_FLOW_LANE
"
))
if
(
child
.
getSampleTypeCode
().
equals
(
ILLUMINA_FLOW_LANE
))
{
{
flowcellCode
=
child
.
getCode
().
split
(
":"
)[
0
];
flowcellCode
=
child
.
getCode
().
split
(
":"
)[
0
];
String
flowlaneCode
=
child
.
getCode
().
split
(
":"
)[
1
];
SortedMap
<
String
,
String
>
sampleProps
=
sampleMap
.
get
(
sampleCode
);
sampleProps
.
put
(
LANE_NUMBER
,
flowlaneCode
);
sampleMap
.
put
(
sampleCode
,
sampleProps
);
List
<
Sample
>
flowcellList
=
searchSample
(
infoService
,
sessionToken
,
flowcellCode
,
flowcellFetchOptions
);
List
<
Sample
>
flowcellList
=
searchSample
(
infoService
,
sessionToken
,
flowcellCode
,
flowcellFetchOptions
);
flowcellMap
=
getProperties
(
flowcellList
);
flowcellMap
=
getProperties
(
flowcellList
);
}
}
...
@@ -169,11 +201,18 @@ public class create_metadata
...
@@ -169,11 +201,18 @@ public class create_metadata
{
{
sortedProperties
.
put
(
key
,
cleanString
(
sampleProperties
.
get
(
key
).
toString
()));
sortedProperties
.
put
(
key
,
cleanString
(
sampleProperties
.
get
(
key
).
toString
()));
}
}
if
(
key
.
equals
(
SEQUENCER
))
{
sortedProperties
.
put
(
SEQUENCER_MODEL
,
SEQUENCER_NAMING
.
get
(
sampleProperties
.
get
(
key
)));
}
}
}
if
(
sample
.
getSampleTypeCode
().
equals
(
SAMPLE_TYPE_ILLUMINA_SEQUENCING
))
if
(
sample
.
getSampleTypeCode
().
equals
(
SAMPLE_TYPE_ILLUMINA_SEQUENCING
))
{
{
sortedProperties
.
put
(
EXPERIMENT_NAME
,
sample
.
getExperimentIdentifierOrNull
());
sortedProperties
.
put
(
EXPERIMENT_NAME
,
sample
.
getExperimentIdentifierOrNull
());
}
}
sortedProperties
.
put
(
SAMPLE_CODE
,
sample
.
getCode
());
sortedProperties
.
put
(
SAMPLE_TYPE
,
sample
.
getSampleTypeCode
());
sampleMap
.
put
(
sample
.
getCode
(),
sortedProperties
);
sampleMap
.
put
(
sample
.
getCode
(),
sortedProperties
);
}
}
return
sampleMap
;
return
sampleMap
;
...
...
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