# HG changeset patch
# User bgruening
# Date 1611846374 0
# Node ID 4ad83aed5c3c325f53c003111e972fab4dae2263
# Parent  ace92c9a4653a9d1b9eb015cd277683c12b09c84
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/graphprot commit 15c382f71f1984aecff67ef9d268b992528996b2"

diff -r ace92c9a4653 -r 4ad83aed5c3c graphprot_predict_wrapper.py
--- a/graphprot_predict_wrapper.py	Wed Jan 27 19:27:47 2021 +0000
+++ b/graphprot_predict_wrapper.py	Thu Jan 28 15:06:14 2021 +0000
@@ -221,6 +221,18 @@
     print("# input .fa sequences:   %i" % (c_in_fa))
     # Read in FASTA sequences to check for uppercase sequences.
     seqs_dic = gplib.read_fasta_into_dic(args.in_fa)
+    # Check for lowercase only sequences, which cause GP to crash.
+    error_mess = "input sequences encountered containing "\
+        "only lowercase characters or lowercase characters in between "\
+        "uppercase characters. Please provide either all uppercase "\
+        "sequences or sequences containing uppercase regions surrounded "\
+        "by lowercase context regions for structure calculation (see "\
+        "viewpoint concept in original GraphProt publication "\
+        "for more details)"
+    if args.ws_pred:
+        bad_ids = gplib.check_seqs_dic_format(seqs_dic)
+        assert not bad_ids, "%s" % (error_mess)
+
     c_uc_nt = gplib.seqs_dic_count_uc_nts(seqs_dic)
     assert c_uc_nt, "no uppercase nucleotides in input .fa sequences. "\
                     "Please change sequences to uppercase (keep in mind "\