Skip to content
Snippets Groups Projects
Commit cd7ca66b authored by Olivier Langella's avatar Olivier Langella
Browse files

mcq.select.2pepbyprot checks argument validity, test OK

parent 858b60ef
No related branches found
Tags MassChroqR_0.3.0
No related merge requests found
......@@ -7,6 +7,8 @@
mcq.select.2pepbyprot=function(object, minimum.peptides.by.prot=2){
if ((class(object) == "mcqProtPep") || (class(object) == "mcq.skyline")) {
if (is.numeric(minimum.peptides.by.prot) & (minimum.peptides.by.prot>0)) {
nbpeptides <- length(unique(object@peptides$peptide))
nbprot <- length(unique(object@proteins$protein))
......@@ -26,7 +28,10 @@ mcq.select.2pepbyprot=function(object, minimum.peptides.by.prot=2){
cat (paste((nbprot - nbprotafter), " proteins dropped (containing less than ",minimum.peptides.by.prot," quantified peptides)\n", sep=""))
return (object)
}
else {
stop(paste("the argument 'minimum.peptides.by.prot' (", minimum.peptides.by.prot,") MUST be a numeric value greater than 0",sep=""))
}
}
else {
stop(paste("the class \"", class(object),"\" is not taken into account by mcq.select.2pepbyprot",sep=""))
......
......@@ -26,6 +26,9 @@ protPep <- mcq.select.2pepbyprot(protPep)
summary(protPep)
protPep <- mcq.select.2pepbyprot(protPep, 'rep')
summary(protPep)
cat ("*********************************************\n")
cat (" mcq.select.2pepbyprot(protPep) OK\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment