convert2bed function

convert object to bed format