\name{xmapcore.coords} \alias{genome.to.protein.coords} \alias{genome.to.transcript.coords} \alias{protein.coords.to.genome} \alias{transcript.coords.to.genome} \title{ xmapcore co-ordinate mapping functions } \description{ Functions to go between Genomic, Proteomic and Transcriptual co-ordinate systems. } \usage{ transcript.coords.to.genome( transcript.ids, position=1, as.vector=TRUE, check.bounds=TRUE, truncate=TRUE ) genome.to.transcript.coords( position, transcript.ids, as.vector=TRUE, check.bounds=TRUE ) protein.coords.to.genome( protein.ids, position=1, as.vector=TRUE, check.bounds=TRUE, truncate=TRUE ) genome.to.protein.coords( position, protein.ids, as.vector=TRUE, check.bounds=TRUE ) } \arguments{ \item{transcript.ids}{ A vector of transcript.ids (or a RangedData object of transcripts returned from another xmapcore function)} \item{position}{ The position of interest (either a genomic position for both of the \code{genome.to.xxx} methods, or a protein or transcript sequence position for the other two methods )} \item{as.vector}{ Should the returned data be in the form of a vector (if \code{TRUE}) or a RangedData object (if \code{FALSE}) } \item{check.bounds}{ If \code{TRUE}, any postion outside the range of the protein/transcript will cause a warning to be issued and \code{NA} returned. } \item{truncate}{ If \code{truncate=TRUE}, any lengths beyond the end of the transcript or protein will be set to the last residue} \item{protein.ids}{ A vector of protein.ids (or a RangedData object of proteins returned from another xmapcore function) } } \details{ If called with \code{as.vector=FALSE}, all locations which were not found, or are not applicable will be dropped from the result. This is because \code{RangedData} objects cannot represent \code{NA} or missing values. } \seealso{ \code{\link{xmapcore.to}}\cr \code{\link{xmapcore.details}}\cr \code{\link{xmapcore.all}}\cr \code{\link{xmapcore.range}}\cr \code{\link{xmapcore.filters}}\cr } \author{ Tim Yates } \examples{ if(interactive()) { # Get the gene for 'tp53' gene = symbol.to.gene( 'tp53', as.vector=F ) # And the transcripts for this gene transcripts = gene.to.transcript( symbol.to.gene( 'tp53' ) ) # And the proteins for this transcript proteins = transcript.to.protein( transcripts ) # get the transcript coords for the transcripts of this gene, at the start of this gene genome.to.transcript.coords( start( gene ), transcripts ) #Returns a vector: # ENST00000413465 ENST00000359597 ENST00000504290 ENST00000510385 ENST00000504937 # 1018 NA NA NA NA # ENST00000269305 ENST00000455263 ENST00000420246 ENST00000445888 ENST00000396473 # NA NA NA NA NA # ENST00000545858 ENST00000419024 ENST00000509690 ENST00000514944 ENST00000505014 # NA NA NA NA NA # ENST00000414315 ENST00000508793 ENST00000503591 # NA NA NA # With as.vector=FALSE genome.to.transcript.coords( start( gene ), transcripts, as.vector=FALSE ) # RangedData with 1 row and 1 value column across 1 space # space ranges | coord.space # | # 1 ENST00000413465 [1018, 1018] | transcript genome.to.protein.coords( start( gene ), proteins ) # ENSP00000410739 ENSP00000352610 ENSP00000269305 ENSP00000398846 ENSP00000391127 # 340 NA NA NA NA # ENSP00000391478 ENSP00000379735 ENSP00000437792 ENSP00000402130 ENSP00000425104 # NA NA NA NA NA # ENSP00000423862 ENSP00000394195 ENSP00000424104 ENSP00000426252 # NA NA NA NA # With as.vector=FALSE genome.to.protein.coords( start( gene ), proteins, as.vector=FALSE ) # RangedData with 1 row and 2 value columns across 1 space # space ranges | frame coord.space # | # 1 ENSP00000410739 [340, 340] | 0 protein } }