On 4/8/21 2:30 PM, pooja sinha wrote:> Hi All,
>
> I am trying to extract gene list from chromosome number and position, for
> that I am using biomaRt in R but I am getting error messages as shown
> below. Also below is the code I am using for extraction.
>
> library("biomaRt")
> listMarts()
> ensembl <- useMart("ensembl")
> datasets <- listDatasets(ensembl)
> ensembl = useDataset("rnorvegicus_gene_ensembl",mart=ensembl)
> AT_AC_Gene <-
read.csv("AT-AC-methylkit_biomart-4-7-21.csv",header=T)
#--- a this point I get
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
? cannot open file 'AT-AC-methylkit_biomart-4-7-21.csv': No such file
or directory
> attributes <-
>
c("external_gene_name","ensembl_gene_id","start_position","end_position","rgd_symbol","chromosome_name")
> filters <-
c("chromosome_name","start","end")
> values <- list(AT_AC_Gene$chr,AT_AC_Gene$start,AT_AC_Gene$end)
> final_1 <- getBM(attributes=attributes, filters=filters, values=values,
> mart=ensembl)
>
> The code runs well without any error but the final1 output has 0
> observations of 6 variables. Why?
>
> Can anyone help me with this?
You are more likely to get a useful response on the BioC mailing list.
It appears you have a dependenciy of a csv file that you have not told
us about.
--
David
>
>
> Thanks,
>
> Puja
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.