text: user1771: I want to use the Homo.sapiens package in Bioconductor to retrieve the chromosome location start and end for each gene symbol in a specific reference (e.g. hg19 or hg38).
  Right now, I am using the following code:
  > select(Homo.sapiens, keys=c('KRAS'), cols <-c('SYMBOL', 'TXCHROM', 'TXSTART', 'TXEND'), keytype='SYMBOL')
  
    SYMBOL TXCHROM  TXSTART    TXEND
  1   KRAS   chr12 25358180 25403854
  2   KRAS   chr12 25386768 25403863
  
  My question is two-fold:
  
  How can I specify the human genome reference I want to retrieve the data from? (e.g. hg19 or hg38)
  Why do I receive multiple and different mappings through Homo.sapiens for some genes? If I check the locations through GeneCards I get:
  
  
  chr12:25,204,789-25,250,936 (GRCh38/hg38)
  chr12:25,357,723-25,403,870 (GRCh37/hg19)
  
  
  
  user48: I couldn't find how is this package build, my guess is that is as in the example of the OrganismDBI package. See that vignette section to build your own data package with the genome you want. 
  The locations are different because you ask for the transcript start and end, if you add the "TXNAME", you will (probably) see there are different transcripts, so different mappings are reported (untested). 
  Update
  The example of the OrganismDBI package builds correctly the Homo.sapiens package, which appears to be linked with hg19. I provide here the relevant code to build the package for hg19 and hg38.
  > source("https://bioconductor.org/biocLite.R")
  > biocLite("TxDb.Hsapiens.UCSC.hg19.knownGene")
  > biocLite("TxDb.Hsapiens.UCSC.hg38.knownGene")
  
  > library(OrganismDbi)
  
  # instructions for hg19, for hg38 change accordingly
  > gd <- list(join1 = c(GO.db="GOID", org.Hs.eg.db="GO"), 
               join2 = c(org.Hs.eg.db = "ENTREZID", 
                         TxDb.Hsapiens.UCSC.hg19.knownGene = "GENEID"))
  > destination <- tempfile()
  > dir.create(destination)
  > makeOrganismPackage(pkgname = "Homo.sapiens.hg19", graphData = gd, 
                        organism = "Homo sapiens", version = "1.0.0", 
                        maintainer = "Maintainer<maintainer@email>", 
                        author = "Author Name", destDir = destination, 
                        license = "Artistic-2.0")
  
  Creating package in /var/folders/sf/tfrswpc96jl8b4520mn784440000gn/T//RtmpzR4YnY/file111b490af70f/Homo.sapiens.hg19
  
  # installing package
  > install.packages(destination, repos = NULL, type="source")
  
  Then, you can load and use the packages with:
  > library(Homo.sapiens.hg19)
  > library(Homo.sapiens.hg38)
  
  > select(Homo.sapiens.hg19, keys=c('KRAS'), 
       cols = c('SYMBOL', 'TXCHROM', 'TXSTART', 'TXEND'), 
       keytype = 'SYMBOL')
  'select()' returned 1:many mapping between keys and columns
    SYMBOL TXCHROM  TXSTART    TXEND
  1   KRAS   chr12 25358180 25403854
  2   KRAS   chr12 25386768 25403863
  > select(Homo.sapiens.hg38, keys = c('KRAS'), cols = 
         c('SYMBOL', 'TXCHROM', 'TXSTART', 'TXEND'), keytype = 'SYMBOL')
  'select()' returned 1:many mapping between keys and columns
    SYMBOL TXCHROM  TXSTART    TXEND
  1   KRAS   chr12 25204789 25250931
  2   KRAS   chr12 25209168 25250936
  3   KRAS   chr12 25209431 25250803
  4   KRAS   chr12 25233819 25250929
  
  
original_text: 1771: <p>I want to use the <a href="https://www.bioconductor.org/packages/release/data/annotation/manuals/Homo.sapiens/man/Homo.sapiens.pdf" rel="noreferrer">Homo.sapiens</a> package in Bioconductor to retrieve the chromosome location start and end for each gene symbol in a specific reference (e.g. hg19 or hg38).</p>
  
  <p>Right now, I am using the following code:</p>
  
  <pre><code>&gt; select(Homo.sapiens, keys=c('KRAS'), cols &lt;-c('SYMBOL', 'TXCHROM', 'TXSTART', 'TXEND'), keytype='SYMBOL')
  
    SYMBOL TXCHROM  TXSTART    TXEND
  1   KRAS   chr12 25358180 25403854
  2   KRAS   chr12 25386768 25403863
  </code></pre>
  
  <p>My question is two-fold:</p>
  
  <ul>
  <li>How can I specify the human genome reference I want to retrieve the data from? (e.g. hg19 or hg38)</li>
  <li>Why do I receive multiple and different mappings through <code>Homo.sapiens</code> for some genes? If I check the locations through <a href="https://www.genecards.org/cgi-bin/carddisp.pl?gene=KRAS" rel="noreferrer">GeneCards</a> I get:
  
  <ul>
  <li><code>chr12:25,204,789-25,250,936 (GRCh38/hg38)</code></li>
  <li><code>chr12:25,357,723-25,403,870 (GRCh37/hg19)</code></li>
  </ul></li>
  </ul>
   48: <p>I couldn't find how is this package build, my guess is that is as in the example of the <a href="https://bioconductor.org/packages/release/bioc/vignettes/OrganismDbi/inst/doc/OrganismDbi.pdf" rel="nofollow noreferrer">OrganismDBI</a> package. See that vignette section to build your own data package with the genome you want. </p>
  
  <p>The locations are different because you ask for the transcript start and end, if you add the "TXNAME", you will (probably) see there are different transcripts, so different mappings are reported (untested). </p>
  
  <h3>Update</h3>
  
  <p>The example of the <a href="https://bioconductor.org/packages/release/bioc/vignettes/OrganismDbi/inst/doc/OrganismDbi.pdf" rel="nofollow noreferrer">OrganismDBI</a> package builds correctly the Homo.sapiens package, which appears to be linked with hg19. I provide here the relevant code to build the package for hg19 and hg38.</p>
  
  <pre><code>&gt; source("https://bioconductor.org/biocLite.R")
  &gt; biocLite("TxDb.Hsapiens.UCSC.hg19.knownGene")
  &gt; biocLite("TxDb.Hsapiens.UCSC.hg38.knownGene")
  
  &gt; library(OrganismDbi)
  
  # instructions for hg19, for hg38 change accordingly
  &gt; gd &lt;- list(join1 = c(GO.db="GOID", org.Hs.eg.db="GO"), 
               join2 = c(org.Hs.eg.db = "ENTREZID", 
                         TxDb.Hsapiens.UCSC.hg19.knownGene = "GENEID"))
  &gt; destination &lt;- tempfile()
  &gt; dir.create(destination)
  &gt; makeOrganismPackage(pkgname = "Homo.sapiens.hg19", graphData = gd, 
                        organism = "Homo sapiens", version = "1.0.0", 
                        maintainer = "Maintainer&lt;maintainer@email&gt;", 
                        author = "Author Name", destDir = destination, 
                        license = "Artistic-2.0")
  
  Creating package in /var/folders/sf/tfrswpc96jl8b4520mn784440000gn/T//RtmpzR4YnY/file111b490af70f/Homo.sapiens.hg19
  
  # installing package
  &gt; install.packages(destination, repos = NULL, type="source")
  </code></pre>
  
  <p>Then, you can load and use the packages with:</p>
  
  <pre><code>&gt; library(Homo.sapiens.hg19)
  &gt; library(Homo.sapiens.hg38)
  
  &gt; select(Homo.sapiens.hg19, keys=c('KRAS'), 
       cols = c('SYMBOL', 'TXCHROM', 'TXSTART', 'TXEND'), 
       keytype = 'SYMBOL')
  'select()' returned 1:many mapping between keys and columns
    SYMBOL TXCHROM  TXSTART    TXEND
  1   KRAS   chr12 25358180 25403854
  2   KRAS   chr12 25386768 25403863
  &gt; select(Homo.sapiens.hg38, keys = c('KRAS'), cols = 
         c('SYMBOL', 'TXCHROM', 'TXSTART', 'TXEND'), keytype = 'SYMBOL')
  'select()' returned 1:many mapping between keys and columns
    SYMBOL TXCHROM  TXSTART    TXEND
  1   KRAS   chr12 25204789 25250931
  2   KRAS   chr12 25209168 25250936
  3   KRAS   chr12 25209431 25250803
  4   KRAS   chr12 25233819 25250929
  </code></pre>
  