Is it valid to expand a line of charge into a sphere? Basically, the situation is:
  y  
  ^    
  |  
  |  
  |  
  |  
<=|====================----------p-----------------> x

... where the ='s represent a line of uniform charge (with given charge q) and given length L. The goal is to find the electric field generated by that charge at point p, a given distance from the end of the line of charge.
My intuition says that the way to solve the problem is to expand the line into a sphere of charge surrounding the bar with radius 1/2L.  At that point, since I can treat a uniformly charged sphere as a point charge, and the sphere would be uniformly charged in the x direction only (or maybe better to say that it produces a perfectly symmetrical field pointed in the +/-x direction), I can treat the line of charge as a point charge centered at 1/2L.
Is this a valid approach to solving this problem, and if not, why not?

Disclaimer: This is a homework question, so I'm trying to follow normal SE homework policy.  Please let me know if I'm letting you down.  :)
 A: 
the sphere would be uniformly charged in the x direction only 

You can treat a uniformly charged sphere as a point charge at its centre, but as you area aware the sphere you are creating would not be uniformly charged. The Shell Theorem which allows you to replace a sphere with a point charge requires that the sphere must have a spherically symmetric charge density. 
Even if you rearranged the line charge into a uniformly charged sphere this would not give the correct answer. It is rarely possible to transform one charge distribution into another without changing the electric field it produces, even for a single point such as P.

I can treat the line of charge as a point charge centered at 1/2L

This is more sensible but still incorrect. The electric field of a charge distribution is not the same as that of a point of the same total charge at the geometric centre (centroid) of the distrubution. 
We can often treat the inertial mass of an object as though it were concentrated at its centroil (the centre of mass), but this only works for gravitational mass if the gravitational field which it is place in is uniform. See Will centre of gravity coincide with centre of mass if density of object is non-uniform? 
The same is true for electrical forces, which are also of the form $1/r^2$. The electric fields from 2 point charges at distances $\pm x$ from the centre of the line do not add up to twice that at the centre.  
