Open rheiland opened 5 years ago
You should try removing all the entropy (TH and ErrorTH) and Error columns. The only columns used to plot should be the "Proba" ones.
I think I have more fundamental problems - with the .csv file being generated correctly. As a simple test, I try:
In [3]: from numpy import genfromtxt
In [3]: d = genfromtxt('Four_cycle_FEscape_probtraj_table.csv', delimiter="\t")
~/anaconda3/lib/python3.6/site-packages/numpy/lib/npyio.py in genfromtxt(fname, dtype, comments, delimiter, skip_header, skip_footer, converters, missing_values, filling_values, usecols, names, excludelist, deletechars, replace_space, autostrip, case_sensitive, defaultfmt, unpack, usemask, loose, invalid_raise, max_rows, encoding)
2017 # Raise an exception ?
2018 if invalid_raise:
-> 2019 raise ValueError(errmsg)
2020 # Issue a warning ?
2021 else:
ValueError: Some errors were detected !
Line #259 (got 99 columns instead of 102)
Line #260 (got 99 columns instead of 102)
...
Line #499 (got 75 columns instead of 102)
Line #500 (got 75 columns instead of 102)
In [3]: type(d)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
NameError: name 'd' is not defined
and looking at the .csv file in my editor, I see <nil>
s scattered around. Not entirely sure if those are even valid or not, but they seem suspicious.
Yikes, I just re-ran the sim:
~/git/maboss_pc/examples/ToyModel$ ../../engine/src/MaBoSS -c Four_cycle_FEscape.cfg -o Four_cycle_FEscape Four_cycle.bnd
and discovered there's at least one <nil>
on each row:
~/git/maboss_pc/examples/ToyModel$ grep nil Four_cycle_FEscape_probtraj.csv | wc -l
499
I need to dig into the code to understand what's going on. My topology prof used to tell us that a dense covering was an important property. In this case, it's not desirable :-)
Yes, <nil>
is a term used by MaBoSS to the starting phenotype from which the random walks starts. So, you may find Prob[<nil>]
and ErrProb[<nil>]
in probtraj_table.csv and you may find <nil>
in the probtraj.csv file if the trajectory goes through this phenotype. Note that probtraj_table.csv is the transposed version of probtraj.csv (plus some text cleaning).
Could this <nil>
be messing up? I have no problem using this in Unix.
I can send you a probtraj_table.csv and a probtraj.csv files if you want to give them a try with this python script.
Yes, I'd welcome your .csv files (heiland@iu.edu) to test. Are you saying you replicated my Toy run and ran the Python script to plot (both as listed above) and it worked OK?
Not really, those are files from another run, sorry. I'll run the toy asap.
Got those - thanks! I'll just point out that your .csv didn't contain any <nil>
s (well, except in the header row - the 1st line, of column labels). So, yes, the Python plotting script does seem to generate valid plots for your data (shown here, but I've cropped off the numerous labels).
Btw, I'm running the sim built from this repo, on OSX (~=Unix :-))
Good! So, in the probtraj_table.csv nil is only in the header, but in the probtraj.csv you may find quite a lot.
Ah, I just realized I'm missing the "_table.csv" after I run my sim. Is there a post-processing step I missed?
Yes, it's better explained in the mail I just send you. My fault!
Thanks!!
- run a Perl script to generate desired results (specify MaBoSS executable):
~/git/maboss_pc/examples/ToyModel$ ../../tools/MBSS_FormatTable.pl Four_cycle.bnd Four_cycle_FEscape.cfg -mb ../../engine/src/MaBoSS
...
--> generates 2 subdirs (for some reason):
/Four_cycle_FEscape_1 and /Four_cycle_FEscape_2,
with the latter containing the important "*_table.csv":
-rw-r--r-- 1 heiland staff 291454 Jan 25 14:31 Four_cycle_FEscape_2_probtraj_table.csv
- run the Python script on that subdir to generate the plot (.pdf).
~/git/maboss_pc/examples/ToyModel$ python ~/git/maboss_pc/tools/MBSS_TrajectoryFig.py Four_cycle_FEscape_2
Yay, great! And sorry about the missing mail! The -mb flag is only needed if you rename the executable. And the two folders were made because the perl script avoids to overwrite files and instead numbers the different runs you make.
If you're on Windows/MinGW, in a MINGW64 shell, run:
from here:
heiland@LAPTOP-P2P2QC36 MINGW64 ~/git/maboss_pc/examples/ToyModel (master)
$ pwd
/c/Users/heiland/git/maboss_pc/examples/ToyModel
run:
$ perl.exe ../../tools/MBSS_FormatTable.pl Four_cycle.bnd Four_cycle_FEscape.cfg -mb ../../engine/src/MaBoSS
This will run and create a Four_cycle_FEscape
folder containing the Four_cycle_FEscape_probtraj_table.csv
file.
Then, from a Command Prompt shell (not sure why I can't run python from a MINGW64 shell), we attempt the following, but seem to have a problem. Need to dig into this more.
C:\Users\heiland\git\maboss_pc\examples\ToyModel>python ..\..\tools\MBSS_TrajectoryFig.py Four_cycle_FEscape
C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:83: RuntimeWarning: invalid value encountered in reduce
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
A .pdf is created, but it has no plots:
-rw-r--r-- 1 heiland Administrators 17165 Feb 3 18:01 Four_cycle_FEscape_traj.pdf
However, when I copy the 2 data files (Four_cycle.bnd and Four_cycle_FEscape.cfg) from MinGW and re-run the Perl & Python scripts on OSX, it does indeed generate the expected plots (matching those from OSX):
~/git/maboss_pc/examples/ToyModel_mingw$ ../../tools/MBSS_FormatTable.pl Four_cycle.bnd Four_cycle_FEscape.cfg -mb ../../engine/src/MaBoSS
U_rand2 = 9.02358e-06
U_rand2 = 5.29177e-06
random_rate = 5.29177e-06
U_rand2 = 7.7975e-06
random_rate = 7.7975e-06
U_rand2 = 7.29458e-06
U_rand2 = 6.19795e-07
random_rate = 3.09898e-06
U_rand2 = 4.36278e-06
U_rand2 = 9.86736e-07
random_rate = 9.86736e-07
U_rand2 = 6.24917e-06
U_rand2 = 1.43098e-06
random_rate = 7.15489e-06
U_rand2 = 1.67359e-06
random_rate = 1.67359e-06
U_rand2 = 8.72556e-06
U_rand2 = 1.97347e-06
random_rate = 9.86736e-06
~/git/maboss_pc/examples/ToyModel_mingw$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
~/git/maboss_pc/examples/ToyModel_mingw$ ls
Four_cycle.bnd Four_cycle_FEscape_1/ Four_cycle_FEscape_traj.xlsx
Four_cycle_FEscape/ Four_cycle_FEscape_bkup/
Four_cycle_FEscape.cfg Four_cycle_FEscape_traj.pdf
~/git/maboss_pc/examples/ToyModel_mingw$ ll
total 344
-rw-r--r--@ 1 heiland staff 348 Feb 4 21:27 Four_cycle.bnd
drwxr-xr-x 10 heiland staff 320 Feb 6 18:39 Four_cycle_FEscape/
-rw-r--r--@ 1 heiland staff 2441 Feb 4 21:26 Four_cycle_FEscape.cfg
drwxr-xr-x 10 heiland staff 320 Feb 6 18:52 Four_cycle_FEscape_1/
drwxr-xr-x 10 heiland staff 320 Feb 6 18:51 Four_cycle_FEscape_bkup/
-rw-r--r--@ 1 heiland staff 16374 Feb 6 18:48 Four_cycle_FEscape_traj.pdf
-rw-r--r-- 1 heiland staff 92592 Feb 6 18:48 Four_cycle_FEscape_traj.xlsx
~/git/maboss_pc/examples/ToyModel_mingw$ python ~/git/maboss_pc/tools/MBSS_TrajectoryFig.py Four_cycle_FEscape_1
~/git/maboss_pc/examples/ToyModel_mingw$ ll *.pdf
-rw-r--r-- 1 heiland staff 21220 Feb 6 18:54 Four_cycle_FEscape_1_traj.pdf
-rw-r--r--@ 1 heiland staff 16374 Feb 6 18:48 Four_cycle_FEscape_traj.pdf
~/git/maboss_pc/examples/ToyModel_mingw$ open Four_cycle_FEscape_1_traj.pdf
Fwiw, the Python version on Windows is newer and the version of numpy is:
C:\Users\heiland\git\maboss_pc>python
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
>>> numpy.version.version
'1.15.4'
On OSX, I have numpy version 1.14.3
Maybe I've mentioned a time or two how Windows drives me insane? In a Command Prompt shell:
C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe ..\..\tools\MBSS_FormatTable.pl Four_cycle.bnd .Four_cycle_FEscape.cfg -mb ..\..\engine\src\MaBoSS.exe
Can't open perl script "..\..\tools\MBSS_FormatTable.pl": No such file or directory
C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l ..\..\tools\MBSS_FormatTable.pl
ls: ..\..\tools\MBSS_FormatTable.pl: No such file or directory
C:\Users\heiland\git\maboss_pc\examples\ToyModel>cd ..\..\tools
C:\Users\heiland\git\maboss_pc\tools>ls -l MBSS_FormatTable.pl
-rw-r--r-- 1 heiland Administrators 9381 Feb 6 19:48 MBSS_FormatTable.pl
Sorry :-/
I'm trying make on my Windows 10 pc at home now.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Paul Macklin, Ph.D. Associate Professor
Director of Undergraduate Studies
Intelligent Systems Engineering Indiana University Founder and Lead of PhysiCell http://physicell.mathcancer.org/ and MultiCellDS http://multicellds.org/ mobile: 626-372-1203 <(626)%20372-1203> email: macklinp@iu.edu email: Paul.Macklin@MathCancer.org web: http://MathCancer.org http://mathcancer.org/ Twitter: @MathCancer http://www.twitter.com/MathCancer
On Wed, Feb 6, 2019 at 7:56 PM Randy Heiland notifications@github.com wrote:
Maybe I've mentioned a time or two how Windows drives me insane? In a Command Prompt shell:
C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe ....\tools\MBSS_FormatTable.pl Four_cycle.bnd .Four_cycle_FEscape.cfg -mb ....\engine\src\MaBoSS.exe Can't open perl script "....\tools\MBSS_FormatTable.pl": No such file or directory
C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l ....\tools\MBSS_FormatTable.pl ls: ....\tools\MBSS_FormatTable.pl: No such file or directory
C:\Users\heiland\git\maboss_pc\examples\ToyModel>cd ....\tools
C:\Users\heiland\git\maboss_pc\tools>ls -l MBSS_FormatTable.pl -rw-r--r-- 1 heiland Administrators 9381 Feb 6 19:48 MBSS_FormatTable.pl
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rheiland/maboss_pc/issues/2#issuecomment-461249545, or mute the thread https://github.com/notifications/unsubscribe-auth/AKubcHthfiWSFReoqdX8XzdF_sFg7hIiks5vK3nWgaJpZM4aTNmw .
I'm using 64-bit mingw-w64 with posix threads.
Seems to compile fine. (first time I compiled had a strange error where the executable was 0 bytes, but I did a make clean and it seemed to work)
c:\GitHub\maboss_pc\engine\src>make
make -f Makefile.maboss init
make[1]: Entering directory /c/GitHub/maboss_pc/engine/src' make[1]: Leaving directory
/c/GitHub/maboss_pc/engine/src'
make -f Makefile.maboss depend
make[1]: Entering directory /c/GitHub/maboss_pc/engine/src' make[1]: Leaving directory
/c/GitHub/maboss_pc/engine/src'
make -f Makefile.maboss all
make[1]: Entering directory `/c/GitHub/maboss_pc/engine/src'
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c MaBoSS.cc -o MaBoSS.o
MaBoSS.cc: In function 'int main(int, char*)':
MaBoSS.cc:302:23: warning: 'start_time' may be used uninitialized in this
function [-Wmaybe-uninitialized]
runconfig->display(network, start_time, end_time, mabest, output_run);
MaBoSS.cc:302:23: warning: 'end_time' may be used uninitialized in this
function [-Wmaybe-uninitialized]
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c MaBEstEngine.cc -o
MaBEstEngine.o
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c Cumulator.cc -o Cumulator.o
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c ProbaDist.cc -o ProbaDist.o
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c BooleanNetwork.cc -o
BooleanNetwork.o
flex -t BooleanGrammar.l | sed -e 's/yy/CTBNDL/g' -e 's/register //g' >
lex.CTBNDL.cc
bison -v BooleanGrammar.y
sed -e 's/yy/CTBNDL/g' -e 's/register //g' BooleanGrammar.tab.c >
BooleanGrammar.cc
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c BooleanGrammar.cc -o
BooleanGrammar.o
flex -t RunConfigGrammar.l | sed -e 's/yy/RC/g' -e 's/register //g' >
lex.RC.cc
bison -v RunConfigGrammar.y
sed -e 's/yy/RC/g' -e 's/register //g' RunConfigGrammar.tab.c >
RunConfigGrammar.cc
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c RunConfigGrammar.cc -o
RunConfigGrammar.o
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c RunConfig.cc -o RunConfig.o
g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c LogicalExprGen.cc -o
LogicalExprGen.o
g++ -o MaBoSS MaBoSS.o MaBEstEngine.o Cumulator.o ProbaDist.o
BooleanNetwork.o BooleanGrammar.o RunConfigGrammar.o RunConfig.o
LogicalExprGen.o -lpthread
make[1]: Leaving directory `/c/GitHub/maboss_pc/engine/src'
*and now: *
c:\GitHub\maboss_pc\examples\ToyModel>..\..\engine\src\MaBoSS.exe -c
Four_cycle_FEscape.cfg -o Four_cycle_FEscape Four_cycle.bnd
Assertion failed!
Program: c:\GitHub\maboss_pc\engine\src\MaBoSS.exe
File: MaBEstEngine.cc, Line 103
Expression: node_idx != INVALID_NODE_INDEX
c:\GitHub\maboss_pc\examples\ToyModel>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
*Paul Macklin, Ph.D. *Associate Professor
Director of Undergraduate Studies
*Intelligent Systems Engineering*
*Indiana University *
Founder and Lead of PhysiCell <http://physicell.mathcancer.org/> and
MultiCellDS <http://multicellds.org/>
mobile: 626-372-1203 <(626)%20372-1203>
email: macklinp@iu.edu
email: Paul.Macklin@MathCancer.org
web: http://MathCancer.org <http://mathcancer.org/>
Twitter: @MathCancer <http://www.twitter.com/MathCancer>
On Wed, Feb 6, 2019 at 9:54 PM Paul Macklin <paul.macklin@mathcancer.org>
wrote:
> Sorry :-/
>
> I'm trying make on my Windows 10 pc at home now.
>
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> *Paul Macklin, Ph.D. *Associate Professor
>
> Director of Undergraduate Studies
>
> *Intelligent Systems Engineering*
> *Indiana University *
> Founder and Lead of PhysiCell <http://physicell.mathcancer.org/> and
> MultiCellDS <http://multicellds.org/>
> mobile: 626-372-1203 <(626)%20372-1203>
> email: macklinp@iu.edu
> email: Paul.Macklin@MathCancer.org
> web: http://MathCancer.org <http://mathcancer.org/>
> Twitter: @MathCancer <http://www.twitter.com/MathCancer>
>
>
>
> On Wed, Feb 6, 2019 at 7:56 PM Randy Heiland <notifications@github.com>
> wrote:
>
>> Maybe I've mentioned a time or two how Windows drives me insane? In a
>> Command Prompt shell:
>>
>> C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe ..\..\tools\MBSS_FormatTable.pl Four_cycle.bnd .Four_cycle_FEscape.cfg -mb ..\..\engine\src\MaBoSS.exe
>> Can't open perl script "..\..\tools\MBSS_FormatTable.pl": No such file or directory
>>
>> C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l ..\..\tools\MBSS_FormatTable.pl
>> ls: ..\..\tools\MBSS_FormatTable.pl: No such file or directory
>>
>> C:\Users\heiland\git\maboss_pc\examples\ToyModel>cd ..\..\tools
>>
>> C:\Users\heiland\git\maboss_pc\tools>ls -l MBSS_FormatTable.pl
>> -rw-r--r-- 1 heiland Administrators 9381 Feb 6 19:48 MBSS_FormatTable.pl
>>
>> —
>> You are receiving this because you are subscribed to this thread.
>> Reply to this email directly, view it on GitHub
>> <https://github.com/rheiland/maboss_pc/issues/2#issuecomment-461249545>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AKubcHthfiWSFReoqdX8XzdF_sFg7hIiks5vK3nWgaJpZM4aTNmw>
>> .
>>
>
OK, since that node_idx is only set to that flag if it fails to enter the loop, I put in some monkey debugging in the engine:
bool did_it = false; while (begin != end && random_rate > 0.) { node_idx = (begin).first; double rate = (begin).second; random_rate -= rate; ++begin; did_it = true; }
if( did_it == false ) { std::cout << "["; std::cout << nodeTransitionRates.size() << " " << U_rand2 << " " << total_rate << " " << random_rate; if( begin == end ) { std::cout << " begin and end are the same "; } std::cout << "]" << std::endl << std::endl; }
And I do get a cout:
[1 0 4 0]
So, U_rand2 * total_rate = 0, so the total rate is zero. Also, the map seems to have size 1, but it's not saying that start = end. So, it looks to me like it's failing to enter the loop because random_rate > 0 is not true.
Now, if I change the code to this:
NodeIndex MaBEstEngine::getTargetNode(RandomGenerator random_generator, const MAP<NodeIndex, double>& nodeTransitionRates, double total_rate) const { double U_rand2 = random_generator->generate(); double random_rate = U_rand2 total_rate; MAP<NodeIndex, double>::const_iterator begin = nodeTransitionRates.begin(); MAP<NodeIndex, double>::const_iterator end = nodeTransitionRates.end(); NodeIndex node_idx = INVALID_NODE_INDEX; while (begin != end && random_rate >= 0.) { node_idx = (begin).first; double rate = (begin).second; random_rate -= rate; ++begin; }
assert(node_idx != INVALID_NODE_INDEX); assert(network->getNode(node_idx)->getIndex() == node_idx); return node_idx; }
Then, the code seems to run to completion for me. I get no assert failures. It creates .csv files of nonzero size. (But I have no idea what I'm looking at, so I can't say if those CSV files mean anything.)
But you know ... first get it to compile, then get it to run without crashing, then make sure it's right, then make it fast. ;-) I guess this might get us to step 2??
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Paul Macklin, Ph.D. Associate Professor
Director of Undergraduate Studies
Intelligent Systems Engineering Indiana University Founder and Lead of PhysiCell http://physicell.mathcancer.org/ and MultiCellDS http://multicellds.org/ mobile: 626-372-1203 <(626)%20372-1203> email: macklinp@iu.edu email: Paul.Macklin@MathCancer.org web: http://MathCancer.org http://mathcancer.org/ Twitter: @MathCancer http://www.twitter.com/MathCancer
On Wed, Feb 6, 2019 at 10:08 PM Paul Macklin paul.macklin@mathcancer.org wrote:
I'm using 64-bit mingw-w64 with posix threads.
Seems to compile fine. (first time I compiled had a strange error where the executable was 0 bytes, but I did a make clean and it seemed to work)
c:\GitHub\maboss_pc\engine\src>make make -f Makefile.maboss init make[1]: Entering directory
/c/GitHub/maboss_pc/engine/src' make[1]: Leaving directory
/c/GitHub/maboss_pc/engine/src' make -f Makefile.maboss depend make[1]: Entering directory/c/GitHub/maboss_pc/engine/src' make[1]: Leaving directory
/c/GitHub/maboss_pc/engine/src' make -f Makefile.maboss all make[1]: Entering directory `/c/GitHub/maboss_pc/engine/src' g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c MaBoSS.cc -o MaBoSS.o MaBoSS.cc: In function 'int main(int, char*)': MaBoSS.cc:302:23: warning: 'start_time' may be used uninitialized in this function [-Wmaybe-uninitialized] runconfig->display(network, start_time, end_time, mabest, output_run);MaBoSS.cc:302:23: warning: 'end_time' may be used uninitialized in this function [-Wmaybe-uninitialized] g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c MaBEstEngine.cc -o MaBEstEngine.o g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c Cumulator.cc -o Cumulator.o g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c ProbaDist.cc -o ProbaDist.o g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c BooleanNetwork.cc -o BooleanNetwork.o flex -t BooleanGrammar.l | sed -e 's/yy/CTBNDL/g' -e 's/register //g' > lex.CTBNDL.cc bison -v BooleanGrammar.y sed -e 's/yy/CTBNDL/g' -e 's/register //g' BooleanGrammar.tab.c > BooleanGrammar.cc g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c BooleanGrammar.cc -o BooleanGrammar.o flex -t RunConfigGrammar.l | sed -e 's/yy/RC/g' -e 's/register //g' > lex.RC.cc bison -v RunConfigGrammar.y sed -e 's/yy/RC/g' -e 's/register //g' RunConfigGrammar.tab.c > RunConfigGrammar.cc g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c RunConfigGrammar.cc -o RunConfigGrammar.o g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c RunConfig.cc -o RunConfig.o g++ -O2 -Wall -DMAXNODES=64 -std=c++11 -c LogicalExprGen.cc -o LogicalExprGen.o g++ -o MaBoSS MaBoSS.o MaBEstEngine.o Cumulator.o ProbaDist.o BooleanNetwork.o BooleanGrammar.o RunConfigGrammar.o RunConfig.o LogicalExprGen.o -lpthread make[1]: Leaving directory `/c/GitHub/maboss_pc/engine/src' *and now: * c:\GitHub\maboss_pc\examples\ToyModel>..\..\engine\src\MaBoSS.exe -c Four_cycle_FEscape.cfg -o Four_cycle_FEscape Four_cycle.bnd Assertion failed! Program: c:\GitHub\maboss_pc\engine\src\MaBoSS.exe File: MaBEstEngine.cc, Line 103 Expression: node_idx != INVALID_NODE_INDEX c:\GitHub\maboss_pc\examples\ToyModel> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- *Paul Macklin, Ph.D. *Associate Professor Director of Undergraduate Studies *Intelligent Systems Engineering* *Indiana University * Founder and Lead of PhysiCell <http://physicell.mathcancer.org/> and MultiCellDS <http://multicellds.org/> mobile: 626-372-1203 <(626)%20372-1203> email: macklinp@iu.edu email: Paul.Macklin@MathCancer.org web: http://MathCancer.org <http://mathcancer.org/> Twitter: @MathCancer <http://www.twitter.com/MathCancer> On Wed, Feb 6, 2019 at 9:54 PM Paul Macklin <paul.macklin@mathcancer.org> wrote: > Sorry :-/ > > I'm trying make on my Windows 10 pc at home now. > > > > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > *Paul Macklin, Ph.D. *Associate Professor > > Director of Undergraduate Studies > > *Intelligent Systems Engineering* > *Indiana University * > Founder and Lead of PhysiCell <http://physicell.mathcancer.org/> and > MultiCellDS <http://multicellds.org/> > mobile: 626-372-1203 <(626)%20372-1203> > email: macklinp@iu.edu > email: Paul.Macklin@MathCancer.org > web: http://MathCancer.org <http://mathcancer.org/> > Twitter: @MathCancer <http://www.twitter.com/MathCancer> > > > > On Wed, Feb 6, 2019 at 7:56 PM Randy Heiland <notifications@github.com> > wrote: > >> Maybe I've mentioned a time or two how Windows drives me insane? In a >> Command Prompt shell: >> >> C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe ..\..\tools\MBSS_FormatTable.pl Four_cycle.bnd .Four_cycle_FEscape.cfg -mb ..\..\engine\src\MaBoSS.exe >> Can't open perl script "..\..\tools\MBSS_FormatTable.pl": No such file or directory >> >> C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l ..\..\tools\MBSS_FormatTable.pl >> ls: ..\..\tools\MBSS_FormatTable.pl: No such file or directory >> >> C:\Users\heiland\git\maboss_pc\examples\ToyModel>cd ..\..\tools >> >> C:\Users\heiland\git\maboss_pc\tools>ls -l MBSS_FormatTable.pl >> -rw-r--r-- 1 heiland Administrators 9381 Feb 6 19:48 MBSS_FormatTable.pl >> >> — >> You are receiving this because you are subscribed to this thread. >> Reply to this email directly, view it on GitHub >> <https://github.com/rheiland/maboss_pc/issues/2#issuecomment-461249545>, >> or mute the thread >> <https://github.com/notifications/unsubscribe-auth/AKubcHthfiWSFReoqdX8XzdF_sFg7hIiks5vK3nWgaJpZM4aTNmw> >> . >> >
Thanks Paul. Sorry to have you repeat what we discussed in another Issue.
This issue is related to just the post-processing and plotting scripts (and my venting about Windows command prompt :-) )
Hi! @rheiland I am trying to understand where the problem is. Not sure if it's in maboss_pc or in Window's python. I used those perl and python scripts in Windows using CygWin, if that is of some help...
Thanks @ArnauMontagud . The problem is just Windows Command Prompt apparent inability to deal with relative filenames. It is interesting that you can run everything without problems on CygWin. But for PhysiCell, we only ask (currently) that users install/use MinGW for gcc and other niceties.
We learned that one can do, e.g.: ...\subdir> ls .. but not: ...\subdir> ls ..\subdir
In other words, it seems that you need to provide absolute paths to any files you want to use as arguments on a command. When we do that for this Perl script, PLUS copy over the executable to the local directory(!), then it works:
C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe C:\Users\heiland\git\maboss_pc\tools\MBSS_FormatTable.pl Four_cycle.bnd Four_cycle_FEscape.cfg -mb C:\Users\heiland\git\maboss_pc\engine\src\MaBoSS.exe
cp: cannot stat `C:Usersheilandgitmaboss_pcenginesrcMaBoSS.exe': No such file or directory
sh: ./C:Usersheilandgitmaboss_pcenginesrcMaBoSS.exe: No such file or directory
Died at C:\Users\heiland\git\maboss_pc\tools\MBSS_FormatTable.pl line 95.
C:\Users\heiland\git\maboss_pc\examples\ToyModel>copy ..\..\engine\src\MaBoSS.exe .
1 file(s) copied.
C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe C:\Users\heiland\git\maboss_pc\tools\MBSS_FormatTable.pl Four_cycle.bnd Four_cycle_FEscape.cfg -mb MaBoSS.exe
...takes a few secs and completes, generated a newly incremented, suffixed subdir:
C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l
...
drwxr-xr-x 2 heiland Administrators 0 Feb 7 10:16 Four_cycle_FEscape_1
drwxr-xr-x 2 heiland Administrators 4096 Feb 7 10:18 Four_cycle_FEscape_2
drwxr-xr-x 2 heiland Administrators 4096 Feb 7 10:38 Four_cycle_FEscape_3
I was hoping using an absolute path on the Python script might avoid the previous warning, but no. We get the same warning and the generated pdf still has no plots. (However, note that using the relative path to the Python script doesn't result in a "No such file..." error, as was the case for the Perl script).
C:\Users\heiland\git\maboss_pc\examples\ToyModel>python C:\Users\heiland\git\maboss_pc\tools\MBSS_TrajectoryFig.py Four_cycle_FEscape_3
C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:83: RuntimeWarning: invalid value encountered in reduce
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls *.pdf
Four_cycle_FEscape_3_traj.pdf Four_cycle_FEscape_traj.pdf
C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l *.pdf
-rw-r--r-- 1 heiland Administrators 17200 Feb 7 10:46 Four_cycle_FEscape_3_traj.pdf
Huh, the relative pathing looked fine to me, and not horribly far off frrom stuff I've done in windows.
Sorry I can't fully test. I avoid write-once read-never languages like perl. :-)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Paul Macklin, Ph.D. Associate Professor
Director of Undergraduate Studies
Intelligent Systems Engineering Indiana University Founder and Lead of PhysiCell http://physicell.mathcancer.org/ and MultiCellDS http://multicellds.org/ mobile: 626-372-1203 <(626)%20372-1203> email: macklinp@iu.edu email: Paul.Macklin@MathCancer.org web: http://MathCancer.org http://mathcancer.org/ Twitter: @MathCancer http://www.twitter.com/MathCancer
On Thu, Feb 7, 2019 at 10:59 AM Randy Heiland notifications@github.com wrote:
Thanks @ArnauMontagud https://github.com/ArnauMontagud . The problem is just Windows Command Prompt apparent inability to deal with relative filenames. It is interesting that you can run everything without problems on CygWin. But for PhysiCell, we only ask (currently) that users install/use MinGW for gcc and other niceties.
We learned that one can do, e.g.: ...\subdir> ls .. but not: ...\subdir> ls ..\subdir
In other words, it seems that you need to provide absolute paths to any files you want to use as arguments on a command. When we do that for this Perl script, PLUS copy over the executable to the local directory(!), then it works:
C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe C:\Users\heiland\git\maboss_pc\tools\MBSS_FormatTable.pl Four_cycle.bnd Four_cycle_FEscape.cfg -mb C:\Users\heiland\git\maboss_pc\engine\src\MaBoSS.exe cp: cannot stat `C:Usersheilandgitmaboss_pcenginesrcMaBoSS.exe': No such file or directory sh: ./C:Usersheilandgitmaboss_pcenginesrcMaBoSS.exe: No such file or directory Died at C:\Users\heiland\git\maboss_pc\tools\MBSS_FormatTable.pl line 95.
C:\Users\heiland\git\maboss_pc\examples\ToyModel>copy ....\engine\src\MaBoSS.exe . 1 file(s) copied.
C:\Users\heiland\git\maboss_pc\examples\ToyModel>perl.exe C:\Users\heiland\git\maboss_pc\tools\MBSS_FormatTable.pl Four_cycle.bnd Four_cycle_FEscape.cfg -mb MaBoSS.exe ...takes a few secs and completes, generated a newly incremented, suffixed subdir: C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l ... drwxr-xr-x 2 heiland Administrators 0 Feb 7 10:16 Four_cycle_FEscape_1 drwxr-xr-x 2 heiland Administrators 4096 Feb 7 10:18 Four_cycle_FEscape_2 drwxr-xr-x 2 heiland Administrators 4096 Feb 7 10:38 Four_cycle_FEscape_3
I was hoping using an absolute path on the Python script might avoid the previous warning, but no. We get the same warning and the generated pdf still has no plots. (However, note that using the relative path to the Python script doesn't result in a "No such file..." error, as was the case for the Perl script).
C:\Users\heiland\git\maboss_pc\examples\ToyModel>python C:\Users\heiland\git\maboss_pc\tools\MBSS_TrajectoryFig.py Four_cycle_FEscape_3 C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py:83: RuntimeWarning: invalid value encountered in reduce return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls *.pdf Four_cycle_FEscape_3_traj.pdf Four_cycle_FEscape_traj.pdf
C:\Users\heiland\git\maboss_pc\examples\ToyModel>ls -l *.pdf -rw-r--r-- 1 heiland Administrators 17200 Feb 7 10:46 Four_cycle_FEscape_3_traj.pdf
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rheiland/maboss_pc/issues/2#issuecomment-461484616, or mute the thread https://github.com/notifications/unsubscribe-auth/AKubcEQum6t9lxj1IZ6ttSkVn5bzwbppks5vLE1hgaJpZM4aTNmw .
I ran the
examples/ToyModel
via:then copied its output files to a subdir named
Four_cycle_FEscape
(an apparent requirement for the plotting script) and tried to plot results, but got some errors, e.g.:Long story short, I inserted some try/excepts to catch errors, and also had to comment out
fig.tight_layout()
and pushed those changes to the plotting script. It finally "ran", but produced some strange results in the generated pdf.