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

Unexpected behavior! #2

Open
drdna opened this issue Nov 7, 2024 · 5 comments
Open

Unexpected behavior! #2

drdna opened this issue Nov 7, 2024 · 5 comments

Comments

@drdna
Copy link

drdna commented Nov 7, 2024

Running the python version of this script using a .hap file with 42621 sites (snv file has 42621 lines), produces output haplotypes with 49028 sites! It's creating variant positions out of thin air!

Model looks like this:

*1-10 Anc1,Anc2,Admix1
100 0.5,0.5,0
10000 0,0,1
10000 0,0,1
10000 0,0,1
10000 0,0,1
10000 0,0,1
10000 0,0,1
10000 0,0,1
10000 0,0,1
10000 0,0,1

Command looks like this:

python AdmixSim2.py -i AdmixSim2 -p Admix1 -g 10 -n 100 --mut-rate 0.000001 --rec-rate 0.0000006 -o AdmixSim2.out

@Zhang-Rui-2018
Copy link
Member

Hi! Thank you for using our software! Can I ask how long is the chromosome you are simulating?

@drdna
Copy link
Author

drdna commented Nov 7, 2024

Thanks for your speedy response. The chromosome is 3.66 megabases long but the number of polymorphic sites in the hap file is 42,621.

@Zhang-Rui-2018
Copy link
Member

Hi! It makes sense since you have set the mutation rate as 0.000001, the chromosome length as 3.66Mb, so the expectation new mutations should be
chromosome length (in bp) * mutation rate * generation * #output haplotype, which is about 7k in your setting.

If you don't want new mutations, you could set the mutation rate as 0 or --no-mut in cpp version.

@drdna
Copy link
Author

drdna commented Nov 8, 2024

Now I see what’s happening. The program, has created a new .snv file too. I was expecting it to simply flip ones and zeroes but the actual behavior makes total sense.

@drdna
Copy link
Author

drdna commented Nov 8, 2024 via email

@drdna drdna changed the title MAJOR BUG! Unexpected behavior! Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants