Skip to content

Commit

Permalink
Deploying to gh-pages from @ d21c7c2 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
3mmaRand committed Nov 20, 2023
1 parent 5de78fd commit 01edd69
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 64 deletions.
76 changes: 38 additions & 38 deletions core/week-2/workshop.html
Original file line number Diff line number Diff line change
Expand Up @@ -489,58 +489,58 @@ <h1 class="title">Workshop</h1>
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> <span class="at">-l</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>total 212
drwxr-xr-x 2 runner docker 4096 Nov 20 15:27 data
drwxr-xr-x 2 runner docker 4096 Nov 20 15:27 images
-rw-r--r-- 1 runner docker 1597 Nov 20 15:27 overview.qmd
-rw-r--r-- 1 runner docker 25383 Nov 20 15:32 study_after_workshop.html
-rw-r--r-- 1 runner docker 184 Nov 20 15:27 study_after_workshop.qmd
-rw-r--r-- 1 runner docker 70840 Nov 20 15:32 study_before_workshop.html
-rw-r--r-- 1 runner docker 4807 Nov 20 15:27 study_before_workshop.ipynb
-rw-r--r-- 1 runner docker 13029 Nov 20 15:27 study_before_workshop.qmd
-rw-r--r-- 1 runner docker 44938 Nov 20 15:27 workshop.html
-rw-r--r-- 1 runner docker 8550 Nov 20 15:27 workshop.qmd
-rw-r--r-- 1 runner docker 8564 Nov 20 15:33 workshop.rmarkdown
drwxr-xr-x 3 runner docker 4096 Nov 20 15:27 workshop_files</code></pre>
drwxr-xr-x 2 runner docker 4096 Nov 20 15:35 data
drwxr-xr-x 2 runner docker 4096 Nov 20 15:35 images
-rw-r--r-- 1 runner docker 1597 Nov 20 15:35 overview.qmd
-rw-r--r-- 1 runner docker 25383 Nov 20 15:39 study_after_workshop.html
-rw-r--r-- 1 runner docker 184 Nov 20 15:35 study_after_workshop.qmd
-rw-r--r-- 1 runner docker 70840 Nov 20 15:39 study_before_workshop.html
-rw-r--r-- 1 runner docker 4807 Nov 20 15:35 study_before_workshop.ipynb
-rw-r--r-- 1 runner docker 13029 Nov 20 15:35 study_before_workshop.qmd
-rw-r--r-- 1 runner docker 44938 Nov 20 15:35 workshop.html
-rw-r--r-- 1 runner docker 8550 Nov 20 15:35 workshop.qmd
-rw-r--r-- 1 runner docker 8564 Nov 20 15:39 workshop.rmarkdown
drwxr-xr-x 3 runner docker 4096 Nov 20 15:35 workshop_files</code></pre>
</div>
</div>
<p>You can use more than one option at once. The <code>-h</code> option stands for “human readable” and makes the file sizes easier to understand for humans:</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb11"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> <span class="at">-hl</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>total 212K
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:27 data
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:27 images
-rw-r--r-- 1 runner docker 1.6K Nov 20 15:27 overview.qmd
-rw-r--r-- 1 runner docker 25K Nov 20 15:32 study_after_workshop.html
-rw-r--r-- 1 runner docker 184 Nov 20 15:27 study_after_workshop.qmd
-rw-r--r-- 1 runner docker 70K Nov 20 15:32 study_before_workshop.html
-rw-r--r-- 1 runner docker 4.7K Nov 20 15:27 study_before_workshop.ipynb
-rw-r--r-- 1 runner docker 13K Nov 20 15:27 study_before_workshop.qmd
-rw-r--r-- 1 runner docker 44K Nov 20 15:27 workshop.html
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:27 workshop.qmd
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:33 workshop.rmarkdown
drwxr-xr-x 3 runner docker 4.0K Nov 20 15:27 workshop_files</code></pre>
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:35 data
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:35 images
-rw-r--r-- 1 runner docker 1.6K Nov 20 15:35 overview.qmd
-rw-r--r-- 1 runner docker 25K Nov 20 15:39 study_after_workshop.html
-rw-r--r-- 1 runner docker 184 Nov 20 15:35 study_after_workshop.qmd
-rw-r--r-- 1 runner docker 70K Nov 20 15:39 study_before_workshop.html
-rw-r--r-- 1 runner docker 4.7K Nov 20 15:35 study_before_workshop.ipynb
-rw-r--r-- 1 runner docker 13K Nov 20 15:35 study_before_workshop.qmd
-rw-r--r-- 1 runner docker 44K Nov 20 15:35 workshop.html
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:35 workshop.qmd
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:39 workshop.rmarkdown
drwxr-xr-x 3 runner docker 4.0K Nov 20 15:35 workshop_files</code></pre>
</div>
</div>
<p>The <code>-a</code> option stands for “all” and shows us all the files, including hidden files.</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb13"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> <span class="at">-alh</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>total 220K
drwxr-xr-x 5 runner docker 4.0K Nov 20 15:33 .
drwxr-xr-x 6 runner docker 4.0K Nov 20 15:32 ..
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:27 data
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:27 images
-rw-r--r-- 1 runner docker 1.6K Nov 20 15:27 overview.qmd
-rw-r--r-- 1 runner docker 25K Nov 20 15:32 study_after_workshop.html
-rw-r--r-- 1 runner docker 184 Nov 20 15:27 study_after_workshop.qmd
-rw-r--r-- 1 runner docker 70K Nov 20 15:32 study_before_workshop.html
-rw-r--r-- 1 runner docker 4.7K Nov 20 15:27 study_before_workshop.ipynb
-rw-r--r-- 1 runner docker 13K Nov 20 15:27 study_before_workshop.qmd
-rw-r--r-- 1 runner docker 44K Nov 20 15:27 workshop.html
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:27 workshop.qmd
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:33 workshop.rmarkdown
drwxr-xr-x 3 runner docker 4.0K Nov 20 15:27 workshop_files</code></pre>
drwxr-xr-x 5 runner docker 4.0K Nov 20 15:39 .
drwxr-xr-x 6 runner docker 4.0K Nov 20 15:39 ..
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:35 data
drwxr-xr-x 2 runner docker 4.0K Nov 20 15:35 images
-rw-r--r-- 1 runner docker 1.6K Nov 20 15:35 overview.qmd
-rw-r--r-- 1 runner docker 25K Nov 20 15:39 study_after_workshop.html
-rw-r--r-- 1 runner docker 184 Nov 20 15:35 study_after_workshop.qmd
-rw-r--r-- 1 runner docker 70K Nov 20 15:39 study_before_workshop.html
-rw-r--r-- 1 runner docker 4.7K Nov 20 15:35 study_before_workshop.ipynb
-rw-r--r-- 1 runner docker 13K Nov 20 15:35 study_before_workshop.qmd
-rw-r--r-- 1 runner docker 44K Nov 20 15:35 workshop.html
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:35 workshop.qmd
-rw-r--r-- 1 runner docker 8.4K Nov 20 15:39 workshop.rmarkdown
drwxr-xr-x 3 runner docker 4.0K Nov 20 15:35 workshop_files</code></pre>
</div>
</div>
<p>You can move about with the <code>cd</code> command, which stands for “change directory”. You can use it to move into a directory by specifying the path to the directory:</p>
Expand Down
36 changes: 17 additions & 19 deletions images/images.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,22 +215,21 @@ <h1 class="title">Image Data Analysis for Group Project</h1>

</header><section id="extra-help-to-work-reproducibly" class="level1"><h1>Extra help to work reproducibly</h1>
<section id="worm-tracking" class="level2"><h2 class="anchored" data-anchor-id="worm-tracking">Worm Tracking</h2>
<p>The following ImageJ workflow uses the processing steps you used in workshop 3 with one change. That change is to save the results to file rather than having the results window pop up and saving from there. Or maybe two changes: it also tells you to use meaning systematic file names that will be easy to process when importing data. The RStudio workflow shows you how to import multiple files into one dataframe with columns indicating the treatment.</p>
<section id="imagej" class="level3"><h3 class="anchored" data-anchor-id="imagej">ImageJ</h3>
<p>Save files with systematic names: ev_control.avi 343_control.avi ev_1.avi 343_1.avi ev_2.5.avi 343_2.5.avi</p>
<p>Open ImageJ</p>
<p>Open video file eg <code>ev_2.5.avi</code></p>
<ul>
<li><p>Convert to 8-bit: Image | Type | 8-bit</p></li>
<li><p>Crop to petri dish: Select then Image | Crop</p></li>
<li>
<p>Calculate average pixel intensity: Image | Stacks | Z Project</p>
<li>Convert to 8-bit: Image | Type | 8-bit</li>
<li>Crop to petri dish: Select then Image | Crop</li>
<li>Calculate average pixel intensity: Image | Stacks | Z Project
<ul>
<li>Projection type: Average Intensity to create <code>AVG_ev_2.5.avi</code>
</li>
</ul>
</li>
<li>
<p>Subtract average from image: Process | Image Calculator</p>
<li>Subtract average from image: Process | Image Calculator
<ul>
<li>Image 1: <code>ev_2.5.avi</code>
</li>
Expand All @@ -241,9 +240,8 @@ <h1 class="title">Image Data Analysis for Group Project</h1>
<li>OK, Yes to Process all</li>
</ul>
</li>
<li><p>Invert: Edit | Invert</p></li>
<li>
<p>Adjust threshold: Image | Adjust | Threshold</p>
<li>Invert: Edit | Invert</li>
<li>Adjust threshold: Image | Adjust | Threshold
<ul>
<li>Method: Default</li>
<li>Thresholding: Default, B&amp;W</li>
Expand All @@ -252,9 +250,8 @@ <h1 class="title">Image Data Analysis for Group Project</h1>
<li>Apply</li>
</ul>
</li>
<li><p>Invert: Edit | Invert</p></li>
<li>
<p>Track: Plugins | wrMTrck</p>
<li>Invert: Edit | Invert</li>
<li>Track: Plugins | wrMTrck
<ul>
<li><p>Set minSize: 10</p></li>
<li><p>Set maxSize: 400</p></li>
Expand All @@ -271,15 +268,16 @@ <h1 class="title">Image Data Analysis for Group Project</h1>
<li><p>Click OK. Save to a folder for all the tracking data files. I recommend deleting the “Results of..” part of the name</p></li>
</ul>
</li>
<li><p>Check that the Summary window indicates 3 tracks and that the 3 larvae are what is tracked by using the slider on the Result image</p></li>
<li><p>Repeat for all videos</p></li>
<li>Check that the Summary window indicates 3 tracks and that the 3 larvae are what is tracked by using the slider on the Result image</li>
<li>Repeat for all videos</li>
</ul></section><section id="rstudio" class="level3"><h3 class="anchored" data-anchor-id="rstudio">RStudio</h3>
<p>This is the code you need to import multiple csv files into a single dataframe and add a column with the treatment information from the filename.</p>
<p>This is the code you need to import multiple csv files into a single dataframe and add a column with the treatment information from the file name. This is why systematic file names are good.</p>
<p>It assumes</p>
<ul>
<li><p>your files are called <em>type</em>_<em>concentration</em>.txt for example: ev_control.txt 343_control.txt ev_1.txt 343_1.txt ev_2.5.txt 343_2.5.txt.</p></li>
<li><p>the .txt datafile are in a folder called <code>track</code> inside your working directory</p></li>
<li><p>you have installed the following packages: <strong><code>tidyverse</code></strong>, <strong><code>janitor</code></strong></p></li>
<li>your files are called <em>type</em>_<em>concentration</em>.txt for example: ev_control.txt 343_control.txt ev_1.txt 343_1.txt ev_2.5.txt 343_2.5.txt.</li>
<li>the .txt datafile are in a folder called <code>track</code> inside your working directory</li>
<li>you have installed the following packages: <strong><code>tidyverse</code></strong>, <strong><code>janitor</code></strong>
</li>
</ul>
<p>🎬 Load the <strong><code>tidyverse</code></strong></p>
<div class="cell">
Expand Down Expand Up @@ -318,7 +316,7 @@ <h1 class="title">Image Data Analysis for Group Project</h1>
<pre><code>Error in extract(mutate(mutate(tracking, file = str_remove(file, ".txt")), : could not find function "extract"</code></pre>
</div>
</div>
<p><code>[^_]{2,3}</code> matches two or three characters that are not <code>_</code> at the strat of the string (<code>^</code>)</p>
<p><code>[^_]{2,3}</code> matches two or three characters that are not <code>_</code> at the start of the string (<code>^</code>)</p>
<p><code>.+</code> matches one or more characters. The <code><a href="https://tidyr.tidyverse.org/reference/extract.html">extract()</a></code> function puts the first match into the first column, <code>type</code>, and the second match into the second column, <code>conc</code>. The <code>remove = FALSE</code> argument means the original column is kept.</p>
<p>You now have a dataframe with all the tracking data which is relatively easy to summarise and plot using tools you know.</p>
<p>There is an example RStudio project containing this code here: <a href="https://github.com/3mmaRand/tips">tips</a>. You can download and open directly in RStudio using the following code. Since this is an RStudio Project, do not run the code from inside a project:</p>
Expand Down
Binary file modified omics/week-5/figures/prog-hspc-volcano.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions omics/week-5/workshop.html

Large diffs are not rendered by default.

Binary file modified omics/week-5/workshop_files/figure-html/unnamed-chunk-33-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified omics/week-5/workshop_files/figure-html/unnamed-chunk-65-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 01edd69

Please sign in to comment.