The associated production of a $W$ boson with a jet originating from either a light parton or heavy-flavor quark is studied in the forward region using proton-proton collisions. The analysis uses data corresponding to integrated luminosities of 1.0 and $2.0\,{\rm fb}^{-1}$ collected with the LHCb detector at center-of-mass energies of 7 and 8 TeV, respectively. The $W$ bosons are reconstructed using the $W\to\mu\nu$ decay and muons with a transverse momentum, $p_{\rm T}$, larger than 20 GeV in the pseudorapidity range $2.0<\eta<4.5$. The partons are reconstructed as jets with $p_{\rm T} > 20$ GeV and $2.2 < \eta < 4.2$. The sum of the muon and jet momenta must satisfy $p_{\rm T} > 20$ GeV. The fraction of $W+$jet events that originate from beauty and charm quarks is measured, along with the charge asymmetries of the $W\!+\!b$ and $W\!+\!c$ production cross-sections. The ratio of the $W+$jet to $Z+$jet production cross-sections is also measured using the $Z\to\mu\mu$ decay. All results are in agreement with Standard Model predictions.
Summary of the results. All results are reported within a fiducial region that requires a jet with $p_\rm{T} > 20$ GeV in the pseudorapidity range $2.2 < \eta < 4.2$, a muon with $p_\rm{T} > 20$ GeV in the pseudorapidity range $2.0 < \eta < 4.5$, $p_\rm{T}(\mu+j) > 20$ GeV, and $\Delta R(\mu, j) > 0.5$. For $Z+$jet events both muons must fulfill the muon requirements and $60 < M(\mu\mu) < 120$ GeV; the $Z+$jet fiducial region does not require $p_\rm{T}(\mu+j) > 20$ GeV.