  Galaxies have different morphology, gas content, and star formation rate
(SFR) in dense environments like galaxy clusters. The impact of environmental
density extends to several virial radii, and galaxies are pre-processed in
filaments and groups, before falling into the cluster. Our goal is to quantify
this pre-processing, in terms of gas content and SFR, as a function of density
in cosmic filaments. We have observed the two first CO transitions in 163
galaxies with the IRAM-30m telescope, and added 82 measurements from the
literature, for a sample of 245 galaxies in the filaments around Virgo. We
gathered HI-21cm measurements from the literature, and observed 69 galaxies
with the Nan\c{c}ay telescope, to complete our sample. We compare our filament
galaxies with comparable samples from the Virgo cluster and with the isolated
galaxies of the AMIGA sample. We find a clear progression from field, to
filament, and cluster galaxies for decreasing SFR, increasing fraction of
galaxies in the quenching phase, increasing proportion of early-type galaxies
and decreasing gas content. Galaxies in the quenching phase, defined as having
SFR below 1/3 of the main sequence rate, are between 0-20\% in the isolated
sample, while they are 20-60\% in the filaments and 30-80\% in the Virgo
cluster. Processes that lead to star formation quenching are already at play in
filaments. They depend mostly on the local galaxy density, while the distance
to filament spine is a secondary parameter. While the HI to stellar mass ratio
decreases with local density by ~1 dex in the filaments, and ~2 dex in the
Virgo cluster with respect to the field, the decrease is much less for the
H$_2$ to stellar mass ratio. As the environmental density increases, the gas
depletion time decreases, since the gas content decreases faster than the SFR.
This suggests that gas depletion significantly precedes star formation
quenching.
