Skip to content

Commit

Permalink
Merge pull request #39 from dpryan79/fix38
Browse files Browse the repository at this point in the history
Fix #38, the --methylKit option should produce values between 0-100, …
  • Loading branch information
dpryan79 authored Jan 27, 2017
2 parents ecef0ea + a14b33a commit ddcc9c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 0.2.1:

* The `--methylKit` option output methylation values between 0-1 rather than 0-100. This has been corrected.

Version 0.2.0:

* Changed the package name from PileOMeth to MethylDackel. It is unfortunate that the temporary "PileOMeth" name stuck around for so long.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ OPTS ?= -Wall -g -O3
all: lib MethylDackel

OBJS = common.o bed.o svg.o pileup.o extract.o MBias.o mergeContext.o
VERSION = 0.2.0
VERSION = 0.2.1

#If we're building from a git repo, then append the most recent tag
ifneq "$(wildcard .git)" ""
Expand Down
6 changes: 3 additions & 3 deletions extract.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ void writeCall(FILE *of, Config *config, char *chrom, int32_t pos, int32_t width
logit(((double) nmethyl)/(nmethyl+nunmethyl)));
} else if(config->methylKit) {
fprintf(of, \
"%s.%i\t%s\t%i\t%c\t%i\t%f\t%f\n", \
"%s.%i\t%s\t%i\t%c\t%i\t%6.2f\t%6.2f\n", \
chrom, \
pos+1, \
chrom, \
pos+1, \
strand, \
nmethyl+nunmethyl, \
((double) nmethyl)/(nmethyl+nunmethyl), \
((double) nunmethyl)/(nmethyl+nunmethyl));
100.0 * ((double) nmethyl)/(nmethyl+nunmethyl), \
100.0 * ((double) nunmethyl)/(nmethyl+nunmethyl));
}
}

Expand Down

0 comments on commit ddcc9c0

Please sign in to comment.