Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
lemieuxl committed Sep 1, 2015
2 parents f106e2e + 48c00f7 commit 60c8f55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions pyplink/pyplink.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ def _read_bim(self):
# Reading the BIM file and setting the values
bim = pd.read_csv(self.bim_filename, sep="\t",
names=original_bim_cols)

# The 'snp' should always be strings
bim["snp"] = bim["snp"].astype(str)

bim = bim.set_index("snp", drop=False)
bim["i"] = range(len(bim))
bim[2] = bim.a1 * 2 # Original '0'
Expand Down Expand Up @@ -170,6 +174,11 @@ def _read_fam(self):
# Reading the FAM file and setting the values
fam = pd.read_csv(self.fam_filename, sep=" ",
names=self.original_fam_cols)

# 'fid' and 'iid' should always be strings (more logical that way)
fam["fid"] = fam["fid"].astype(str)
fam["iid"] = fam["iid"].astype(str)

fam["byte"] = [
int(np.ceil((1 + 1) / 4.0)) - 1 for i in range(len(fam))
]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

MAJOR = 1
MINOR = 0
MICRO = 1
MICRO = 2
VERSION = "{}.{}.{}".format(MAJOR, MINOR, MICRO)


Expand Down

0 comments on commit 60c8f55

Please sign in to comment.