Skip to content

Commit 69e3a21

Browse files
committed
update
1 parent 8da9511 commit 69e3a21

8 files changed

+148
-2137
lines changed

getting_started_web.html

+6-12
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ <h3 class="anchored" data-anchor-id="windows">Windows</h3>
221221
</section>
222222
<section id="macos" class="level3">
223223
<h3 class="anchored" data-anchor-id="macos">MacOS</h3>
224-
<iframe src="https://share.descript.com/embed/xflvSqCDFQL" width="640" height="360" frameborder="0" allowfullscreen="">
225-
</iframe>
224+
<div class="quarto-video ratio ratio-16x9"><iframe data-external="1" src="https://www.youtube.com/embed/6f5fB6fVdBs" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
226225
<p><a href="https://karchinlab.org/opencravat/installers/OpenCRAVAT.2.2.9.pkg">Mac OS installer</a></p>
227226
<p>Right-click the downloaded file and select “Open”. Your Mac may ask you to confirm stating that the file was not downloaded from the App Store. Click “Open” button. Just double-clicking the installer may not enable this “Open” option.</p>
228227
</section>
@@ -232,8 +231,7 @@ <h3 class="anchored" data-anchor-id="linux">Linux</h3>
232231
</section>
233232
<section id="start-opencravat-gui" class="level3">
234233
<h3 class="anchored" data-anchor-id="start-opencravat-gui">Start OpenCRAVAT GUI</h3>
235-
<iframe src="https://share.descript.com/embed/NRF4BVXMbcD" width="640" height="360" frameborder="0" allowfullscreen="">
236-
</iframe>
234+
<div class="quarto-video ratio ratio-16x9"><iframe data-external="1" src="https://www.youtube.com/embed/cNDrAPhPffg" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
237235
<p>Now that OpenCRAVAT is installed, we can run the GUI. In a command prompt (PowerShell or Terminal), you can start the OpenCRAVAT GUI by typing:</p>
238236
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">oc</span> gui</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
239237
<p>In MacOS, you can also launch OpenCRAVAT via clicking on the application in your Applications folder. In Windows, you can click the desktop Icon to launch it.</p>
@@ -259,8 +257,7 @@ <h3 class="anchored" data-anchor-id="start-opencravat-gui">Start OpenCRAVAT GUI<
259257
</section>
260258
<section id="browse-annotators-web" class="level2">
261259
<h2 class="anchored" data-anchor-id="browse-annotators-web">Browse Annotators (Web)</h2>
262-
<iframe src="https://share.descript.com/embed/Tk01UzdKZIG" width="640" height="360" frameborder="0" allowfullscreen="">
263-
</iframe>
260+
<div class="quarto-video ratio ratio-16x9"><iframe data-external="1" src="https://www.youtube.com/embed/B2jiQcIkX8c" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
264261
<p>If we click on the <strong>STORE</strong> tab in the top left of the interface, we’ll see the variety of annotators that are available to us.</p>
265262
<p><img src="images/oc-browse-annotators-1.png" class="img-fluid"></p>
266263
<p>Let’s browse the clinically relevant annotators by clicking on the <code>Clinically Relevant</code> checkbox:</p>
@@ -324,8 +321,7 @@ <h2 class="anchored" data-anchor-id="convert-to-input-file-format">Convert to In
324321
</section>
325322
<section id="submit-annotation-job" class="level2">
326323
<h2 class="anchored" data-anchor-id="submit-annotation-job">Submit Annotation Job</h2>
327-
<iframe src="https://share.descript.com/embed/raakHVZK4EK" width="640" height="360" frameborder="0" allowfullscreen="">
328-
</iframe>
324+
<div class="quarto-video ratio ratio-16x9"><iframe data-external="1" src="https://www.youtube.com/embed/xSOxEbsW--c" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
329325
<p>Before we move on, let’s take a look at the overall workflow for annotating in the GUI. We’ll start out by 1) submitting our input file, 2) selecting the annotators, and then 3) submitting our job.</p>
330326
<p><img src="images/oc-gui-workflow.png" class="img-fluid"></p>
331327
<ol type="1">
@@ -351,8 +347,7 @@ <h2 class="anchored" data-anchor-id="submit-annotation-job">Submit Annotation Jo
351347
</section>
352348
<section id="filter-results" class="level2">
353349
<h2 class="anchored" data-anchor-id="filter-results">Filter Results</h2>
354-
<iframe src="https://share.descript.com/embed/rHJGmx6i9e5" width="640" height="360" frameborder="0" allowfullscreen="">
355-
</iframe>
350+
<div class="quarto-video ratio ratio-16x9"><iframe data-external="1" src="https://www.youtube.com/embed/TYs3dGDFzQQ" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
356351
<blockquote class="blockquote">
357352
<p>We are interested in those variants that have ClinVar annotation. How do we find those?</p>
358353
</blockquote>
@@ -386,8 +381,7 @@ <h2 class="anchored" data-anchor-id="filter-results">Filter Results</h2>
386381
</section>
387382
<section id="visualize-filtered-results" class="level2">
388383
<h2 class="anchored" data-anchor-id="visualize-filtered-results">Visualize Filtered Results</h2>
389-
<iframe src="https://share.descript.com/embed/13Ww6z6RV6j" width="640" height="360" frameborder="0" allowfullscreen="">
390-
</iframe>
384+
<div class="quarto-video ratio ratio-16x9"><iframe data-external="1" src="https://www.youtube.com/embed/MPW2MXBJG7w" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>
391385
<p>Now that we’ve filtered, let’s go back to the Summary Tab:</p>
392386
<p><img src="images/oc-visualize-tab.png" class="img-fluid"> In the Summary tab, we can see information about the annotated variants, such as from the sequence ontology. We can get the counts within a sequence ontology category by mousing over that category in our plot:</p>
393387
<p><img src="images/oc-visualize-seq-ontology.png" class="img-fluid"> These visualizations can be moved around and pinned. Using the camera icon, you can also save these visualizations.</p>

getting_started_web.qmd

+6-6
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Windows Defender may indicate that it prevented an unknown application from runn
8484

8585
### MacOS
8686

87-
<iframe src="https://share.descript.com/embed/xflvSqCDFQL" width="640" height="360" frameborder="0" allowfullscreen></iframe>
87+
{{< video https://youtu.be/6f5fB6fVdBs >}}
8888

8989
[Mac OS installer](https://karchinlab.org/opencravat/installers/OpenCRAVAT.2.2.9.pkg)
9090

@@ -96,7 +96,7 @@ Linux Users should refer to the Command Line Quickstart to install via `pip`/`pi
9696

9797
### Start OpenCRAVAT GUI
9898

99-
<iframe src="https://share.descript.com/embed/NRF4BVXMbcD" width="640" height="360" frameborder="0" allowfullscreen></iframe>
99+
{{< video https://youtu.be/cNDrAPhPffg >}}
100100

101101
Now that OpenCRAVAT is installed, we can run the GUI. In a command prompt (PowerShell or Terminal), you can start the OpenCRAVAT GUI by typing:
102102

@@ -132,7 +132,7 @@ Now you can [browse and install the available annotators](#browse-annotators)
132132

133133
## Browse Annotators (Web)
134134

135-
<iframe src="https://share.descript.com/embed/Tk01UzdKZIG" width="640" height="360" frameborder="0" allowfullscreen></iframe>
135+
{{< video https://youtu.be/B2jiQcIkX8c >}}
136136

137137
If we click on the **STORE** tab in the top left of the interface, we'll see the variety of annotators that are available to us.
138138

@@ -204,7 +204,7 @@ Now we have our input file, we can move on to [submitting our job](#submit-annot
204204

205205
## Submit Annotation Job
206206

207-
<iframe src="https://share.descript.com/embed/raakHVZK4EK" width="640" height="360" frameborder="0" allowfullscreen></iframe>
207+
{{< video https://youtu.be/xSOxEbsW--c >}}
208208

209209
Before we move on, let's take a look at the overall workflow for annotating in the GUI. We'll start out by 1) submitting our input file, 2) selecting the annotators, and then 3) submitting our job.
210210

@@ -240,7 +240,7 @@ When our job is finished, we can [view our results and filter them](#filter-resu
240240

241241
## Filter Results
242242

243-
<iframe src="https://share.descript.com/embed/rHJGmx6i9e5" width="640" height="360" frameborder="0" allowfullscreen></iframe>
243+
{{< video https://youtu.be/TYs3dGDFzQQ >}}
244244

245245
> We are interested in those variants that have ClinVar annotation. How do we find those?
246246
@@ -283,7 +283,7 @@ Just note that the filter is not actually applied to the data until you hit the
283283

284284
## Visualize Filtered Results
285285

286-
<iframe src="https://share.descript.com/embed/13Ww6z6RV6j" width="640" height="360" frameborder="0" allowfullscreen></iframe>
286+
{{< video https://youtu.be/MPW2MXBJG7w >}}
287287

288288
Now that we've filtered, let's go back to the Summary Tab:
289289

making_annotator_modules.html

+56-22
Original file line numberDiff line numberDiff line change
@@ -175,28 +175,62 @@ <h2 class="anchored" data-anchor-id="fill-out-sift_annotator.py">Fill out <code>
175175
<pre class="{bash}"><code>cat /Users/Shared/open-cravat/modules/annotators/sift/sift.py</code></pre>
176176
<section id="annotate-function" class="level3">
177177
<h3 class="anchored" data-anchor-id="annotate-function"><code>annotate()</code> function</h3>
178-
<div class="sourceCode" id="cb10"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> annotate(<span class="va">self</span>, input_data, secondary_data<span class="op">=</span><span class="va">None</span>):</span>
179-
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> chrom <span class="op">=</span> input_data[<span class="st">'chrom'</span>]</span>
180-
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> pos <span class="op">=</span> input_data[<span class="st">'pos'</span>]</span>
181-
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> ref_base <span class="op">=</span> input_data[<span class="st">'ref_base'</span>]</span>
182-
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a> alt_base <span class="op">=</span> input_data[<span class="st">'alt_base'</span>]</span>
183-
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a> query <span class="op">=</span> <span class="ss">f'select score, nseq from sift where chrom="</span><span class="sc">{</span>chrom<span class="sc">}</span><span class="ss">" and pos=</span><span class="sc">{</span>pos<span class="sc">}</span><span class="ss"> and ref="</span><span class="sc">{</span>ref_base<span class="sc">}</span><span class="ss">" and alt="</span><span class="sc">{</span>alt_base<span class="sc">}</span><span class="ss">";'</span></span>
184-
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.cursor.execute(query)</span>
185-
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a> result <span class="op">=</span> <span class="va">self</span>.cursor.fetchone()</span>
186-
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> result <span class="kw">is</span> <span class="kw">not</span> <span class="va">None</span>:</span>
187-
<span id="cb10-10"><a href="#cb10-10" aria-hidden="true" tabindex="-1"></a> score <span class="op">=</span> result[<span class="dv">0</span>]</span>
188-
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a> num_seq <span class="op">=</span> result[<span class="dv">1</span>]</span>
189-
<span id="cb10-12"><a href="#cb10-12" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> score <span class="op">&lt;=</span> <span class="fl">0.05</span>:</span>
190-
<span id="cb10-13"><a href="#cb10-13" aria-hidden="true" tabindex="-1"></a> prediction <span class="op">=</span> <span class="st">'Damaging'</span></span>
191-
<span id="cb10-14"><a href="#cb10-14" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
192-
<span id="cb10-15"><a href="#cb10-15" aria-hidden="true" tabindex="-1"></a> prediction <span class="op">=</span> <span class="st">'Tolerated'</span></span>
193-
<span id="cb10-16"><a href="#cb10-16" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> {</span>
194-
<span id="cb10-17"><a href="#cb10-17" aria-hidden="true" tabindex="-1"></a> <span class="st">'score'</span>: score,</span>
195-
<span id="cb10-18"><a href="#cb10-18" aria-hidden="true" tabindex="-1"></a> <span class="st">'seq_count'</span>: num_seq,</span>
196-
<span id="cb10-19"><a href="#cb10-19" aria-hidden="true" tabindex="-1"></a> <span class="st">'prediction'</span>: prediction,</span>
197-
<span id="cb10-20"><a href="#cb10-20" aria-hidden="true" tabindex="-1"></a> }</span>
198-
<span id="cb10-21"><a href="#cb10-21" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
199-
<span id="cb10-22"><a href="#cb10-22" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="va">None</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
178+
<div class="columns">
179+
<div class="column">
180+
<div class="cell" data-layout-align="default">
181+
<div class="cell-output-display">
182+
<div>
183+
<p></p><figure class="figure"><p></p>
184+
<div>
185+
<pre class="mermaid mermaid-js">erDiagram
186+
input_data{
187+
string chrom
188+
int pos
189+
string ref_base
190+
string alt_base
191+
}
192+
Annotation{
193+
string chrom
194+
int pos
195+
string ref
196+
string alt
197+
float score
198+
}
199+
</pre>
200+
</div>
201+
<p></p></figure><p></p>
202+
</div>
203+
</div>
204+
</div>
205+
</div><div class="column">
206+
<div class="sourceCode" id="cb10"><pre class="sourceCode sql code-with-copy"><code class="sourceCode sql"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>pos <span class="op">=</span> input_data[<span class="ot">"pos"</span>]</span>
207+
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="kw">query</span> <span class="op">=</span> f<span class="st">'select score, nseq from sift where chrom="{chrom}"'</span></span>
208+
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a>self.<span class="kw">cursor</span>.<span class="kw">execute</span>(<span class="kw">query</span>)</span>
209+
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a>result <span class="op">=</span> self.<span class="kw">cursor</span>.fetchone()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
210+
</div>
211+
</div>
212+
<div class="sourceCode" id="cb11"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> annotate(<span class="va">self</span>, input_data, secondary_data<span class="op">=</span><span class="va">None</span>):</span>
213+
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> chrom <span class="op">=</span> input_data[<span class="st">'chrom'</span>]</span>
214+
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> pos <span class="op">=</span> input_data[<span class="st">'pos'</span>]</span>
215+
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> ref_base <span class="op">=</span> input_data[<span class="st">'ref_base'</span>]</span>
216+
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> alt_base <span class="op">=</span> input_data[<span class="st">'alt_base'</span>]</span>
217+
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> query <span class="op">=</span> <span class="ss">f'select score, nseq from sift where chrom="</span><span class="sc">{</span>chrom<span class="sc">}</span><span class="ss">" and pos=</span><span class="sc">{</span>pos<span class="sc">}</span><span class="ss"> and ref="</span><span class="sc">{</span>ref_base<span class="sc">}</span><span class="ss">" and alt="</span><span class="sc">{</span>alt_base<span class="sc">}</span><span class="ss">";'</span></span>
218+
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a> <span class="va">self</span>.cursor.execute(query)</span>
219+
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a> result <span class="op">=</span> <span class="va">self</span>.cursor.fetchone()</span>
220+
<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> result <span class="kw">is</span> <span class="kw">not</span> <span class="va">None</span>:</span>
221+
<span id="cb11-10"><a href="#cb11-10" aria-hidden="true" tabindex="-1"></a> score <span class="op">=</span> result[<span class="dv">0</span>]</span>
222+
<span id="cb11-11"><a href="#cb11-11" aria-hidden="true" tabindex="-1"></a> num_seq <span class="op">=</span> result[<span class="dv">1</span>]</span>
223+
<span id="cb11-12"><a href="#cb11-12" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> score <span class="op">&lt;=</span> <span class="fl">0.05</span>:</span>
224+
<span id="cb11-13"><a href="#cb11-13" aria-hidden="true" tabindex="-1"></a> prediction <span class="op">=</span> <span class="st">'Damaging'</span></span>
225+
<span id="cb11-14"><a href="#cb11-14" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
226+
<span id="cb11-15"><a href="#cb11-15" aria-hidden="true" tabindex="-1"></a> prediction <span class="op">=</span> <span class="st">'Tolerated'</span></span>
227+
<span id="cb11-16"><a href="#cb11-16" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> {</span>
228+
<span id="cb11-17"><a href="#cb11-17" aria-hidden="true" tabindex="-1"></a> <span class="st">'score'</span>: score,</span>
229+
<span id="cb11-18"><a href="#cb11-18" aria-hidden="true" tabindex="-1"></a> <span class="st">'seq_count'</span>: num_seq,</span>
230+
<span id="cb11-19"><a href="#cb11-19" aria-hidden="true" tabindex="-1"></a> <span class="st">'prediction'</span>: prediction,</span>
231+
<span id="cb11-20"><a href="#cb11-20" aria-hidden="true" tabindex="-1"></a> }</span>
232+
<span id="cb11-21"><a href="#cb11-21" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
233+
<span id="cb11-22"><a href="#cb11-22" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="va">None</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
200234
</section>
201235
</section>
202236
<section id="configure-sift_annotator.yml" class="level2">

0 commit comments

Comments
 (0)