index2bed function

convert a region index into a bed file dataframe