Skip to content

Commit

Permalink
fix bug for pcangsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Jul 2, 2022
1 parent e4772f1 commit 28588ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- v0.2.1
- bug fix for PCAngsd

- v0.2.0
- add =--maf= option for SNPs filtering
- faster parser for beagle file
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ IOMP5 = 0

########################### end ###########################

VERSION=0.2.0
VERSION=0.2.1
# detect OS architecture and add flags
Platform := $(shell uname -s)

Expand Down
10 changes: 5 additions & 5 deletions src/FileBeagle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ void FileBeagle::read_all()
while (tgets(fp, &buffer, &bufsize))
{
if (buffer != original)
{
original = buffer;
}
tok = strtok_r(buffer, delims, &buffer);
tok = strtok_r(NULL, delims, &buffer);
tok = strtok_r(NULL, delims, &buffer);
for (i = 0; i < nsamples * 3; i++)
for (i = 0; i < nsamples; i++)
{
tok = strtok_r(NULL, delims, &buffer);
assert(tok != NULL);
P(i, j) = strtod(tok, NULL);
P(2 * i + 0, j) = strtod(tok, NULL);
tok = strtok_r(NULL, delims, &buffer);
P(2 * i + 1, j) = strtod(tok, NULL);
tok = strtok_r(NULL, delims, &buffer);
}
buffer = original;
j++;
Expand Down

0 comments on commit 28588ac

Please sign in to comment.