Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion R/IO.R
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,19 @@ read.FCS <- function(filename,
}
tmp <- new("flowFrame", exprs=mat, description= description,
parameters=params)

# compare column datatypes to general datatype => print warning when columns don't match
identifier(tmp) <- basename(identifier(tmp))

main_datatype <- tmp@description$"$DATATYPE"
datatype_keywords <- grep("P[0-9]+DATATYPE", names(tmp@description), value = TRUE)
if (length(datatype_keywords) > 0) {
datatype_nonMain <- names(which(tmp@description[datatype_keywords] != main_datatype))
channels_nonMain <- unlist(tmp@description[gsub("DATATYPE", "N", datatype_nonMain)])
if (length(channels_nonMain) > 0){
warning(paste0("The following columns have a different datatype than the main one, and might be wrongly loaded: ",
paste(channels_nonMain, collapse = ", ")))
}
}
return(tmp)
}

Expand Down
1,119 changes: 1,119 additions & 0 deletions inst/extdata/S8_mliver.fcs

Large diffs are not rendered by default.