Skip to contents

This function removes duplicate rows based on the "SNP" column, prioritizing rows with "cis" in the "cis_trans" column. For a given SNP, it keeps only one row, prioritizing the row with "cis" in "cis_trans" and removing others.

Usage

remove_duplicate_SNP(df)

Arguments

df

A data frame containing SNP and cis_trans columns.

Value

A modified data frame with duplicate rows removed based on SNP, prioritizing "cis" rows.

Details

Example usage: #' for (i in seq_along(list_data_cis_trans)) { df <- list_data_cis_trans[[i]] df <- remove_duplicate_SNP(df) df <- remove_nearby_positions(df) list_data_cis_trans[[i]] <- df }