  Observations are revealing the ubiquity of filamentary structures in
molecular clouds. As cores are often embedded in filaments, it is important to
understand how line profiles from such systems differ from those of isolated
cores. We perform radiative transfer calculations on a hydrodynamic simulation
of a molecular cloud in order to model line emission from collapsing cores
embedded in filaments. We model two optically thick lines, CS(2-1) and
HCN(1-0), and one optically thin line, N2H+(1-0), from three embedded cores. In
the hydrodynamic simulation, gas self-gravity, turbulence, and bulk flows
create filamentary regions within which cores form. Though the filaments have
large dispersions, the N2H+(1-0) lines indicate subsonic velocities within the
cores. We find that the observed optically thick line profiles of CS(2-1) and
HCN(1-0) vary drastically with viewing angle. In over 50% of viewing angles,
there is no sign of a blue asymmetry, an idealised signature of infall motions
in an isolated spherical collapsing core. Profiles which primarily trace the
cores, with little contribution from the surrounding filament, are
characterised by a systematically higher HCN(1-0) peak intensity. The N2H+(1-0)
lines do not follow this trend. We demonstrate that red asymmetric profiles are
also feasible in the optically thick lines, due to emission from the filament
or one-sided accretion flows onto the core. We conclude that embedded cores may
frequently undergo collapse without showing a blue asymmetric profile, and that
observational surveys including filamentary regions may underestimate the
number of collapsing cores if based solely on profile shapes of optically thick
lines.
