Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table generation. Annotation files only have a single entry. #13

Closed
vzickus opened this issue Jul 9, 2018 · 6 comments
Closed

Table generation. Annotation files only have a single entry. #13

vzickus opened this issue Jul 9, 2018 · 6 comments

Comments

@vzickus
Copy link

vzickus commented Jul 9, 2018

I think I am having issues caused by this bit of code in the process_template.py script.


#Table generation:
##################
#With integrated weigths from the intensity file (here raw intensity):
ids, counts = countPointsInRegions(points, labeledImage = AnnotationFile, intensities = intensities, intensityRow = 0);
table = numpy.zeros(ids.shape, dtype=[('id','int64'),('counts','f8'),('name', 'a256')])
table["id"] = ids;
table["counts"] = counts;
table["name"] = labelToName(ids);
io.writeTable(os.path.join(BaseDirectory, 'Annotated_counts_intensities.csv'), table);

#Without weigths (pure cell number):
ids, counts = countPointsInRegions(points, labeledImage = AnnotationFile, intensities = None);
table = numpy.zeros(ids.shape, dtype=[('id','int64'),('counts','f8'),('name', 'a256')])
table["id"] = ids;
table["counts"] = counts;
table["name"] = labelToName(ids);
io.writeTable(os.path.join(BaseDirectory, 'Annotated_counts.csv'), table);

The first red flag is that the terminal outputs "Processed 0/6059", but never increases and the script ends without any error. However, the output of "Annotated_counts.csv" and "Annotated_counts_intensities.csv" only contain one row with three columns. I ran the "Check Cell detection" bit of the code, and can clearly see a lot more cells detected. Any ideas what could be the cause of this? I initially ran into issue #6, but after hard-coding the correct path, I am still getting only a single row input in the aforementioned files.

@vzickus
Copy link
Author

vzickus commented Jul 10, 2018

Following the filenames in the tutorial and the accompanying resource file, I had used the wrong annotation file.

@vzickus vzickus closed this as completed Jul 10, 2018
@sronilsson
Copy link

vzickus - I'm running into the same issues: this and #6. Im using the annotation_25_full_color.tif that came with the download from OSF website. Which is the correct annotation file? ta!

@vzickus
Copy link
Author

vzickus commented Feb 7, 2019

This has been quite some time ago, and now I cannot remember (for the benefit of others, that last comment should have been more descriptive to be honest). If I don't forget, I will try to have a look tomorrow.

@sronilsson
Copy link

Alright, thanks!

@vzickus
Copy link
Author

vzickus commented Feb 8, 2019

OK, so in my parameter_file scripts I have:

AtlasFile = os.path.join(PathReg, '2p_mouse_brain_data_25um.tif');
AnnotationFile = os.path.join(PathReg, 'annotation_25_full.nrrd');

Where PathReg is just </path/to/atlas/files>

So .nrrd must be the correct annotation file to use. Can you try and let me know if this works?

@sronilsson
Copy link

Seemed to have worked - thanks, much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants