Greetings-<div><br></div><div>I'm running into an off-by-one problem when mapping between chromosome, contig, CDS, and protein coordinates using TranscriptMapper. This might be as simple as just needing to +1 to cdna2genomic(), but I'd appreciate verification since I don't have to do this for genomic2pep() and I would have expected both to be one-based.</div>

<div><br></div><div>A full script is attached, but here's the crux:</div><div><br></div><div><div>my ($tx) = @{ $ta->fetch_all_by_external_name($tx_ac) };</div><div>my $cds_start = $tx->cdna_coding_start;</div>
</div>
<div>...</div><div><div>my $tm = new Bio::EnsEMBL::TranscriptMapper($tx);</div><div>my ($tm_g) = $tm->cdna2genomic( $cds_pos+$cds_start,$cds_pos+$cds_start );</div><div>my ($tm_p) = $tm->genomic2pep( $tm_g->start,$tm_g->start,$tx->strand );</div>

</div><div><br></div><div>I'm testing against SNP coords pulled from  NCBI varvu and Ensembl Variation summary. For 5 SNPs (of 5 tested), the computed genomic coordinate ($tm_g->start) is 1 less than expected, whereas the protein coordinates are correct. The attached script demonstrates more.</div>
<div><br></div><div>All advice (or relevant code!) appreciated. Thanks for any help.</div><div><br></div><div>-Reece</div><div><br></div><div><br></div>