Hi Sean
Thanks for your reply,
As i have short reads of 50b, I've modified the code accordigly to your
suggestion:
gn.m1<-getBM(attributes= c("hgnc_symbol"),
       filters=c("chromosome_name","start",*"end"*),
       values=list(t.cpd[1:10,1],as.numeric(t.cpd[1:10,2]),*
as.numeric(t.cpd[1:10,2])+50*), mart=ensembl)

But still having more genes :
hgnc_symbol
1      UBE2G1
2      DUSP5P
3   HIST3H2BA
4     ZNF847P
5     ACTBP11
6     ZC3H11B
........
8488     PPP2R2C
8489        WFS1
8490    SNORD73A
8491     SNORA24
8492     SNORA26

Did I miss something  ?
Thanks again

Regards,
Ramzi
----------------------------------------------------------------


On Mon, Dec 7, 2009 at 3:57 PM, Sean Davis <[email protected]> wrote:

> On Mon, Dec 7, 2009 at 9:52 AM, Ramzi TEMANNI <[email protected]>
> wrote:
> > Hi,
> > I want to extract the gene names knowing the chromosome and the position
> for
> > each genes:
> >> t.cpd[1:10,1:2]
> >      CHR.M1 POS.M1
> >  [1,] "12"   "140059033"
> >  [2,] "19"   "164634640"
> >  [3,] "10"   "32347784"
> >  [4,] "11"   "30576841"
> >  [5,] "2"    "86479831"
> >  [6,] "12"   "237019866"
> >  [7,] "4"    "76487174"
> >  [8,] "20"   "136121868"
> >  [9,] "2"    "6255547"
> > [10,] "1"    "67658137"
> >
> > i use the following commands:
> > library(biomaRt)
> > mart = useMart("ensembl")
> > ensembl = useDataset("hsapiens_gene_ensembl", mart = mart)
> > gn.m1<-getBM(attributes= c("hgnc_symbol"),
> >       filters=c("chromosome_name","start"),
> >       values=list(t.cpd[1:10,1],t.cpd[1:10,2]), mart=ensembl)
> >
> > I'm expecting having a list of 10 genes names, but instead i get 8652
> genes:
> > hgnc_symbol
> > 1      OR2M1P
> > 2      OR2L1P
> > 3   HSD17B7P1
> > 4     OR14L1P
> > 5       OR2W5
> > 6       VN1R5
> > ......
> > 8649        WFS1
> > 8650    SNORD73A
> > 8651     SNORA24
> > 8652     SNORA26
> >
> > Did I miss something ?
>
> Your query will pull out all genes that are in the chromosomal regions
> STARTING with your start position.  In other words, you are getting
> all of the genes that are to the right of the start positions.  You
> probably want to specify an end position as well as a start position
> for your query.
>
> Sean
>

        [[alternative HTML version deleted]]

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to