aboutsummaryrefslogtreecommitdiff
path: root/workflows/pangenome-generate
diff options
context:
space:
mode:
authorPeter Amstutz2020-11-10 11:52:37 -0500
committerPeter Amstutz2020-11-10 11:52:37 -0500
commitc01188ec20936462357b317f81567aadc64c8f33 (patch)
treeec01a8b2c5fa8fe87b0c750dad28f6a7f1a1a028 /workflows/pangenome-generate
parent74d46196ae69c0c557f64593910ada48d84b3654 (diff)
downloadbh20-seq-resource-c01188ec20936462357b317f81567aadc64c8f33.tar.gz
bh20-seq-resource-c01188ec20936462357b317f81567aadc64c8f33.tar.lz
bh20-seq-resource-c01188ec20936462357b317f81567aadc64c8f33.zip
Use arvados uuids for RDF subjects.uuid-for-resource
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
Diffstat (limited to 'workflows/pangenome-generate')
-rw-r--r--workflows/pangenome-generate/collect-seqs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/workflows/pangenome-generate/collect-seqs.py b/workflows/pangenome-generate/collect-seqs.py
index 1a0807c..225a61f 100644
--- a/workflows/pangenome-generate/collect-seqs.py
+++ b/workflows/pangenome-generate/collect-seqs.py
@@ -36,11 +36,14 @@ if len(sys.argv) > 3:
for item in validated:
pdh = item["portable_data_hash"]
+ uuid = item["uuid"]
with arvados.collection.CollectionReader(pdh, api_client=api, keep_client=keepclient) as col:
with col.open("sequence.fasta", "rt") as fa:
- subject = "http://covid19.genenetwork.org/resource/%s" % pdh
+ subject = "http://covid19.genenetwork.org/resource/%s" % uuid
label = fa.readline().strip()
merged_metadata.write("<%s> <http://biohackathon.org/bh20-seq-schema/original_fasta_label> \"%s\" .\n" % (subject, label[1:].replace('"', '\\"')))
+ merged_metadata.write("<%s> <http://biohackathon.org/bh20-seq-schema/collection_pdh> \"%s\" .\n" % (subject, pdh))
+ merged_metadata.write("<%s> <http://biohackathon.org/bh20-seq-schema/collection_version> \"%s\" .\n" % (subject, item["version"]))
skip = (subject in blacklist or label[1:] in blacklist)
if skip:
merged_metadata.write("<%s> <http://biohackathon.org/bh20-seq-schema/excluded_from_graph> \"true\"^^<http://www.w3.org/2001/XMLSchema#boolean> .\n" % subject)