Description Usage Arguments Details Value Author(s) References Examples
View source: R/RC_annotationCheck.R
Performe a check between your Data and Annotation dataframe.
1 | RC_annotationCheck(Data, Design)
|
Data |
Your initial dataframe containing the gene expression or microarray value for examples |
Design |
Your dataframe descrining your Data. It should match the columns of your Data dataframe. |
Check the number of row in Annotation with number of column in Data. It also check the names and give some useful messages.
Return the empty void of dark matter. But is dark matter emtpy ?
Benjamin Vittrant
The experience to avoid futur problems.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
RC_annotationCheck = function(Data, Annotation){
# Data checking and error handling
#row_Data = dim(Data)[1]
col_Data = dim(Data)[2]
row_Annotation = dim(Annotation)[1]
col_Annotation = dim(Annotation)[2]
if(col_Data != row_Annotation){
return("Your annotation file has not the same number of rows than your number of columns in your data file")
}
if(colnames(Annotation)[1] != "Feature"){
return("The first column of your annotation file shoudl be called Feature and be the same as the colnames of your data file.")
}
if(!all(colnames(Data) == Annotation[,1]) ){
return("Your rownames in Data don't match feature name in Annotation or are not in the same order !")
}
# Everything good function can continue
print(paste("You have", (col_Annotation-1),"descriptors for your features in your annotation file plus the first column Feature:", sep = " "))
print(colnames(Annotation))
#return()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.