Closed prubbens closed 3 years ago
Check that your Experiment contains the sample you're trying to load.
list(exp_name.list_samples())
should contain the sample you're trying to load into your GatingStrategy if it is valid i.e. it has been added to your Experiment correctly.
Apologies you keep running into problems @prubbens. An extensive tutorial with an example data will be published soon alongside our updated manuscript following peer-review.
I realise CytoPy has some problems that need ironing out so for the time being I would consider it an "immature" library under active development.
It's empty indeed. Yet I got no error when running add_new_sample()
. After running it, I get:
Creating new FileGroup...
Checking channel/marker mappings...
No error.
No worries, trying it out for the moment (looking forward to have this functionality available in Python). I think the integration with MongoDB is/can be quite a hassle.
I agree, MongoDB adds a heavy layer of complexity.
The ambition eventually is for CytoPy to run on a cloud platform with a web app frontend and GUI, hence why MongoDB and the mongoengine ODM was chosen in the design. MongoDB also gives us a bit more freedom when designing projects, for example when you add a Subject you can associate any kind of meta data to it you like, such a nested dictionaries.
This makes it very powerful but also makes it difficult for new python programmers and people that don't need that level of complexity.
I've had this feedback from alot of people, so I'm thinking at some point of creating "CytoPyLite" which will contain alot of the same functionality but uses SQLAlchemy and SQLite.
Yeah I understand. The institute I am working at uses MongoDB, so in the long run the package could be really useful for them.
Just a Mongo-novice myself at this point.
Related to the error, does it have something to do with an improper connection to MongoDB? Cause it's really weird I don't get an error.
It's very strange that you didn't receive an error. It looks as if the files have been added to the Experiment correctly....if not I would expect either an Assertion error for a mongoengine error when self.save
is called within the add_new_sample
function.
The only other explanation is that you possibly have multiple Experiment objects in your environment? And you've mixed them up perhaps?
This is one of the confusing things about using mongoengine (the object-document-mapper). You need be careful with state. A good practice is to reload your Project after big operations like adding lots of files or deleting experiments/files. And then always load your experiments from that Project object using load_experiment
.
You should also get a success message (when verbose = True) when adding files:
"Successfully created {sample_id} and associated to {self.experiment_id}"
Indeed, the error was due to adding experiments wrongly. Initially I got an error due to a mismatch in the template file, but I can't seem to fix it.
Can I send you a copy via mail (or put a printscreen or something), to help me out?
CytoPy 2.0 was released today making v1.0 redundant.
Hi,
I am getting an AssertionError when trying to load a datafile using the following code:
I am getting the following error:
Any idea how to fix this? The error comes from the get_sample() function.