diff --git a/FUNCTIONS.R b/FUNCTIONS.R index 6e5490700db395c373f30617a6cb855cdac16e0e..95318d267b8278f64369f8d6ad755c0b0442dde8 100644 --- a/FUNCTIONS.R +++ b/FUNCTIONS.R @@ -165,11 +165,7 @@ runRelativeAntibodyUnits = function(fname1, fname2, MFI_CSV, MFI_N_ANTIGENS, TEM # MFI values as numeric L[,-which(colnames(L) %in% c("Location","Sample","Total Events","TotalEvents"))] = lapply(L[,-which(colnames(L) %in% c("Location","Sample","Total Events"))], as.numeric) - # Skip - ROW_C = 239 - - ## Load the counts to check for run quality control - C <- as.data.frame(read_excel(fname1, skip = ROW_C-1)) + C <- as.data.frame(read_excel(fname1, skip = count_row_number+1)) ## Find all blank rows (i.e. rows that are all NA). ## Then keep rows preceding the first blank row. @@ -180,10 +176,6 @@ runRelativeAntibodyUnits = function(fname1, fname2, MFI_CSV, MFI_N_ANTIGENS, TEM C <- C[1:(blank.row.number-1),] } - # The first row will be the header - colnames(C) = C[1, ] - # Removing the first row. - C = C[-1, ] ## Exclude column that corresponds to "Total events" C <- C[, !(colnames(C) %in% c("Total Events","TotalEvents"))]