  High energy cosmic neutrino fluxes can be produced inside relativistic jets
under the envelopes of collapsing stars. In the energy range E ~ (0.3 - 1e5)
GeV, flavor conversion of these neutrinos is modified by various matter effects
inside the star and the Earth. We present a comprehensive (both analytic and
numerical) description of the flavor conversion of these neutrinos which
includes: (i) oscillations inside jets, (ii) flavor-to-mass state transitions
in an envelope, (iii) loss of coherence on the way to observer, and (iv)
oscillations of the mass states inside the Earth. We show that conversion has
several new features which are not realized in other objects, in particular
interference effects ("L- and H- wiggles") induced by the adiabaticity
violation. The neutrino-neutrino scattering inside jet and inelastic neutrino
interactions in the envelope may produce some additional features at E > 1e4
GeV. We study dependence of the probabilities and flavor ratios in the
matter-affected region on angles theta13 and theta23, on the CP-phase delta, as
well as on the initial flavor content and density profile of the star. We show
that measurements of the energy dependence of the flavor ratios will, in
principle, allow to determine independently the neutrino and astrophysical
parameters.
