hello BioC-users, I would like to ask your hep in converting a data.frame for the use of biomaRt. I have a tab-delimited table of of protein ids that looks like that (this is a part of a huge table from a proteomics experiment): 45 FBpp0070037 46 FBpp0070039;FBpp0070040 47 FBpp0070041;FBpp0070042;FBpp0070043 48 FBpp0070044;FBpp0110571 ... For each of these protein Ids (FBpp...), I would like to extract the gene id (Fbgn....) in a third column. the output table should looks like that: 45 FBpp0070037 FBgn001234 46 FBpp0070039;FBpp0070040 FBgn00094432;FBgn002345 47 FBpp0070041;FBpp0070042;FBpp0070043 FBgn0001936;FBgn000102;FBgn004527 48 FBpp0070044;FBpp0110571 FBgn0097234;FBgn00183 ... I was thinking using biomaRt, but I could find a way of automating it for the complete protein ids in the line. What I have done so far is this for loop: for(i in 1:dim(data)[1]){ temp=unlist(strsplit(data[i,2],";")) temp= gsub("REV__", "", temp) result= getBM(attributes=c("flybase_translation_id","flybase_gene_id","flybasename_gene"),filters="flybase_translation_id",values=temp, mart=mart, ) charresult ="" for (j in 1:length(result[[1]])) { # charresult<-paste(charresult,">", result[[1]][j],":",result[[2]][j], "\t", sep="") charresult<-paste(charresult, result[[2]][j], ";", sep="") } out<-"CompleteResults.txt" cat("line: ", i-1,"\t", "was written to ");cat(out);cat("\n") write.table(paste(i-1, charresult, sep="\t"),out, sep="\t", quote=F, col.names=F, row.names=F,append=T) } What I am doing is converting the string of FBpp Ids into a character vector and than run each line into the getBM command. I first think it is a bad idea, as I am using a loop to inquire an online data base, but i don't have a better option at the moment. The second problem is that it just takes a lot of time. I would appreciate your Ideas, If there is a better/faster way of doing it Thanks A. [[alternative HTML version deleted]]