changeset 4:4ad83aed5c3c draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/graphprot commit 15c382f71f1984aecff67ef9d268b992528996b2"
author bgruening
date Thu, 28 Jan 2021 15:06:14 +0000
parents ace92c9a4653
children ddcf35a868b8
files graphprot_predict_wrapper.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 "\