  Recently PAMELA collaboration published the cosmic nuclei and electron
spectra with high precision, together with the cosmic antiproton data updated,
and the Fermi-LAT collaboration also updated the measurement of the total
$e^+e^-$ spectrum to lower energies. In this paper we develop a Markov Chain
Monte Carlo (MCMC) package {\it CosRayMC}, based on the GALPROP cosmic ray
propagation model to study the implications of these new data. It is found that
if only the background electrons and secondary positrons are considered, the
fit is very bad with $\chi_{\rm red}^2 \approx 3.68$. Taking into account the
extra $e^+e^-$ sources of pulsars or dark matter annihilation we can give much
better fit to these data, with the minimum $\chi_{\rm red}^2 \approx 0.83$.
This means the extra sources are necessary with a very high significance in
order to fit the data. However, the data show little difference between pulsar
and dark matter scenarios. Both the background and extra source parameters are
well constrained with this MCMC method. Including the antiproton data, we
further constrain the branching ratio of dark matter annihilation into quarks
$B_q<0.5%$ at $2\sigma$ confidence level. The possible systematical
uncertainties of the present study are discussed.
