def returnIndex(readdic, readname):
    """
    Returns the index of a read. The index is prescribed by the ordering in the sam file.
    @type  readname: string
    @param readname: read id
    @type  readdic: dictionary
    @param readdic: dictionary containing read ids and read qualities.ArtRead
    @rtype: int
    @return:  index
    """
    return(readdic[readname].internalID)