aboutsummaryrefslogtreecommitdiff
path: root/bh20sequploader
diff options
context:
space:
mode:
authorlltommy2020-04-22 18:37:35 +0200
committerlltommy2020-04-22 18:37:35 +0200
commit5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde (patch)
tree466dfc19d583aedb44f366ddacc6fa8e0b7a890e /bh20sequploader
parentb34531de1f49e4faa82a9c350f0c5d4169ccfeb4 (diff)
parentce696b41b3476891ecb05185d64c289b140a73af (diff)
downloadbh20-seq-resource-5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde.tar.gz
bh20-seq-resource-5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde.tar.lz
bh20-seq-resource-5582ed4f4bd6bd5b03d20a0c88dc7fa27d2d5cde.zip
Merge branch 'master' of https://github.com/arvados/bh20-seq-resource
Diffstat (limited to 'bh20sequploader')
-rw-r--r--bh20sequploader/bh20seq-schema.yml1
-rw-r--r--bh20sequploader/bh20seq-shex.rdf2
-rw-r--r--bh20sequploader/main.py8
3 files changed, 7 insertions, 4 deletions
diff --git a/bh20sequploader/bh20seq-schema.yml b/bh20sequploader/bh20seq-schema.yml
index 75308ab..1ceebe2 100644
--- a/bh20sequploader/bh20seq-schema.yml
+++ b/bh20sequploader/bh20seq-schema.yml
@@ -106,6 +106,7 @@ $graph:
jsonldPredicate:
_id: http://purl.obolibrary.org/obo/OBI_0001479
_type: "@id"
+ noLinkCheck: true
sample_storage_conditions:
doc: Information about storage of a specified type, e.g. frozen specimen, paraffin, fresh ....
type: string?
diff --git a/bh20sequploader/bh20seq-shex.rdf b/bh20sequploader/bh20seq-shex.rdf
index 59ee71b..31e714f 100644
--- a/bh20sequploader/bh20seq-shex.rdf
+++ b/bh20sequploader/bh20seq-shex.rdf
@@ -50,7 +50,7 @@ PREFIX wikidata: <http://www.wikidata.org/entity/>
:technologyShape {
obo:OBI_0600047 IRI {0,2} ;
- obo:FLU_0000848 xsd:integer ?;
+ obo:FLU_0000848 xsd:double ?;
efo:EFO_0002699 xsd:string ?;
}
diff --git a/bh20sequploader/main.py b/bh20sequploader/main.py
index 49d012d..4c4711d 100644
--- a/bh20sequploader/main.py
+++ b/bh20sequploader/main.py
@@ -44,7 +44,8 @@ def main():
with col.open(target, "w") as f:
r = args.sequence.read(65536)
- print(r[0:20])
+ seqlabel = r[1:r.index("\n")]
+ print(seqlabel)
while r:
f.write(r)
r = args.sequence.read(65536)
@@ -62,13 +63,14 @@ def main():
external_ip = urllib.request.urlopen('https://ident.me').read().decode('utf8')
properties = {
+ "sequence_label": seqlabel,
"upload_app": "bh20-seq-uploader",
"upload_ip": external_ip,
"upload_user": "%s@%s" % (getpass.getuser(), socket.gethostname())
}
- col.save_new(owner_uuid=UPLOAD_PROJECT, name="Uploaded by %s from %s" %
- (properties['upload_user'], properties['upload_ip']),
+ col.save_new(owner_uuid=UPLOAD_PROJECT, name="%s uploaded by %s from %s" %
+ (seqlabel, properties['upload_user'], properties['upload_ip']),
properties=properties, ensure_unique_name=True)
print("Done")