Not sure what went wrong with your analysis. iLINCS API and UIs should generally give identical results. Below is the minimal example of using the API on the example signature from iLINCS (sample1 at
http://www.ilincs.org/ilincs/signatures/main/upload). This is an excerpt from the examples in the GitHub (
https://github.com/uc-bd2k/ilincsAPI). I downloaded the example file (sample1.csv) and used iLINCS API to analyze it with iLINCS. The results are identical to the ones obtained by uploading this same file to iLINCS via UI.
Please note that in the example, I create a unique file name for local file to avoid cashing issue. This can sometime cause problems with API. If this is not addressing your problem, please give me a more specific example and I will help you troubleshoot.
## Find connected signatures based on user submitted full signature
```{r}
library(httr)
library(jsonlite)
library(htmltools)
# assuming that the "sample1.csv" file is downloaded from iLINCS and saved in ~/Downloads
setwd("~/Downloads")
# creating tab delimited signature file for upload
sample1<-read.csv("sample1.csv")
## creating unique file name to avoid caching issues
localFileName<-paste0("sigFile",floor(runif(1)*1e10),".tsv")
write.table(sample1,file=localFileName,sep="\t",row.names=F,col.names = T,quote=F)
# upload signature file to ilincs
req <- POST("
http://www.ilincs.org/api/SignatureMeta/upload", body=list(file=upload_file(localFileName)))
ilincsSignatureFile <- httr::content(req)$status$fileName[[1]]
# Find connected chemical perturbagen signatures
req <- (POST("
http://www.ilincs.org/api/ilincsR/findConcordances", body = list(file=ilincsSignatureFile, lib="LIB_5"), encode = "form"))
output <- data.table::rbindlist(httr::content(req)$concordanceTable, use.names = TRUE, fill = TRUE)
head(output)
```