Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix msmssweeps verification #2230

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading