Welcome to the Allen Cell Discussion Forum, the official community site for Allen Institute for Cell Science! This forum is a place for learning, helping, and sharing experiences of using our publicly-available cell lines, plasmids, genomic data, software, and analytic tools.
Get started: read our new user guide and know our community guidelines.
I’ve successfully been running the segmentation through the jupyter notebooks for individual image files.
I now am attempting to loop files through the .py files in either the anaconda prompt (anaconda 3) or python3.8. When I attempt to open the files, python3.8 opens up briefly and immediately closes. If I open python and drag the files in, I get the error message:
File “”, line 1
C:\Users\elcid\aics-segmentation\aicssegmentation\structure_wrapper\seg_ctnnb1.py
^
SyntaxError: unexpected character after line continuation character
The character \ has a special meaning in python that can cause issues when trying to open files in Windows. It’s been some time since I tried to use python on Windows, so I don’t remember exactly how I got it to work, but you might need to add another \ after each \ and put the filepath in quotations to get it to work properly, like so: "C:\\Users\\elcid\\aics-segmentation\\aicssegmentation\\structure_wrapper\\seg_ctnnb1.py"
Thanks for your response. Unfortunately I still get the same out come (quickly opening and closing window), with different permutations of quotes and double \. I’ll keep searching for a fix and update if I find something.
I am currently trying to open any of the segmentation files in the structure_wrapper folder (e.g., seg_atp2at.py, seg_cetn2.py, etc…). I modified the segmentation parameters in the cetn2 notebook and would like to run as a loop in the anacando prompt, but as mentioned, cannot seem to actually open the files.
Thanks for the clarification. What code editor are you using? Common ones are like VS Code, Atom, Sublime, etc… In any of the code editors, if you simply drag and drop the file into the edit, you will be able to view and edit them, such as seg_cetn2.py or seg_template.py.
That is a great idea. For the Allen Institute segmentation work I’ve only been using the Anaconda prompt and jupyter notebook.
I am able to drag the .py files into the Spyder IDE which it did indeed show the entire code! I suppose I can now install all the required packages required to run the allen code and hopefully this should allow for the looping of multiple images.