Beispiel #1
0
 def _para(self, *paraArgs):
     """ssh to the remote machine and run the para command.  paraArgs are
     passed as arguments to the para command. Returns stdout as a list of
     lines, stderr in ProcException if the remote program encouners an
     error. There is a possibility for quoting hell here."""
     remCmd = "cd " + self.paraDir + "; para " + " ".join(paraArgs)
     fileOps.prLine(sys.stderr, "ssh ", self.paraHost, " ", remCmd)
     return procOps.callProcLines(["ssh", "-o", "ClearAllForwardings=yes", self.paraHost, remCmd])
Beispiel #2
0
 def _para(self, *paraArgs):
     """ssh to the remote machine and run the para command.  paraArgs are
     passed as arguments to the para command. Returns stdout as a list of
     lines, stderr in ProcException if the remote program encouners an
     error. There is a possibility for quoting hell here."""
     remCmd = "cd " + self.paraDir + "; para " + " ".join(paraArgs)
     fileOps.prLine(sys.stderr, "ssh ", self.paraHost, " ", remCmd)
     return procOps.callProcLines(
         ["ssh", "-o", "ClearAllForwardings=yes", self.paraHost, remCmd])
Beispiel #3
0
 def dump(self, fh, desc=None):
     self.__calcParams()
     if desc != None:
         prLine(fh, desc)
     prLine(fh, "  data:  len: ", len(self.data), "  min: ", self.data.min, "  max: ", self.data.max)
     prLine(fh, "  bins:  num: ", self.numBins, "  size: ", self.binSize, "  min: ", self.binMin, "  max: ", self.binMax)
     prLine(fh, "  use:  num: ", self.numBinsUse, "  size: ", self.binSizeUse, "  min: ", self.binMinUse, "  max: ", self.binMaxUse,
            "  floor: ", self.binFloorUse, "  ceil: ", self.binCeilUse)
Beispiel #4
0
 def dump(self, fh, desc=None):
     self.__calcParams()
     if desc != None:
         prLine(fh, desc)
     prLine(fh, "  data:  len: ", len(self.data), "  min: ", self.data.min,
            "  max: ", self.data.max)
     prLine(fh, "  bins:  num: ", self.numBins, "  size: ", self.binSize,
            "  min: ", self.binMin, "  max: ", self.binMax)
     prLine(fh, "  use:  num: ", self.numBinsUse, "  size: ",
            self.binSizeUse, "  min: ", self.binMinUse, "  max: ",
            self.binMaxUse, "  floor: ", self.binFloorUse, "  ceil: ",
            self.binCeilUse)
 def dump(self, fh, desc=None):
     self._calcParams()
     if desc is not None:
         prLine(fh, desc)
     prLine(
         fh,
         "  data: len: {}  min: {} max: {}".format(len(self.data),
                                                   self.data.min,
                                                   self.data.max))
     prLine(
         fh, "  bins: num: {} size: {} min: {} max: {}".format(
             self.numBins, self.binSize, self.binMin, self.binMax))
     prLine(
         fh, "  use:  num: {} size: {} min: {} max: {} floor: {} ceil: {}".
         format(self.numBinsUse, self.binSizeUse, "", self.binMinUse,
                self.binMaxUse, self.binFloorUse, self.binCeilUse))
Beispiel #6
0
 def dump(self, fh):
     "print content to file"
     prLine(fh, "query:  ", self.qSeq)
     prLine(fh, "target: ", self.tSeq)
     for blk in self:
         blk.dump(fh)
Beispiel #7
0
 def dump(self, fh):
     "print content to file"
     prLine(fh, "\t> query:  ", self.q)
     prLine(fh, "\t  target: ", self.t)
Beispiel #8
0
 def dump(self, fh):
     "print content to file"
     prLine(fh, "query:  ", self.qSeq)
     prLine(fh, "target: ", self.tSeq)
     for blk in self:
         blk.dump(fh)
Beispiel #9
0
 def dump(self, fh):
     "print content to file"
     prLine(fh, "\t> query:  ", self.q)
     prLine(fh, "\t  target: ", self.t)
Beispiel #10
0
def prExceptions(er, ex):
    "print and exception and any recorded ones"
    sys.stdout.flush()
    sys.stderr.flush()
    fh = sys.stderr
    fileOps.prLine(fh, "\n"+strOps.dup(78, '='))
    fileOps.prLine(fh, "Unexpected exception:")
    fileOps.prLine(fh, ProcException.formatExcept(ex))
    for e in er.errors:
        fileOps.prLine(fh, strOps.dup(78, '-'))
        fileOps.prLine(fh, ProcException.formatExcept(e))
    fileOps.prLine(fh, strOps.dup(78, '^'))
    sys.stderr.flush()
Beispiel #11
0
def prExceptions(er, ex):
    "print and exception and any recorded ones"
    sys.stdout.flush()
    sys.stderr.flush()
    fh = sys.stderr
    fileOps.prLine(fh, "\n" + strOps.dup(78, '='))
    fileOps.prLine(fh, "Unexpected exception:")
    fileOps.prLine(fh, ProcException.formatExcept(ex))
    for e in er.errors:
        fileOps.prLine(fh, strOps.dup(78, '-'))
        fileOps.prLine(fh, ProcException.formatExcept(e))
    fileOps.prLine(fh, strOps.dup(78, '^'))
    sys.stderr.flush()