Writes the gene by sample table as a tab-separated file, with the gene in
the first column, optionally followed by the original gene IDs behind each
row and the gene type from a GTF file, then one column per sample. A file
name ending in .gz is compressed. The file is for sharing and for other
tools; to continue in R, keep using the table itself.
Usage
rsem_write(x, file, ids = attr(x, "gene_ids", exact = TRUE), annotation = NULL)Arguments
- x
The gene by sample table.
- file
Output path (
.tsvor.tsv.gz).- ids
The attribute
"gene_ids"of the tablersem_read()returned,attr(tpm, "gene_ids"): adds the columngene_idwith the original IDs of each row, joined by";"where several IDs were summed into one symbol. The other functions return new tables without this attribute, so take it from the tablersem_read()gave. By default the attribute ofxis used when it is there.- annotation
Optional GTF file or data frame, as in
rsem_biotype_profile(): adds the columngene_type.