def n_to_c(self, n_interval):
if self.cds_start_i is None:    <EOL><INDENT>raise HGVSUsageError(<EOL>"<STR_LIT>"<EOL>.format(self=self))<EOL><DEDENT>if n_interval.start.base <= <NUM_LIT:0> or n_interval.end.base > self.tgt_len:<EOL><INDENT>raise HGVSError("<STR_LIT>")<EOL><DEDENT>if n_interval.start.base <= self.cds_start_i:<EOL><INDENT>cs = n_interval.start.base - (self.cds_start_i + <NUM_LIT:1>)<EOL>cs_datum = Datum.CDS_START<EOL><DEDENT>elif n_interval.start.base > self.cds_start_i and n_interval.start.base <= self.cds_end_i:<EOL><INDENT>cs = n_interval.start.base - self.cds_start_i<EOL>cs_datum = Datum.CDS_START<EOL><DEDENT>else:<EOL><INDENT>cs = n_interval.start.base - self.cds_end_i<EOL>cs_datum = Datum.CDS_END<EOL><DEDENT>if n_interval.end.base <= self.cds_start_i:<EOL><INDENT>ce = n_interval.end.base - (self.cds_start_i + <NUM_LIT:1>)<EOL>ce_datum = Datum.CDS_START<EOL><DEDENT>elif n_interval.end.base > self.cds_start_i and n_interval.end.base <= self.cds_end_i:<EOL><INDENT>ce = n_interval.end.base - self.cds_start_i<EOL>ce_datum = Datum.CDS_START<EOL><DEDENT>else:<EOL><INDENT>ce = n_interval.end.base - self.cds_end_i<EOL>ce_datum = Datum.CDS_END<EOL><DEDENT>c_interval = hgvs.location.BaseOffsetInterval(<EOL>start=hgvs.location.BaseOffsetPosition(<EOL>base=cs, offset=n_interval.start.offset, datum=cs_datum),<EOL>end=hgvs.location.BaseOffsetPosition(<EOL>base=ce, offset=n_interval.end.offset, datum=ce_datum),<EOL>uncertain=n_interval.uncertain)<EOL>return c_interval<EOL>
convert a transcript cDNA (n.) interval to a transcript CDS (c.) interval