pimlico.datatypes.r module

class RTabSeparatedValuesFile(base_dir, pipeline, module=None, additional_name=None, use_main_metadata=False, **kwargs)[source]

Bases: pimlico.datatypes.files.File

Tabular data stored in a TSV file, suitable for reading in using R’s read.delim function.

datatype_name = 'r_tsv'
absolute_path
get_detailed_status()[source]

Returns a list of strings, containing detailed information about the data. Only called if data_ready() == True.

Subclasses may override this to supply useful (human-readable) information specific to the datatype. They should called the super method.

class RTabSeparatedValuesFileWriter(base_dir, headings=None, **kwargs)[source]

Bases: pimlico.datatypes.base.PimlicoDatatypeWriter

Writer for TSV files suitable for reading with R.

If headings is specified, this is written as the first line of the file, so headings=TRUE should be used when reading into R.

Double quotes (“) in the fields will be replaced by double-double quotes (“”), which R interprets as a double quote. Fields containing tabs will be surrounded by normal double quotes. When you read the data into R, the default value of quotes (“) should therefore be fine. No escaping is performed on single quotes (‘).

absolute_path
write_row(row)[source]

If elements are not of string type, they will be coerced to a string for writing. If you want to format them differently, do it before calling this method and pass in strings.