CellProfiler-Analyst icon indicating copy to clipboard operation
CellProfiler-Analyst copied to clipboard

Export per object classification from a hit table to CSV

Open karhohs opened this issue 9 years ago • 9 comments

After training a classifier and then scoring a dataset, export a CSV file that contains per object classification data. Rows would represent classified objects and, in addition to classification info, there should also be columns for image number and object number.

karhohs avatar May 28 '16 04:05 karhohs

Checking with @braymp and @dlogan ... does this functionality already exist in CPA? Or did you guys use scripts?

AnneCarpenter avatar May 29 '16 12:05 AnneCarpenter

I am actually surprised that we cannot export that as CSV! I always assumed that 'score all' does this already by returning the enrichment scores but I was wrong.

If we don't have this functionality in CPA, I am happy to add it into CPA. The predicted classes are returned in this line of code.

daviddao avatar May 29 '16 12:05 daviddao

You could use the class_table properties file field, then the TableViewer to open it from the db and subsequently export it.

On Sun, May 29, 2016 at 8:53 AM, David Dao [email protected] wrote:

I am actually surprised that we cannot export that as CSV! I always assumed that 'score all' does this already by returning the enrichment scores but I was wrong.

If we don't have this functionality in CPA, I am happy to add it into CPA. The predicted classes are returned in this line of code https://github.com/CellProfiler/CellProfiler-Analyst/blob/b67352bff3968357c684d19b6c304ef81d3612c4/cpa/multiclasssql.py#L262 .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CellProfiler/CellProfiler-Analyst/issues/183#issuecomment-222359086, or mute the thread https://github.com/notifications/unsubscribe/ABIaiMl17_wKo18K_RYvQQQPods5zh-mks5qGYxNgaJpZM4Io_Nj .

braymp avatar May 29 '16 13:05 braymp

We haven't kept up with creating class tables... and I would rather avoid committing to people's databases.

On Sun, May 29, 2016 at 9:32 PM, Mark Bray [email protected] wrote:

You could use the class_table properties file field, then the TableViewer to open it from the db and subsequently export it.

On Sun, May 29, 2016 at 8:53 AM, David Dao [email protected] wrote:

I am actually surprised that we cannot export that as CSV! I always assumed that 'score all' does this already by returning the enrichment scores but I was wrong.

If we don't have this functionality in CPA, I am happy to add it into CPA. The predicted classes are returned in this line of code < https://github.com/CellProfiler/CellProfiler-Analyst/blob/b67352bff3968357c684d19b6c304ef81d3612c4/cpa/multiclasssql.py#L262

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/CellProfiler/CellProfiler-Analyst/issues/183#issuecomment-222359086 , or mute the thread < https://github.com/notifications/unsubscribe/ABIaiMl17_wKo18K_RYvQQQPods5zh-mks5qGYxNgaJpZM4Io_Nj

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CellProfiler/CellProfiler-Analyst/issues/183#issuecomment-222360812, or mute the thread https://github.com/notifications/unsubscribe/AJJbgmLEAjD7-k2kuzopkAtPFNj8JYWpks5qGZVfgaJpZM4Io_Nj .

jhung0 avatar May 30 '16 01:05 jhung0

There's a new pull request you can try out

jhung0 avatar Jun 03 '16 08:06 jhung0

Hi Jane,

Silly question: by "new pull request" do you mean that I should sync with the nightly to try out your latest change?

Thanks, Kyle

On Fri, Jun 3, 2016 at 4:41 AM, Jane Hung [email protected] wrote:

There's a new pull request you can try out

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CellProfiler/CellProfiler-Analyst/issues/183#issuecomment-223523721, or mute the thread https://github.com/notifications/unsubscribe/AAJiSKcwZ0YiGWl9WZauE-6KCOI4ltmuks5qH-iygaJpZM4Io_Nj .

karhohs avatar Jun 03 '16 20:06 karhohs

Hi Kyle,

Not quite. It means that you need to start CPA from this branch (scoreAdd_objects). Just download it and run:

python CellProfiler-Analyst.py

(given that your machine has all dependencies installed)

Our automatic build is just for the master branch.

daviddao avatar Jun 03 '16 21:06 daviddao

Oh no sorry I should clarify. Pull requests aren't merged in with master, but you can check out the pull request locally to verify the changes are what you're looking for. You can check out using github desktop or command line. On Jun 4, 2016 04:40, "karhohs" [email protected] wrote:

Hi Jane,

Silly question: by "new pull request" do you mean that I should sync with the nightly to try out your latest change?

Thanks, Kyle

On Fri, Jun 3, 2016 at 4:41 AM, Jane Hung [email protected] wrote:

There's a new pull request you can try out

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/CellProfiler/CellProfiler-Analyst/issues/183#issuecomment-223523721 , or mute the thread < https://github.com/notifications/unsubscribe/AAJiSKcwZ0YiGWl9WZauE-6KCOI4ltmuks5qH-iygaJpZM4Io_Nj

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CellProfiler/CellProfiler-Analyst/issues/183#issuecomment-223688958, or mute the thread https://github.com/notifications/unsubscribe/AJJbgmf43uJIxgk9F_I3BMAP0opaiHGLks5qIJFBgaJpZM4Io_Nj .

jhung0 avatar Jun 05 '16 15:06 jhung0

Could someone confirm the behavior? I guess this would be @karhohs but maybe check w Beth if it's a challenge to check out the right branch.

AnneCarpenter avatar Sep 05 '16 12:09 AnneCarpenter