Electronic and transport gaps of graphene opened by grain boundaries