# HG changeset patch # User anmoljh # Date 1527842310 14400 # Node ID 639d350de274a439501b275fdc55d757d2244f84 planemo upload commit a1f4dd8eb560c649391ada1a6bb9505893a35272-dirty diff -r 000000000000 -r 639d350de274 select_compound.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/select_compound.R Fri Jun 01 04:38:30 2018 -0400 @@ -0,0 +1,19 @@ +args <- commandArgs(T) +arg1 <- args[1] ## Reae Input prediction file +arg2 <- args[2] ## Less Than +arg3 <- args[3] ## Greater Than or equal too +arg4 <- args[4] ## Active / Inactive +arg5 <- args[5] ## define output file name +asd <- read.table(arg1,row.names=1,header=T) +if (arg4 == "Active") { +refined <- asd[asd[,1] >= as.numeric(arg3) & asd[,1] <= as.numeric(arg2),] +compound <- rownames(refined) +refined <- cbind(compound,refined) +} else if((arg4 == "Inactive") ){ +#refined <- asd[asd[,1] <= as.numeric(arg2),] +refined <- asd[asd[,2] >= as.numeric(arg3) & asd[,2] <= as.numeric(arg2),] +compound <- rownames(refined) +refined <- cbind(compound,refined)} +###write.table(dw,file=args3,row.names=FALSE,sep="\t") +write.table(refined,file=arg5,row.names=FALSE,sep="\t") + diff -r 000000000000 -r 639d350de274 select_compound.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/select_compound.xml Fri Jun 01 04:38:30 2018 -0400 @@ -0,0 +1,38 @@ + + +This tool selects compounds from prediction result based on score + + + R + + + + + + +select_compound.R $predictionfile $LT $GT $type $SelectedCompound + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 639d350de274 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Fri Jun 01 04:38:30 2018 -0400 @@ -0,0 +1,6 @@ + + + + + +