From 925058d0b3db70803d322cc2a33801240899a20a Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Fri, 10 Apr 2020 15:52:37 -0400 Subject: Fix up fasta/fastq validation --- bh20seqanalyzer/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bh20seqanalyzer') diff --git a/bh20seqanalyzer/main.py b/bh20seqanalyzer/main.py index 1fb51b5..c05b402 100644 --- a/bh20seqanalyzer/main.py +++ b/bh20seqanalyzer/main.py @@ -8,6 +8,7 @@ import json import logging import ruamel.yaml from bh20sequploader.qc_metadata import qc_metadata +from bh20sequploader.qc_fasta import qc_fasta import pkg_resources from schema_salad.sourceline import add_lc_filename @@ -38,7 +39,13 @@ def validate_upload(api, collection, validated_project, logging.warn("Failed metadata qc") if valid: - if "sequence.fasta" not in col: + if "sequence.fasta" in col: + try: + qc_fasta(col.open("sequence.fasta")) + except Exception as e: + logging.warn(e) + valid = False + else: if "reads.fastq" in col: start_fastq_to_fasta(api, collection, fastq_project, fastq_workflow_uuid) return False -- cgit v1.2.3