Example #1
0
 def _call_cleanup(self,
                   input_fp,
                   output_dir,
                   params,
                   job_prefix,
                   poll_directly,
                   suppress_submit_jobs):
     """ Called as the last step in __call__.
     """
     if poll_directly:
         if params['observation_metadata_fp'] is not None:
             observation_metadata = \
                 parse_observation_metadata(
                     open(params['observation_metadata_fp'], 'U'))
         else:
             observation_metadata = None
         biom_fp = join(output_dir, 'observation_table.biom')
         biom_table = make_otu_table(
             open(join(output_dir, 'observation_map.txt'), 'U'),
             observation_metadata)
         write_biom_table(biom_table, biom_fp)
     else:
         # can't construct the final biom file if not polling
         # directly as the final observation map won't have been created yet
         pass
 def _call_cleanup(self,
                   input_fp,
                   output_dir,
                   params,
                   job_prefix,
                   poll_directly,
                   suppress_submit_jobs):
     """ Called as the last step in __call__.
     """
     if poll_directly:
         if params['observation_metadata_fp'] is not None:
             observation_metadata = \
                 parse_observation_metadata(
                     open(params['observation_metadata_fp'], 'U'))
         else:
             observation_metadata = None
         biom_fp = join(output_dir, 'observation_table.biom')
         biom_table = make_otu_table(
             open(join(output_dir, 'observation_map.txt'), 'U'),
             observation_metadata)
         write_biom_table(biom_table, biom_fp)
     else:
         # can't construct the final biom file if not polling
         # directly as the final observation map won't have been created yet
         pass
 def _call_cleanup(self, input_fp, output_dir, params, job_prefix, poll_directly, suppress_submit_jobs):
     """ Called as the last step in __call__.
     """
     if poll_directly:
         if params["observation_metadata_fp"] != None:
             observation_metadata = parse_observation_metadata(open(params["observation_metadata_fp"], "U"))
         else:
             observation_metadata = None
         biom_fp = join(output_dir, "observation_table.biom")
         biom_f = open(biom_fp, "w")
         biom_f.write(make_otu_table(open(join(output_dir, "observation_map.txt"), "U"), observation_metadata))
         biom_f.close()
     else:
         # can't construct the final biom file if not polling
         # directly as the final observation map won't have been created yet
         pass