Skip to content

Commit

Permalink
fix msmssweeps verification
Browse files Browse the repository at this point in the history
  • Loading branch information
GertjanBisschop authored and mergify[bot] committed Dec 6, 2023
1 parent 4c80801 commit 11615e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ discoal:
cp discoal-0.1.5/discoal ./

msms:
wget https://www.mabs.at/ewing/msms/msms3.2rc-b163.jar
wget https://www.mabs.at/fileadmin/user_upload/p_mabs/msms3.2rc-b163.jar
mv msms3.2rc-b163.jar msms.jar

msprime-0.7.4:
Expand Down
12 changes: 3 additions & 9 deletions verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,10 +1345,8 @@ def _run_msp_sample_stats(self, msms_cmd):

if s != 0:
print("positions: ", end="", file=output)
positions = [
mutation.position / msms_params["num_sites"]
for mutation in tree_sequence.mutations()
]
positions = tree_sequence.sites_position.copy()
positions /= msms_params["num_sites"]
positions.sort()
for position in positions:
print("{0:.{1}f}".format(position, 8), end=" ", file=output)
Expand Down Expand Up @@ -1404,11 +1402,7 @@ def _run_discoal_sample_stats(self, msms_cmd):
return self._run_sample_stats(_discoal_executable + discoal_cmd.split(" "))

def _cmp_msms_vs_msp(self, cmd):
try:
df_msp = self._run_msp_sample_stats(cmd)
except pd.error.ParserError:
logging.warning("msm_vs_msp FAILED")
return
df_msp = self._run_msp_sample_stats(cmd)
df_msms = self._run_msms_sample_stats(cmd)
self._plot_stats("msp_msms", df_msp, df_msms, "msp", "msms")

Expand Down

0 comments on commit 11615e0

Please sign in to comment.