Remove rows with nearby positions (excluding "cis" and "cis-trans_cis")
remove_nearby_positions.RdThis function removes rows with positions within ±1mb of a "cis" or "cis-trans_cis" row, excluding the "cis" or "cis-trans_cis" row itself. It iterates through rows with "cis" or "cis-trans_cis" in "cis_trans", checks for other rows with the same chromosome but positions within the threshold. If such rows exist and their "cis_trans" is not "cis" or "cis-trans_cis", it removes those rows.