Murali-group / BoolODE

Git Repo for simulating Boolean Models
GNU General Public License v3.0
32 stars 15 forks source link

Option parser for Slingshot only takes first letter from argument and discards the rest #24

Open yutuyt01 opened 3 months ago

yutuyt01 commented 3 months ago

When passing arguments into run_Slingshot.py, the outPrefix argument seems to only take the first letter of the argument and discard the rest. When this is run:

python scripts/runSlingshot.py --outPrefix output -p Synthetic/dyn-LI/PseudoTime.csv -e Synthetic/dyn-LI/ExpressionData.csv -c 1 -r 10

The following error occurs:

FileNotFoundError: [Errno 2] No such file or directory: 'o/PseudoTime.csv'

This happens with an absolute path as well, where it simply looks for "C/PsuedoTime.csv". Setting the default to such a string results in the same error, bizarrely (including passing a raw string).

This error was discussed and a solution was discussed here: StackOverflow - however, the solution only applies to the newer argparse and not optparse. I couldn't find a similar issue anywhere else. The nargs argument doesn't work in a similar fashion between the two parsing options.

Could possibly upgrade to argparse for a solution.

Also, for the instance when clusters = 1, a directory is not created for the output files with mkdir.

yutuyt01 commented 3 months ago

Moved as the issue was opened under the wrong repository

yutuyt01 commented 3 months ago

Kevin has pointed out the issue is that the script is trying to read outPaths as a list and iterating through each outPath for only the clusters = 1 case. Since this behavior is not present in the multiple clusters case, the behavior is changed to only try and read one path from outPaths. Will be solved in slingshot-docker branch.