Skip to content

Contents toc

Goal

Viewing data on the microscope computer is hard for a number of reasons:

  1. We are often simultaneously collecting data, and we don't want to crash the computer.

  2. This is the only Windows computer while all other computers are Linux.

  3. We have to laboriously open each image sequence as a stack and adjust thresholds depending on the channel.

  4. Multiple image stacks do not have the same thresholds, so they are not directly visually comparable.

Strategy

  • We will transfer the data using rsync from the Windows computer running Ubuntu WSL to our local desktop. Note that this is a temporary location. All microscope data should be transferred to the Google drive of rasi2@uw.edu directly from the microscope computer at the end of the experiment.

  • We will run an ImageJ python script to:

    • open all stacks of interest, channels of interest (each channel will be a separate stack).

    • adjust the lowest and highest displayed pixel value to be the same across all stacks so that they can be compared.

    • place the different stack windows nicely so that they are not on top of each other (works perfectly only for < 10 stacks).

Preliminary Setup on microscope computer

  1. Open Windows Terminal as an administrator.

  2. Stop the Windows ssh service:

    Stop-Service sshd
    
  3. Open a new tab on the same Windows Terminal window but running Ubuntu. To do this, click on the down arrow at the top of the window bar.

  4. Start the Ubuntu ssh service:

    sudo service ssh --full-restart
    

Procedure

You need to do steps 1—4 below only the first time.

  1. Clone the imagej_scripts to your local computer if you have not done so already, and symbolically link the correct script to your current analysis folder:

    cd ~/git
    git clone https://github.com/rasilab/imagej_scripts.git
    cd $folder
    ln -s ~/git/imagej_scripts/standardize_display_threshold_layout.py .
    
  2. If you have not done it already, make sure to symbolically link ImageJ to your bin which should be in your PATH:

    cd ~/bin
    ln -s ~/lib/Fiji.app/ImageJ-linux64 .
    
  3. Create an ssh profile on your local computer to enable easy logging into the microscope computer by putting the following at the bottom of your ~/.ssh/config file:

    # Microscope computer Ubuntu running on WSL
    Host scope
    User common
    HostName 140.107.25.132
    ForwardX11 yes
    Compression yes
    ControlMaster auto
    ControlPath ~/.ssh/%r@%h:%p
    ServerAliveInterval 15
    ServerAliveCountMax 3
    
  4. Enable password-less login to the microscope computer by sending your public key to the scope computer. You need to use the password from here below:

    cat .ssh/id_rsa.pub | ssh scope 'cat >> .ssh/authorized_keys'
    
  5. Create the correct destination folder in your local desktop to match the data folder on the microscope computer:

    folder="~/Desktop/data/20200103_hpark_exp223_wt_ltn1ko_tom70_nsr1_mkate2_yfp_nonstop_mf/timelapse_gfp_rfp_zstack_48hrs_1"
    mkdir --parent $folder 
    cd $folder
    
  6. Transfer the files to your local computer from the microscope computer using rsync. Here we are transferring the files for just a single imaging position since it can take a while to transfer files. Note the . at the end of the command to indicate that you want files transferred to your current directory.

    rsync -av scope://mnt/e/microscope/20200103_hpark_exp223_wt_ltn1ko_tom70_nsr1_mkate2_yfp_nonstop_mf/timelapse_gfp_rfp_zstack_48hrs_1/Pos4 .
    
  7. Run the ImageJ python script making sure to pick the right regex pattern for your folders and files. For example, below we want to look at all folders whose names end as Pos0, Pos1, … Pos9, and look at only the files inside them that contain TxR in their name:

    ImageJ-linux64 --ij2 --run standardize_display_threshold_layout.py 'file_regex="TxR",folder_regex="Pos[0-9]$"'
    

Results

Once you run the last line above, you should see ImageJ open up and each of the stacks displayed as a separate window with equal lower and upper thresholds: