Turned PyLSF into a package.


git-svn-id: https://subversion.umiacs.umd.edu/tuxedo/projects/lincer/branches/lincer_v3@4029 e53bd72b-32bf-4dec-aa00-2f942a4fcc91
Added LSFBatch, a class to manage LSF batch jobs.

PyLSF wraps the LSF C API provided by liblsf.so.
LSFBatch wraps the Python API provided by PyLSF.

git-svn-id: https://subversion.umiacs.umd.edu/tuxedo/projects/lincer/branches/lincer_v3@4030 e53bd72b-32bf-4dec-aa00-2f942a4fcc91
Implemented Annotate.with_Pfam_status.

Rewrote get_pfam_hit_transcripts() from scratch,
and replaced all LSFlib functionality with PyLSF.

Created bin dir; added perl script dependencies.
Wrote utils.GTF.GTFRow.to_line() to update rows.

git-svn-id: https://subversion.umiacs.umd.edu/tuxedo/projects/lincer/branches/lincer_v3@4035 e53bd72b-32bf-4dec-aa00-2f942a4fcc91
Silenced C compiler warning.

PyLSF.c:306: warning: initialization from incompatible pointer type

Problem: When METH_KEYWORDS is specified, the corresponding function has
type PyCFunctionWithKeywords. The structure built by PyMethodDef expects
all functions to be of type PyCFunction.

Solution: Explicitly cast the function to PyCFunctionWithKeywords.
Allowed submit()'s optional kwargs to be set to None.
Made queue into an optional kwarg.
Added a memory limit option to submit().
Passed memory limits to LSF batch jobs.
Rewrote PyLSF specifically for batch jobs.

Updated PyLSF and LSFBatch wrappers accordingly.
Propagated changes to Pfam and PhyloCSF wrappers.
Bugfix.

Recent LSFBatch changes caused all LSF jobs to be written to the same
stdout/stderr file.
Fixed naming logic.
Re-added non-batch status(), wait(), and kill().
Turned lsb_init() argument into a macro.
Added QueueManager: a queue for the LSF queue.

For when the number of jobs exceeds the LSF queue size limit.
Bugfix.

Fixes case where there are fewer than maxJobs jobs.
Reduced excessive logging.
Removed LSFBatch.

Deprecated by QueueManager.
Handled Ctrl-C in PyLSF wait commands.

SIGINT now kills all related LSF jobs.
Changed behavior of Ctrl-C in PyLSF wait commands.

On second thought, killing all processes seems drastic.
Instead, simply return control and let Python clean up.
Made PyLSF jobs re-runnable by default.

From lsbatch.h:
/**< Indicates the job is re-runnable.
 * If the execution host of the job is considered down, the batch
 * system will re-queue this job in the same job queue, and re-run
 * it from the beginning when a suitable host is found. Everything
 * will be as if it were submitted as a new job, and a new job ID will
 * be assigned. The user who submitted the failed job will receive a
 * mail notice of the job failure, requeueing of the job, and the
 * new job ID.
 *
 * For a job that was checkpointed before the execution host went down,
 * the job will be restarted from the last checkpoint. Equivalent to
 * bsub -r command line option existence. */