code: def GetTransPosition(df,field,dic,refCol="transcript_id"):
      
      try:
          gen=str(int(df[field]))
          transid=df[refCol]
          bases=dic.get(transid).split(",")
          bases=bases.index(str(gen))+1
      except:
          bases=np.nan
      return bases
docs: Maps a genome position to transcript positon"
  
      :param df: a Pandas dataframe
      :param field: the head of the column containing the genomic position
      :param dic: a dictionary containing for each transcript the respective bases eg. {ENST23923910:'234,235,236,1021,..'}
      :param refCol: header of the reference column with IDs, eg. 'transcript_id'
  
      :returns: position on transcript