diff --git a/pyplink/pyplink.py b/pyplink/pyplink.py index 41458f3..dc4844a 100644 --- a/pyplink/pyplink.py +++ b/pyplink/pyplink.py @@ -231,7 +231,7 @@ def _get_seek_position(self, n): def _read_bim(self): """Reads the BIM file.""" # Reading the BIM file and setting the values - bim = pd.read_csv(self.bim_filename, delim_whitespace=True, + bim = pd.read_csv(self.bim_filename, sep=r"\s+", names=["chrom", "snp", "cm", "pos", "a1", "a2"], dtype=dict(snp=str, a1=str, a2=str)) @@ -333,7 +333,7 @@ def get_duplicated_markers(self): def _read_fam(self): """Reads the FAM file.""" # Reading the FAM file and setting the values - fam = pd.read_csv(self.fam_filename, delim_whitespace=True, + fam = pd.read_csv(self.fam_filename, sep=r"\s+", names=["fid", "iid", "father", "mother", "gender", "status"], dtype=dict(fid=str, iid=str, father=str, mother=str))