diff options
author | Pjotr Prins | 2020-05-28 10:44:42 -0500 |
---|---|---|
committer | Pjotr Prins | 2020-05-28 10:44:42 -0500 |
commit | 2bcf4c45eaba42b36cff93c9cd5e461baaf3eae1 (patch) | |
tree | 2e8e789fb0261d0230db76b2f00e50ec40d83291 /bh20sequploader/main.py | |
parent | 64d832fb49d8ef3799290ec5bd67c69c2c87e5d6 (diff) | |
download | bh20-seq-resource-2bcf4c45eaba42b36cff93c9cd5e461baaf3eae1.tar.gz bh20-seq-resource-2bcf4c45eaba42b36cff93c9cd5e461baaf3eae1.tar.lz bh20-seq-resource-2bcf4c45eaba42b36cff93c9cd5e461baaf3eae1.zip |
Web: debugging metadata submission
Diffstat (limited to 'bh20sequploader/main.py')
-rw-r--r-- | bh20sequploader/main.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bh20sequploader/main.py b/bh20sequploader/main.py index 0d463f7..2cd15c2 100644 --- a/bh20sequploader/main.py +++ b/bh20sequploader/main.py @@ -3,6 +3,7 @@ import time import arvados import arvados.collection import json +import logging import magic from pathlib import Path import urllib.request @@ -13,6 +14,10 @@ sys.path.insert(0,'.') from bh20sequploader.qc_metadata import qc_metadata from bh20sequploader.qc_fasta import qc_fasta +logging.basicConfig(level=logging.DEBUG) +log = logging.getLogger(__name__ ) +log.debug("Entering sequence uploader") + ARVADOS_API_HOST='lugli.arvadosapi.com' ARVADOS_API_TOKEN='2fbebpmbo3rw3x05ueu2i6nx70zhrsb1p22ycu3ry34m4x4462' UPLOAD_PROJECT='lugli-j7d0g-n5clictpuvwk8aa' @@ -26,13 +31,16 @@ def main(): api = arvados.api(host=ARVADOS_API_HOST, token=ARVADOS_API_TOKEN, insecure=True) + log.debug("Checking metadata") if not qc_metadata(args.metadata.name): - print("Failed metadata qc") + log.warning("Failed metadata qc") exit(1) try: + log.debug("Checking FASTA QC") target = qc_fasta(args.sequence) except ValueError as e: + log.warning("Failed FASTA qc") print(e) exit(1) |