aboutsummaryrefslogtreecommitdiff
path: root/bh20sequploader/main.py
diff options
context:
space:
mode:
authorPeter Amstutz2020-04-07 15:28:42 -0400
committerPeter Amstutz2020-04-07 15:28:42 -0400
commit07bc4c65535437b8e9e0744f08da8cea541d0116 (patch)
tree201cd544a87aebf0ba6978c42d61df1e90d7d836 /bh20sequploader/main.py
parent4215a82af730ff05b8fe98e226b759413cdf95f7 (diff)
downloadbh20-seq-resource-07bc4c65535437b8e9e0744f08da8cea541d0116.tar.gz
bh20-seq-resource-07bc4c65535437b8e9e0744f08da8cea541d0116.tar.lz
bh20-seq-resource-07bc4c65535437b8e9e0744f08da8cea541d0116.zip
Add metadata validation with schema-salad
Diffstat (limited to 'bh20sequploader/main.py')
-rw-r--r--bh20sequploader/main.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bh20sequploader/main.py b/bh20sequploader/main.py
index d3ebc0c..8b8fefe 100644
--- a/bh20sequploader/main.py
+++ b/bh20sequploader/main.py
@@ -6,6 +6,7 @@ import json
import urllib.request
import socket
import getpass
+from .qc_metadata import qc_metadata
ARVADOS_API_HOST='lugli.arvadosapi.com'
ARVADOS_API_TOKEN='2fbebpmbo3rw3x05ueu2i6nx70zhrsb1p22ycu3ry34m4x4462'
@@ -19,6 +20,8 @@ def main():
api = arvados.api(host=ARVADOS_API_HOST, token=ARVADOS_API_TOKEN, insecure=True)
+ qc_metadata(args.metadata.name)
+
col = arvados.collection.Collection(api_client=api)
print("Reading FASTA")
@@ -29,8 +32,8 @@ def main():
f.write(r)
r = args.sequence.read(65536)
- print("Reading JSONLD")
- with col.open("metadata.jsonld", "w") as f:
+ print("Reading metadata")
+ with col.open("metadata.yaml", "w") as f:
r = args.metadata.read(65536)
print(r[0:20])
while r: