Mercurial > repos > anmoljh > candidate_compound_select
comparison select_compound.R @ 0:557baa97ed72 draft
planemo upload commit e713bcfa1b1690f9a21ad0bd796c2d385f646e66-dirty
| author | anmoljh |
|---|---|
| date | Mon, 12 Jun 2017 08:59:52 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:557baa97ed72 |
|---|---|
| 1 args <- commandArgs(T) | |
| 2 arg1 <- args[1] ## Reae Input prediction file | |
| 3 arg2 <- args[2] ## Less Than | |
| 4 arg3 <- args[3] ## Greater Than or equal too | |
| 5 arg4 <- args[4] ## Active / Inactive | |
| 6 arg5 <- args[5] ## define output file name | |
| 7 asd <- read.table(arg1,row.names=1,header=T) | |
| 8 if (arg4 == "Active") { | |
| 9 refined <- asd[asd[,1] >= as.numeric(arg3) & asd[,1] <= as.numeric(arg2),] | |
| 10 compound <- rownames(refined) | |
| 11 refined <- cbind(compound,refined) | |
| 12 } else if((arg4 == "Inactive") ){ | |
| 13 #refined <- asd[asd[,1] <= as.numeric(arg2),] | |
| 14 refined <- asd[asd[,2] >= as.numeric(arg3) & asd[,2] <= as.numeric(arg2),] | |
| 15 compound <- rownames(refined) | |
| 16 refined <- cbind(compound,refined)} | |
| 17 ###write.table(dw,file=args3,row.names=FALSE,sep="\t") | |
| 18 write.table(refined,file=arg5,row.names=FALSE,sep="\t") | |
| 19 |
