Skip to content

Commit

Permalink
remove deprecated from [Emhaplofreq] config
Browse files Browse the repository at this point in the history
move unsupported warning to `[Haplostats]`.
cleanup some of the LOG messages and line-feeds
  • Loading branch information
alexlancaster committed Sep 10, 2023
1 parent a8ff527 commit 0684b0d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/PyPop/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,9 @@ def _doGenotypeFile(self):

if self.config.has_section("Haplostats"):

print ("WARNING: The [Haplostats] module is still currently in ALPHA-MODE ONLY and and should not be used in production.")
print ("Please use the [Emhaplofreq] module in the meantime.")

try:
numInitCond = self.config.getint("Haplostats",
"numInitCond")
Expand Down Expand Up @@ -1076,9 +1079,6 @@ def _doGenotypeFile(self):

if self.config.has_section("Emhaplofreq"):

print ("WARNING: The [Emhaplofreq] module is officially DEPRECATED and may be removed in coming releases.")
print ("Please transition to using the new [Haplostats] module.")

# create object to generate haplotype and LD statistics
# a wrapper around the emhaplofreq module
haplo = Emhaplofreq(self.input.getIndividualsData(),
Expand Down Expand Up @@ -1148,11 +1148,11 @@ def _doGenotypeFile(self):


if allPairwiseLD:
print("LOG: estimating all pairwise LD:"),
print("LOG: estimating all pairwise LD:", end=" "),
if allPairwiseLDWithPermu:
print("with %d permutations and %d initial conditions for each permutation" % (allPairwiseLDWithPermu, numPermuInitCond)),
print("with %d permutations and %d initial conditions for each permutation" % (allPairwiseLDWithPermu, numPermuInitCond), end=" "),
if permutationPrintFlag:
print("and each permutation output will be logged to XML")
print("and each permutation output will be logged to XML", end=" ")
else:
print()
else:
Expand All @@ -1166,15 +1166,15 @@ def _doGenotypeFile(self):
locusKeys=self.config.get("Emhaplofreq", "lociToEstHaplo")

if locusKeys == '*':
print("wildcard '*' given for lociToEstHaplo, assume entire data set")
print("LOG: wildcard '*' given for lociToEstHaplo, assume entire data set")
locusKeys=":".join(self.input.getIndividualsData().colList)
print("LOG: estimating haplotype frequencies for"),
print("LOG: estimating haplotype frequencies for", end=" "),

# if we will be running allPairwise*, then exclude any two-locus
# haplotypes, since we will estimate them as part of 'all pairwise'
if allPairwiseLD:

print("all two locus haplotypes,"),
print("all two locus haplotypes,", end=" "),
modLocusKeys = []
for group in locusKeys.split(','):

Expand Down

0 comments on commit 0684b0d

Please sign in to comment.