parallel_part(data, parallel) -> part

  Splits off samples from the the given data list and the given number of parallel jobs based on the ``SGE_TASK_ID`` environment variable.

  **Parameters:**

  ``data`` : [object]
    A list of data that should be split up into ``parallel`` parts

  ``parallel`` : int or ``None``
    The total number of parts, in which the data should be split into

  **Returns:**

  ``part`` : [object]
    The desired partition of the ``data``

def parallel_part(data, parallel):
  """parallel_part(data, parallel) -> part

  Splits off samples from the the given data list and the given number of parallel jobs based on the ``SGE_TASK_ID`` environment variable.

  **Parameters:**

  ``data`` : [object]
    A list of data that should be split up into ``parallel`` parts

  ``parallel`` : int or ``None``
    The total number of parts, in which the data should be split into

  **Returns:**

  ``part`` : [object]
    The desired partition of the ``data``
  """
  if parallel is None or "SGE_TASK_ID" not in os.environ:
    return data

  data_per_job = int(math.ceil(float(len(data)) / float(parallel)))
  task_id = int(os.environ['SGE_TASK_ID'])
  first = (task_id-1) * data_per_job
  last = min(len(data), task_id * data_per_job)
  return data[first:last]