Skip to contents

Puts the numbers that RSEM wrote about each sample next to each other: how the reads were assigned (.cnt, rsem_mapping_qc()), what model was learned (.model, rsem_model_qc()), the noise share (.theta, rsem_noise_qc()) and a few numbers of the gene results. It repeats no calculation of those functions; it joins their results by sample and says whether the files agree.

Usage

rsem_qc_summary(data = "data", metadata = NULL, sample_from = "filename")

Arguments

data

Directory that contains the RSEM files.

metadata

Path to the metadata CSV, or NULL to find the files in data (see Input).

sample_from

With metadata = NULL: "filename" (the default) or "parent_dir".

Value

A data frame with one row per sample (the samples of the gene results): sample_id; from the gene results genes, tpm_total, genes_zero_length (effective length 0) and genes_detected (TPM of at least 1); from the .cnt file n_total, alignable_fraction, unique_gene_fraction, uncertain_fraction, alignments_per_read and read_type; from the .model file model_type, forward_prob, length_mean, length_sd and rspd_estimated; from the .theta file noise_fraction; and files_agree, FALSE when the read type of the .cnt file is not the model type of the .model file (NA when one of them is missing).

Details

The .cnt, .model and .theta files are looked for under data (RSEM writes them in <name>.stat/); a kind that is not there is left out with a message, so the table also works for results that were copied without their .stat folders. The samples are named after the files, as in rsem_read(), so A.genes.results and A.stat/A.cnt are the sample A.

Examples

if (FALSE) { # \dontrun{
"rsem" |> rsem_qc_summary()
} # }