aboutsummaryrefslogtreecommitdiff
path: root/bh20sequploader
diff options
context:
space:
mode:
authorPeter Amstutz2020-04-06 17:54:37 -0400
committerGitHub2020-04-06 17:54:37 -0400
commit9b1c125f91469074c7586a1278d89b85919e3eae (patch)
tree6d6a69ef2ebf4a9481a2c350914373ad25f63d00 /bh20sequploader
parent2c69ca48ce1a9ab431afcc891bdad8c495c9768e (diff)
parent762b770eda79fd4006b767e2dd768746232995ba (diff)
downloadbh20-seq-resource-9b1c125f91469074c7586a1278d89b85919e3eae.tar.gz
bh20-seq-resource-9b1c125f91469074c7586a1278d89b85919e3eae.tar.lz
bh20-seq-resource-9b1c125f91469074c7586a1278d89b85919e3eae.zip
Merge pull request #1 from pjotrp/master
Installation notes
Diffstat (limited to 'bh20sequploader')
-rw-r--r--bh20sequploader/main.py8
-rw-r--r--bh20sequploader/main.py~2
2 files changed, 7 insertions, 3 deletions
diff --git a/bh20sequploader/main.py b/bh20sequploader/main.py
index 9de51f4..17ad492 100644
--- a/bh20sequploader/main.py
+++ b/bh20sequploader/main.py
@@ -17,18 +17,22 @@ def main():
parser.add_argument('metadata', type=argparse.FileType('r'), help='sequence metadata json')
args = parser.parse_args()
- api = arvados.api(host=ARVADOS_API_HOST, token=ARVADOS_API_TOKEN)
+ api = arvados.api(host=ARVADOS_API_HOST, token=ARVADOS_API_TOKEN, insecure=True)
col = arvados.collection.Collection(api_client=api)
+ print("Reading FASTA")
with col.open("sequence.fasta", "w") as f:
r = args.sequence.read(65536)
+ print(r[0:20])
while r:
f.write(r)
r = args.sequence.read(65536)
+ print("Reading JSONLD")
with col.open("metadata.jsonld", "w") as f:
r = args.metadata.read(65536)
+ print(r[0:20])
while r:
f.write(r)
r = args.metadata.read(65536)
@@ -44,3 +48,5 @@ def main():
col.save_new(owner_uuid=UPLOAD_PROJECT, name="Uploaded by %s from %s" %
(properties['upload_user'], properties['upload_ip']),
properties=properties, ensure_unique_name=True)
+
+main()
diff --git a/bh20sequploader/main.py~ b/bh20sequploader/main.py~
deleted file mode 100644
index 336e825..0000000
--- a/bh20sequploader/main.py~
+++ /dev/null
@@ -1,2 +0,0 @@
-def main():
- pass