check_samples: See if sample and count data.frames have matching samples

View source: R/load.R

check_samplesR Documentation

See if sample and count data.frames have matching samples

Description

'check_samples()' takes sample and data data.frames and checks that the samples match between the two. It checks both 'counts' and 'normalised counts'. If there are samples in the samples data.frame that don't exist in the corresponding counts data.frame, an error is raised. If there are samples in the counts data.frame that aren't in the samples data.frame a warning is raised. If the samples match exactly, the function returns TRUE invisibly.

'check_samples_match_counts()' takes sample and count data.frames and checks that the samples match between the two. This does the actual checking that the samples match. 'check_samples()' gets the counts and normalised counts form the data data.frame and passes them on to 'check_samples_match_counts()'

Usage

check_samples(rnaseq_data, samples)

check_samples_match_counts(count_data, samples)

Arguments

rnaseq_data

data.frame of gene metadata, counts and normalised counts

samples

data.frame of sample info

count_data

data.frame of counts only

Value

TRUE invisibly if the samples match

Examples


check_samples_match_counts(test_all_data, samples_data)

check_samples_match_counts(counts, samples_data)

check_samples_match_counts(norm_counts, samples_data)


richysix/rnaseqtools documentation built on Jan. 26, 2025, 10:14 a.m.