In alternative embodiments, the invention provides compositions such as devices, pills, beads, capsules, products of manufacture, particles, microparticles, nanoparticles, gels, liquid gels, liquid gel capsules, capsules, tablets, geltabs, liquids, sprays, emulsions, suspensions, pastes or yogurts, for the detection and isolation of biomarkers, nucleic acids, proteins or peptides, proteoglycans, lipids, fats, sugars or polysaccharides in the gastrointestinal tract for e.g., detecting the presence of particular exogenous or endogenous nucleic acids, e.g., DNA or RNA, or proteins, in the gastrointestinal tract, for example, to diagnose the presence of an infectious or exogenous agent such as a virus, a fungus, a parasite, a bacteria, intestinal helminths and protozoan parasites, and the like, or a biomarker such as a cancer-causing or cancer-predisposing allele, e.g., mutations of the KRAS2 oncogene in pancreatic cancer. In alternative embodiments, compositions of the invention comprise magnetic particles such as a magnetically-responsive microparticle or nanoparticle a superparamagnetic bead or polystyrene bead a superparamagnetic fine particle a ferrimagnetic particle or, a magnetic microsphere, nanosphere, microbead or nanobeads. In alternative embodiments, the invention provides methods for detecting, retrieving, capturing or isolating a sample of a nucleic acid, or an anionic, cationic or hydrophobic protein or peptide, a mucin, a phosphoprotein, a proteoglycan or a polysaccharide, in vivo.