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

Error running rna scope mouse function @ line 56 #1

Open
JuliaCS2917 opened this issue Jun 11, 2020 · 17 comments
Open

Error running rna scope mouse function @ line 56 #1

JuliaCS2917 opened this issue Jun 11, 2020 · 17 comments

Comments

@JuliaCS2917
Copy link

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
Copy link
Collaborator

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
Copy link
Author

JuliaCS2917 commented Jun 19, 2020 via email

@yoser-alrawi
Copy link

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
Copy link
Author

JuliaCS2917 commented Jul 23, 2020 via email

@andrewejaffe
Copy link
Collaborator

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
Copy link
Author

JuliaCS2917 commented Jul 23, 2020 via email

@ohmstead
Copy link

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
Copy link

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
Copy link
Author

JuliaCS2917 commented Aug 10, 2020 via email

@yoser-alrawi
Copy link

yoser-alrawi commented Aug 11, 2020

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
Copy link

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
Copy link

yoser-alrawi commented Aug 11, 2020

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_CA1__Z002.tif, PV_Per1_Per2_CA1__Z002_CH1.tif, PV_Per1_Per2_CA1_Z002__overlay.tif, but for all of them I was getting the same error as above.

@yoser-alrawi
Copy link

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
Copy link

Hi Yoser,

I think I found your problem. Which I think is also related to @ohmstead [issue (https://github.com//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
Copy link

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
Copy link

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
Copy link

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

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

6 participants