def get_cds_by_mrna(self, ctx, ref, mrna_id_list): """ Retrieves coding sequence (cds) Feature IDs for given mRNA Feature IDs. @param mrna_id_list List of mRNA Feature IDS for which to retrieve CDS. If empty, returns data for all features. @return Mapping of mRNA Feature IDs to a list of CDS Feature IDs. :param ref: instance of type "ObjectReference" :param mrna_id_list: instance of list of String :returns: instance of mapping from String to String """ # ctx is the context object # return variables are: returnVal #BEGIN get_cds_by_mrna ga = GenomeAnnotationAPI_local(self.services, ctx['token'], ref) if not mrna_id_list: returnVal = ga.get_cds_by_mrna([]) else: returnVal = ga.get_cds_by_mrna(mrna_id_list) #END get_cds_by_mrna # At some point might do deeper type checking... if not isinstance(returnVal, dict): raise ValueError('Method get_cds_by_mrna return value ' + 'returnVal is not type dict as required.') # return the results return [returnVal]