delt0r / msms

A coalsecent simulator with selection
www.mabs.at/ewing/msms
18 stars 7 forks source link

Trying to output allele frequency trajectory in a multi-deme model #6

Closed ngarud closed 11 years ago

ngarud commented 11 years ago

Hello,

I am trying to model selection with a time-variant demographic model using the -SI option. In the output, I would like to print out the allele frequency trajectory using the -oTrace option. When I try to simulate without outputting -oTrace, I am able to get an output easily within a few seconds, but when I try to simulate with -oTrace, I get an error message. I am unable to figure out what I am doing wrong, so I am pasting the code and the error message below.

Thank you, Nandita

(bash code)

Parameters

smu=0 Nac=4975360
mu=10^-9 locusLength=100000 theta=echo | awk '{print 4*'$Nac'*'$mu'*'$locusLength'}' rho=echo | awk '{print (4*'$Nac'*'$locusLength')*(5*10^(-9))}' totalSampleSize=145 numberOfSimulations=1 sampleSizeAfrica=0 sampleSizeEurope=0 sampleSizeAmerica=145 scaledNeEurope=0.6276 scaledNeAmerica=3.2127

s=9950720 s2=19901440 s_05=4975360 age=0.0000045

MSMS code

./msms/bin/msms $totalSampleSize $numberOfSimulations -N $Nac -t $theta -I 3 $sampleSizeAfrica $sampleSizeEurope $sampleSizeAmerica -n 2 $scaledNeEurope -n 3 $scaledNeAmerica -Sc $age 3 $s2 $s $s_05 -SI $age 3 0 0 2.00990481e-07 -SFC -Smu $smu -Sp 0.5 \ -oOC -oTrace

error message:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException at java.lang.String.getChars(String.java:863) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:416) at java.lang.StringBuilder.append(StringBuilder.java:132) at at.mabs.stats.ForwardStatsCollector.paste(ForwardStatsCollector.java:35) at at.mabs.stats.ForwardStatsCollector.collectStats(ForwardStatsCollector.java:24) at at.MSLike.run(MSLike.java:335) at at.MSLike.runThreads(MSLike.java:424) at at.MSLike.runMe(MSLike.java:191) at at.MSLike.main(MSLike.java:541) at at.MSLike.main(MSLike.java:585)

delt0r commented 11 years ago

I don't quite follow? Is this a bug or have you found the issue?

ngarud commented 11 years ago

Hi Greg --

I found the issue! It was a problem with the way I was coding it up. Thanks for your help as usual.

Nandita

On Thu, Dec 13, 2012 at 3:46 AM, Greg notifications@github.com wrote:

I don't quite follow? Is this a bug or have you found the issue?

— Reply to this email directly or view it on GitHubhttps://github.com/delt0r/msms/issues/6#issuecomment-11331624.

Nandita Garud Genetics Ph.D. Candidate Petrov Group, Stanford University