aboutsummaryrefslogtreecommitdiff
path: root/workflows/pangenome-generate/from_sparql.py
diff options
context:
space:
mode:
Diffstat (limited to 'workflows/pangenome-generate/from_sparql.py')
-rw-r--r--workflows/pangenome-generate/from_sparql.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/workflows/pangenome-generate/from_sparql.py b/workflows/pangenome-generate/from_sparql.py
new file mode 100644
index 0000000..4610cad
--- /dev/null
+++ b/workflows/pangenome-generate/from_sparql.py
@@ -0,0 +1,8 @@
+from rdflib import Graph
+import sys
+import subprocess
+g = Graph()
+g.parse(sys.argv[1], format="nt")
+res = g.query(sys.argv[3])
+for r in res:
+ subprocess.run(["samtools", "faidx", sys.argv[2], r[0]])