ecotyper.rcompat.io¶
Readers/writers for the tab-delimited files EcoTyper’s R scripts exchange.
read_delim()mimicsread.delim(header,check.names, automatic row names when the header has one field less,type.convert).write_table()mimicswrite.table(x, sep = "\t")including R’s number formatting (15 significant digits, fixed vs. scientific choice), so files written by the port can be diffed byte for byte with R’s.
Functions
|
Format one double as |
|
Rows of a float matrix formatted as |
|
|
|
Read an expression matrix with gene names in the first column ( |
|
Read a numeric matrix written by |
|
|
|
|
- ecotyper.rcompat.io.read_delim(path, check_names=True, row_names_col=None, numeric_only=False)[source]¶
read.delim(path).Row names (if the header has one field less than the data, or
row_names_col=True) become the index as strings; otherwise the index is"1".."n"like R’s automatic row names.
- ecotyper.rcompat.io.read_matrix(path, check_names=True)[source]¶
Read a numeric matrix written by
write.table(row names + header).
- ecotyper.rcompat.io.read_expression(path, check_names=False, dedup_first_col=True)[source]¶
Read an expression matrix with gene names in the first column (
fread(path, data.table = F);check_names=Trueemulates read.delim).
- ecotyper.rcompat.io.format_real(x, digits=15)[source]¶
Format one double as
write.tabledoes (formatReal+EncodeReal0withdigits = 15).
- ecotyper.rcompat.io.format_rows(mat, digits=15)[source]¶
Rows of a float matrix formatted as
format_real()(NaN asNA), cells joined by tabs.