code: def run_gblocks(align_fasta_file, **kwargs):
      
      cl = GblocksCommandline(aln_file=align_fasta_file, **kwargs)
      r, e = cl.run()
  
      print("Gblocks:", cl, file=sys.stderr)
  
      if e:
          print("***Gblocks could not run", file=sys.stderr)
          return None
      else:
          print(r, file=sys.stderr)
          alignp = re.sub(r'.*Gblocks alignment:.*\(([0-9]{1,3}) %\).*', \
              r'\1', r, flags=re.DOTALL)
          alignp = int(alignp)
          if alignp <= 10:
              print("** WARNING ** Only %s %% positions retained by Gblocks. " \
                  "Results aborted. Using original alignment instead.\n" % alignp, file=sys.stderr)
              return None
          else:
              return align_fasta_file+"-gb"
docs: remove poorly aligned positions and divergent regions with Gblocks