Hi, I have a text file containing a list of snp rsIDs. I want to make the same request on each line of this file. The value must allow the command to be carried out on each line and therefore contain each line one after the other. Here is the code I tried:
#> A code chunk library(biomaRt) Data <- readLines ("rsID.txt") length(Data) #Data_vec <- as.vector(Data) Data_vec<-c("Data") require(biomaRt) ensembl <- useMart("ENSEMBL_MART_SNP", dataset = "hsapiens_snp") getBM(attributes=c( "refsnp_id", "ensembl_gene_stable_id", "ensembl_transcript_stable_id"), filters="snp_filter", values="Data_vec", mart=ensembl, uniqueRows=TRUE)
but I always have this message:
 refsnp_id ensembl_gene_stable_id ensembl_transcript_stable_id
<0 rows> (or 0-length row.names)
How can I do ?