LieberInstitute / dotdotdot

Example vignette for dotdotdot software
GNU Affero General Public License v3.0
18 stars 11 forks source link

Error running rna scope mouse function @ line 56 #1

Open JuliaCS2917 opened 4 years ago

JuliaCS2917 commented 4 years ago

I am getting an error running the rnascope_mouse function at line 56. Another labmate of mine downloaded this 3 weeks ago and is not having this error. I noticed the latest commit was 6 days ago- has something changed with the code or do you have suggestions on why I am receiving this error when running it? The error says the statement is incomplete. Image 6-11-20 at 10 37 AM

madhavitippani commented 4 years ago

If this is using the sample mouse data, uncomment the Line#20 in rnascope_mouse and comment Line#20 if using real data as mentioned in the Mouse vignette (https://github.com/LieberInstitute/dotdotdot/blob/master/docs/mouse_vignette.md).

Line#20 %out{1,2}.Dyes = {'Cy5','DsRed','EGFP','DAPI'}; %dye names are wiped out when cropped and the channel names have no information

JuliaCS2917 commented 4 years ago

Hi,

Could I ask for a bit of support with the dotdotdot? To preface, I am extremely new to Matlab-I normally utilize in house scripts- so I apologize if these are very basic errors and questions. I am running into an issue optimizing the code for my own data- a lab-mate who is more familiar with Matlab believes the issue is: 'it is not able to detect any nuclei of my images, I think because of the radius of the cells being off since we are using different files than the example images and sizes are off’

I am using .nd2 files and not sure how to optimize it best to my images. My lab-mate is getting these errors after trying to optimize it of the two attached screen shots.

I am also having an issue using the final_table.

Do you have troubleshoot support or instructions posted anywhere else?

Thank you for your time and help,

Julia Schmidt

On Jun 11, 2020, at 3:38 PM, Madhavi Tippani notifications@github.com wrote:

If this is using the sample mouse data, uncomment the Line#20 in rnascope_mouse and comment Line#20 if using real data as mentioned in the Mouse vignette (https://github.com/LieberInstitute/dotdotdot/blob/master/docs/mouse_vignette.md https://github.com/LieberInstitute/dotdotdot/blob/master/docs/mouse_vignette.md).

Line#20 %out{1,2}.Dyes = {'Cy5','DsRed','EGFP','DAPI'}; %dye names are wiped out when cropped and the channel names have no information

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LieberInstitute/dotdotdot/issues/1#issuecomment-642940500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5TFDOKEAPFXZYEAECNWG3RWFFGDANCNFSM4N3SQFMA.

yoser-alrawi commented 4 years ago

Hi Julia,

I am also new to Matlab and have been trying to run the dotdotdot (mouse version) but without success. I was wondering whether you were able to run it afterwards and if you were able to get any help or troubleshoot support.

Yoser

JuliaCS2917 commented 4 years ago

Hi Yoser,

It’s not great news, but unfortunately we never got dotdotdot to work for us and never got a response to our emails about trouble shooting either. We have pretty much decided to stop spending time trying to get it to work and instead I am writing my own in-lab code on python trying to analyze our vole data in a similar fashion.

Thanks,

Julia

On Jul 22, 2020, at 10:47 PM, yoser-alrawi notifications@github.com wrote:

Hi Julia,

I am also new to Matlab and have been trying to run the dotdotdot (mouse version) but without success. I was wondering whether you were able to run it afterwards and if you were able to get any help or troubleshoot support.

Yoser

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LieberInstitute/dotdotdot/issues/1#issuecomment-662816512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5TFDLJKFOGWHSWHUYEKPDR466GNANCNFSM4N3SQFMA.

andrewejaffe commented 4 years ago

Sorry, our main developer has been on parental leave right as these issues were posted. We will have someone else look into these two issues. Note that the June 19th issue had no screenshots attached.

JuliaCS2917 commented 4 years ago

Hi,

Here is a screen shot of the June 19th issue email with the screenshots as they were attached.

On Jul 23, 2020, at 9:13 AM, Andrew Jaffe notifications@github.com wrote:

Sorry, our main developer has been on parental leave right as these issues were posted. We will have someone else look into these two issues. Note that the June 19th issue had no screenshots attached.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LieberInstitute/dotdotdot/issues/1#issuecomment-663064526, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5TFDOPFNIY2S5W75ZGPBTR5BHSLANCNFSM4N3SQFMA.

ohmstead commented 4 years ago

The reason (in my case) that the pipeline produces the error at line 56 is because the bioformats library doesn't read in dye names properly. I've tried using .nd2 and .oib formats. For both of these image types, the OME metadata is read in with dye names as empty char vectors. The pipeline should throw an error if dye names come up empty, but instead it breaks at line 56.

yoser-alrawi commented 4 years ago

Hi Julia, I was getting the same error and when I uncommented line 20 (removed the % signs at the beginning and kept everything else as it it) it worked.

JuliaCS2917 commented 4 years ago

Hi Yoser,

Thanks so much for that input! I’ll give that a try tomorrow. Just out of curiosity where / what lab are you working from? I’m working for the Donaldson Lab at University of Colorado Boulder :)

Thanks,

Julia

On Aug 7, 2020, at 9:42 AM, yoser-alrawi notifications@github.com wrote:

Hi Julia, I was getting the same error and when I uncommented line 20 (removed the % signs at the beginning and kept everything else as it it) it worked.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LieberInstitute/dotdotdot/issues/1#issuecomment-670579722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP5TFDM5VSOKWUT2JKNUW63R7QOE5ANCNFSM4N3SQFMA.

yoser-alrawi commented 4 years ago

Hi Julia,

You are welcome! :) I am in the Gamble lab at the University of Alabama at Birmingham. Our research focus is on the circadian rhythm.

Unfortunately, the images I am trying to analyze are in a different format from the sample images provided here. So, when I tried my images using the toolbox it was having an error reading them. The images are in .tiff (I can also get .jpeg images) and the raw ones are in .gci, obtained from the Keyence microscope. I tried the human_tiff command line but got an error initially. After I thought I fixed the error, I got an empty excel sheet! So, I am still struggling with the toolbox and I am hoping someone could help us with our issues.

Best regards, Yoser

jtalboom81 commented 4 years ago

Hi Yoser,

I am not the developer or author, but I have been using their fantastic toolbox extensively. .tiff should work fine; I would never use .jpeg due to image quality loss during compression. You will have to use .tiff as your format because the "bio-formats" within the toolbox does not support .gci.

Can you please post screenshots and syntax/code of the errors you are getting? Perhaps even a sample .tif of yours that we can try to get working?

I prefer working via syntax/code as my version of Matlab is working off of a server, so I have always have used Matlab without a GUI.

Best, Josh

yoser-alrawi commented 4 years ago

Hi Josh, Thank you. Here are some further details with screenshots: My image folder contain around 25 sets of .tiff images each set has 5 images (CH1,CH2, CH3, CH4, overlay).

Screen Shot 2020-08-11 at 12 36 43 PM

I am guessing that we need to do one set at a time (though I am not sure about this), so I wrote in the command line: rnascope_mouse('/Users/youseralrawi/Documents/MATLAB projects/Keyence trial1 imgs/PV_Per1_Per2_CA1/PV_Per1_Per2_CA1__Z002_CH.tif','/Users/youseralrawi/Documents/MATLAB projects/Keyence trial1 imgs/toolbox')

This was the error I got:

Screen Shot 2020-08-11 at 12 39 26 PM

I tried various ways of naming the filename in the command line including using: the folder name, PV_Per1_Per2_CA1Z002.tif, PV_Per1_Per2_CA1__Z002_CH1.tif, PV_Per1_Per2_CA1_Z002overlay.tif, but for all of them I was getting the same error as above.

yoser-alrawi commented 4 years ago

I tried sending the image folder as zip but it couldn't send as it was over 80MB so I compressed one set of images and here it is:

Archive.zip

jtalboom81 commented 4 years ago

Hi Yoser,

I think I found your problem. Which I think is also related to @ohmstead [issue (https://github.com/LieberInstitute/dotdotdot/issues/6#issue-669063483)

I can go into more detail if you need (at least as far as I understand it) and @andrewejaffe; please correct me if I am wrong! Calculations in rnascope.mouse.m are based on the assumption that you have z-stacks and metadata, both of which your example image did not contain.

I was able to get your "example" image to work under the following conditions:

  1. I created a new "color composite" .tif (attached) in ImageJ from your 4 separate channels .tif(s), in the following order: DAPI-blue-C1, Fluorescein-green-C2, Cy3- red-C3, Cy5.5-maenta-C4. I had to erase your original image name channel information, so that rnascope.mouse.m's ReadImage6D (Line:10) & L = squeeze(image6d(:,:,:,i,:,:));(Line:35) would read in the image correctly (i.e., 4 separate channels, not 4 z-sections yoser_composite_2.zip). I assumed your channels corresponding to the RNAScope V2 Akoya Opal Dyes (below). If I was incorrect, please change: Line:20out{1,2}.Dyes = {'DAPI','Fluorescein','Cy3','Cy5.5'}; accordingly to what your images acrually are.

  2. Changed "dynamic" 3D voxel calculations, to a "fixed" 2D pixel size via: Changing Line: 65 From: prm.h=[voxelSizeX,voxelSizeY,voxelSizeZ]; %x,y,z pixel to um To: prm.h = [0.5 0.5 1.5];%x,y,z pixel to um. Changing Line:66 From: [cellbw1,~,~,~] = cellsegm.segmct(ch,(0.038),((4/3)*(pi)*(Z/2*0.4)^3),'prm',prm); To: [cellbw1,~,~,~] = cellsegm.segmct(ch,(0.038),(100),'prm',prm);

If it' s still is not working maybe try: Changing Line:67 From: load(fullfile(toolbox,'cellsegm-master','@cellsegm','private','ball3.mat'),'ball') To: load(fullfile(toolbox,'cellsegm-master','@cellsegm','private','ball1.mat'),'ball') Changing Line:68 From: f= imopen(cellbw1,ball); To: seseg = strel('disk',10); `f= imopen(cellbw1,seseg); NOTE: These last two changes I would not recommend changing unless necessary as they fundamentally alter calculations and may alter the author's/programmer's intentions. @andrewejaffe can you please comment on the viability and validity of these last two edits?

I hope this helps!!

Warm regards, Josh

yoser-alrawi commented 4 years ago

Hi Josh,

Thank you for the comprehensive reply! It was very helpful. I tried following the steps and even tried the last two but I kept getting an error in line 42 with and without altering the last 2 steps.

Screen Shot 2020-08-19 at 8 27 23 AM

Also, from what you have explained I understood that the way you provided will allow me to analyze the image as a 2D. Is that correct? I wan't aware that the format of the tif images was different as the images were taken as z-stacks from the Keyence microscope. There are 24 z-stack, the one I sent were the images of the first z-stack. Is there a way to extract metadata from those images so we can analyze them as 3D.

Thanks again for your help! I really appreciate it.

Kind regards, Yoser

jtalboom81 commented 4 years ago

Hi Yoser,

I remember having this issuer early on, but it had been so long I forgot! I think because of this issue early on, I don't run my .m scripts as a "function!" I cannot tell you why this works, and I don't have time to figure it out, but the changes below worked for me using a new unedited copy of "rnascope_mouse.m" ...

REPLACE LINES 1-4, 20:

  1. function rnascope_mouse(filename,toolbox)
  2. % filename = '/dcl01/lieber/ajaffe/Maddy/RNAscope/mouse/Data/9029/9029_Ctx_Raw/9029_WT_ECS_Ctx_1_1.czi';
  3. % toolbox = '/dcl01/lieber/ajaffe/Maddy/RNAscope/henry_test/toolbox';
  4. addpath(genpath(toolbox)) 20 %out{1,2}.Dyes = {'Cy5','DsRed','EGFP','DAPI'}; %dye names are wiped out when cropped and the channel names have no information

WITH

  1. filedir = dir('/PATH_TO_YOUR_IMAGE.../yoser_composite_2.tif');
  2. toolbox ='/PATH_TO_YOUR_DOTDOTDOT_TOOLBOX.../toolbox';
  3. addpath(genpath(toolbox))
  4. filename = fullfile(filedir(1).folder,filedir(1).name); 20 out{1,2}.Dyes = {'DAPI','Fluorescein','Cy3','Cy5.5'};

If you use a new unedited copy, remember to add in the other changes to detect nuclei.

Then to run, for me without a GUI, I just type into the prompt (>>): rnascope_mouse

This means you have to edit the script per image file! But once you get this to work, I can share my bulk processing additions to the scripts if you want.

Best, Josh

yoser-alrawi commented 4 years ago

Thank you Josh! I really appreciate your help. I will try everything you mentioned once more from start over the weekend and add those steps and see what I get.

Best regards, Yoser