<HTML>
<HEAD>
<TITLE>genomic2pep and pep2genomic</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi All<BR>
<BR>
I am trying to identify the codon triplet in which a single nucleotide genomic position is involved in.<BR>
<BR>
Rephrased more elaborately, <BR>
<BR>
I have genomic loci chr1:11863085:11863085:-1 (chr start end and strand).<BR>
This loci is overlapping with transcript ID: ENST00000413656.<BR>
The loci is in the protein-coding (CDS) region of the transcript/cDNA.<BR>
<BR>
Therefore I first call transcript object by stable id using the transcript adaptor.<BR>
Then I identify the peptide co-ordinates for the genomic loci by calling transcriptmapper.<BR>
Once I get the peptide coordinate, I get the genomic coordinates for that peptide.<BR>
<BR>
Below is the script to do so.<BR>
<BR>
my $transcript_adaptor = $reg->get_adaptor("Human", "Core", "Transcript");<BR>
my $slice_adaptor = $reg->get_adaptor("Human", "Core", "Slice");<BR>
my $transcriptObject = $transcript_adaptor->fetch_by_stable_id("ENST00000413656");<BR>
my $transcriptMapper = $transcriptObject->get_TranscriptMapper();<BR>
my @pepCoords = $transcriptMapper->genomic2pep(11863085, 11863085, -1);<BR>
foreach my $pepinfo (@pepCoords){<BR>
  my @pep2genomic = $transcriptMapper->pep2genomic($pepinfo->start, $pepinfo->end);<BR>
  print "Peptide = ". $pepinfo->start."\t". $pepinfo->end."\t". $pepinfo->id."\t". $pepinfo->length."\t". $pepinfo->strand."\n";<BR>
  foreach my $gc (@pep2genomic){<BR>
    my $codonSlice = $slice_adaptor->fetch_by_region("toplevel", 1 , $gc->start, $gc->end, $gc->strand);<BR>
    print "Genomic = ".$gc->start."\t".$gc->end."\t".$gc->id."\t".$gc->length."\t".$gc->strand."\t".$codonSlice->seq."\n";<BR>
  }<BR>
}<BR>
<BR>
However, normally a peptide should represent three nucleotides, but I am getting a two nucleotide codon (TC) for this position and my script dies with following error message<BR>
<BR>
Can't locate object method "id" via package "Bio::EnsEMBL::Mapper::Gap".<BR>
<BR>
Could somebody please explain me what these gaps are? And also, how to overcome this issue of two/one nucleotide codons.<BR>
<BR>
Any help is greatly appreciated<BR>
<BR>
Thanking you<BR>
<BR>
Hardip<BR>
</SPAN></FONT>
</BODY>
</HTML>