Add as destination of output data
433564
def _add_output(self, out):
        
        self._outputs += [out]
        out.node = self
        out._set_as_output_of(self)
836479
def tab(self, output):
        """"""
        import csv
        csvwriter = csv.writer(self.outfile, dialect=csv.excel_tab)
        csvwriter.writerows(output)
1282294
function fileToOutput(output, filePath) {
    var book = output.getBook();
    var readme = book.getReadme();
    var fileReadme = readme.getFile();

    if (
        path.basename(filePath, path.extname(filePath)) == 'README' ||
        (fileReadme.exists() && filePath == fileReadme.getPath())
    ) {
        filePath = path.join(path.dirname(filePath), 'index' + OUTPUT_EXTENSION);
    } else {
        filePath = PathUtils.setExtension(filePath, OUTPUT_EXTENSION);
    }

    return LocationUtils.normalize(filePath);
}
1069952
def _get_output(algorithm, iport=0, iconnection=0, oport=0, active_scalar=None,
                active_scalar_field='point'):
    """"""
    ido = algorithm.GetInputDataObject(iport, iconnection)
    data = wrap(algorithm.GetOutputDataObject(oport))
    data.copy_meta_from(ido)
    if active_scalar is not None:
        data.set_active_scalar(active_scalar, preference=active_scalar_field)
    return data
776153
def appendData(self, content):
		
		if self.pcdata is not None:
			self.pcdata += content
		else:
			self.pcdata = content
256972
def add(self, data):
        """"""
        assert isinstance(data, bytes)
        with self.lock:
            self.buf += data
1244698
def write_output(self):
        """"""
        for data in self.output_data.values():
            self.create_output(data.get('key'), data.get('value'), data.get('type'))
316250
def write_output(self, data, filename=None, args=None):
        """"""
        if args:
            if not args.linejson:
                return 0
        if not filename: filename = args.linejson
        entrylist = []
        for entry in data['entries']:
            entrystring = json.dumps(entry, sort_keys=True)
            entrylist.append(entrystring)
        
        with open(str(filename), 'w') as output_file:
            output_file.write('\n'.join(entrylist))
353994
def save_outputs(outputs, output_fpath):
    
    df = pd.DataFrame(outputs)
    with pd.ExcelWriter(output_fpath) as writer:
        df.to_excel(writer)
263579
def _add_plots_to_output(out, data):
    
    out["plot"] = {}
    diagram_plot = _add_diagram_plot(out, data)
    if diagram_plot:
        out["plot"]["diagram"] = diagram_plot
    scatter = _add_scatter_plot(out, data)
    if scatter:
        out["plot"]["scatter"] = scatter
    scatter_global = _add_global_scatter_plot(out, data)
    if scatter_global:
        out["plot"]["scatter_global"] = scatter_global
    return out
1017912
def _update_data(self, new_data):
        """"""

        log.debug("Adding %d data points to data for %s" %
                  (len(new_data), self.path))
        if self._data is None:
            self._data = new_data
        else:
            if self.data_type.nptype is not None:
                data_pos = (
                    self._data_insert_position,
                    self._data_insert_position + len(new_data))
                self._data_insert_position += len(new_data)
                self._data[data_pos[0]:data_pos[1]] = new_data
            else:
                self._data.extend(new_data)
1137668
def _writen(fd, data):
    """"""
    while data:
        n = os.write(fd, data)
        data = data[n:]
908982
def set_output(self, output):
        
        self.output = output
        self.logger.info("assigning output to %s", self.output)
858822
def add( self, start, end, val ):
        """"""
        insort( self.bins[ bin_for_range( start, end, offsets=self.offsets ) ], ( start, end, val ) )
        assert val >= 0
        self.max_val = max(self.max_val,val)
138977
def append_data(dset, data):
    """"""
    N = data.shape[0] if hasattr(data, 'shape') else 1
    if N == 0:
        return
    oldlen = dset.shape[0]
    newlen = oldlen + N
    dset.resize(newlen, axis=0)
    dset[oldlen:] = data
194582
def add_new_data_port(self):
        """"""
        try:
            new_data_port_ids = gui_helper_state_machine.add_data_port_to_selected_states('OUTPUT', int, [self.model])
            if new_data_port_ids:
                self.select_entry(new_data_port_ids[self.model.state])
        except ValueError:
            pass
1138298
def _add_combine_info(output, combine_map, file_key):
    
    files_per_output = collections.defaultdict(list)
    for part_file, out_file in combine_map.items():
        files_per_output[out_file].append(part_file)
    out_by_file = collections.defaultdict(list)
    out = []
    for data in output:
        # Do not pass along nochrom, noanalysis regions
        if data["region"][0] not in ["nochrom", "noanalysis"]:
            cur_file = data[file_key]
            # If we didn't process, no need to add combine information
            if cur_file in combine_map:
                out_file = combine_map[cur_file]
                if "combine" not in data:
                    data["combine"] = {}
                data["combine"][file_key] = {"out": out_file,
                                             "extras": files_per_output.get(out_file, [])}
                out_by_file[out_file].append(data)
            elif cur_file:
                out_by_file[cur_file].append(data)
            else:
                out.append([data])
    for samples in out_by_file.values():
        regions = [x["region"] for x in samples]
        region_bams = [x["work_bam"] for x in samples]
        assert len(regions) == len(region_bams)
        if len(set(region_bams)) == 1:
            region_bams = [region_bams[0]]
        data = samples[0]
        data["region_bams"] = region_bams
        data["region"] = regions
        data = dd.set_mark_duplicates(data, data["config"]["algorithm"]["orig_markduplicates"])
        del data["config"]["algorithm"]["orig_markduplicates"]
        out.append([data])
    return out