<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://marvinquiet.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://marvinquiet.github.io/" rel="alternate" type="text/html" /><updated>2026-08-17T00:37:14-07:00</updated><id>https://marvinquiet.github.io/feed.xml</id><title type="html">WENJING MA</title><subtitle>Assistant Professor @ SAI, CUHK-Shenzhen</subtitle><author><name>Wenjing Ma</name><email>wma2026@cuhk.edu.cn</email></author><entry><title type="html">Introduction To Bartweb</title><link href="https://marvinquiet.github.io/introduction-to-BARTweb/" rel="alternate" type="text/html" title="Introduction To Bartweb" /><published>2019-01-18T00:00:00-08:00</published><updated>2019-01-18T00:00:00-08:00</updated><id>https://marvinquiet.github.io/introduction-to-BARTweb</id><content type="html" xml:base="https://marvinquiet.github.io/introduction-to-BARTweb/"><![CDATA[<p>This is a post on introducing the motivations and workflow of <a href="http://bartweb.org/">BARTweb</a> which is my previous work at <a href="https://zanglab.github.io/index.htm">Zanglab</a>. The BARTweb is now published in <a href="https://academic.oup.com/nargab/article/3/2/lqab022/6219159">NAR Genomics and Bioinformatics</a> and the BART family (e.g. BART software, BART3D, etc) has gained tremendous attentions with a news post on <a href="https://news.virginia.edu/content/uva-develops-new-tools-battle-cancer-advance-genomics-research">UVAToday</a>.</p>

<p>Here, I would like to introduce a bit on what BARTweb can do and how it is contributing to genomics research. Feel free to refer to the <a href="https://www.dropbox.com/s/7o7duis8ftzz9yi/BARTweb_Wenjing_2018.01.18.pptx?dl=0">Slides</a> to get a better view of this web tool.</p>

<h3 id="why-bart">Why BART?</h3>

<ul>
  <li>
    <p>BART can be used to analyze Differentially Expressed Genes (DEG)</p>

    <p>Traditional ways of doing downstream analysis on a bunch of differentially expressed genes are Gene Ontology analysis such as <a href="https://david.ncifcrf.gov/">DAVID</a>, or Pathway analysis such as <a href="https://www.genome.jp/kegg/">KEGG</a>. Both methods <strong>lack information in which TFs regulate the genes</strong>.</p>
  </li>
  <li>
    <p>Conventional TF prediction methods are sequence-based</p>

    <p>The most popular method of TF prediction is to scan motifs, which only values the promoter regions near the Transcription Start Site (TSS). In other word, it left out distal enhancers. Meanwhile, a sequence-based method engenders a problem that multiple factors may share similar motifs, increasing the chance of finding a wrong TF. Furthermore, a motif does not necessarily mean a binding.</p>
  </li>
</ul>

<p>That is what our BART and BARTweb can do - to predict functional regulatory TFs when given only a gene list, a ChIP-seq genomic binding profile or a genome region set. For more details about BART, please refer to the paper <a href="https://academic.oup.com/bioinformatics/article/34/16/2867/4956015">here</a>.</p>

<h3 id="why-bartweb">Why BARTweb?</h3>

<p>In BART, we leverage a large amount of H3K27ac and TF ChIP-seq public data to compute the cis-regulatory profiles, which occupy tremendous disk space and bring intensive computation load.</p>

<p>To release the burden of biomedical researchers from coding and downloading the datasets, we developed this web interface, named <a href="http://bartweb.org">BARTweb</a>, to run users’ jobs on our <a href="https://www.rc.virginia.edu/tags/cphg/">UVA Research computing</a> cluster. In BARTweb, we have updated more available H3K27ac and TF ChIP-seq datasets (numbers are listed in the table) compared to when BART was released. In the meantime, we have optimized the algorithm to shorten the job execution time. Our new version can help reduce job running time from 1.5 hours to around 5-10 mins.</p>

<p><strong>Table 1:</strong> the data size comparison between BART and BARTweb.</p>

<table>
  <thead>
    <tr>
      <th style="text-align: center"> </th>
      <th style="text-align: center">H3K27ac samples</th>
      <th style="text-align: center">TF ChIP-seq dataset</th>
      <th style="text-align: center">TF counts</th>
      <th style="text-align: center">UDHS(UAC)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center">BARTweb V1.1</td>
      <td style="text-align: center">366/267</td>
      <td style="text-align: center">7032/5023</td>
      <td style="text-align: center">883/531</td>
      <td style="text-align: center">2732010/1529448</td>
    </tr>
    <tr>
      <td style="text-align: center">BARTweb V1.2</td>
      <td style="text-align: center">1230/737</td>
      <td style="text-align: center">7987/5887</td>
      <td style="text-align: center">1300/700</td>
      <td style="text-align: center">4157285/2687740</td>
    </tr>
  </tbody>
</table>

<p>We are aiming to collect more up-to-date datasets and updating the information annually.</p>

<h3 id="bartweb-workflow-and-examples">BARTweb workflow and examples</h3>

<p><img src="/files/BARTweb_workflow.jpeg" alt="BARTweb" /></p>

<p>A simple workflow chart is attached here to intuitively illustrate how BARTweb works.</p>

<p><img src="/files/BARTweb_result.jpeg" alt="BARTweb_result" /></p>

<p>A sample output of a gene set downregulated upon OCT4 (POU5F1) knocked down in a human embryonic stem cell. More intepretations can be found at the <a href="http://bartweb.org/help">help page of BARTweb</a>.</p>

<p>Please feel free to try it out and I am looking forward to any comments!</p>]]></content><author><name>Wenjing Ma</name><email>wma2026@cuhk.edu.cn</email></author><summary type="html"><![CDATA[This is a post on introducing the motivations and workflow of BARTweb which is my previous work at Zanglab. The BARTweb is now published in NAR Genomics and Bioinformatics and the BART family (e.g. BART software, BART3D, etc) has gained tremendous attentions with a news post on UVAToday.]]></summary></entry><entry><title type="html">Quick Web Development</title><link href="https://marvinquiet.github.io/quick-web-development/" rel="alternate" type="text/html" title="Quick Web Development" /><published>2018-08-12T00:00:00-07:00</published><updated>2018-08-12T00:00:00-07:00</updated><id>https://marvinquiet.github.io/quick-web-development</id><content type="html" xml:base="https://marvinquiet.github.io/quick-web-development/"><![CDATA[<p>I am fresh new to Web Development, which means, I haven’t developed any application related to web before. However, due to research reason, we could not always let researchers download our Python or R package, and run data themselves. For one, our simulation consumes a lot of CPU cores which not every researcher owns; for another, there are plenty installation issues due to different OS. Fortunately, I have experience in programming, especially in Python and Java. Then, why not having a try?</p>

<h3 id="step-1-choose-a-framework">Step 1: Choose a Framework</h3>

<p>Web development mostly could be divided into front-end, back-end and full-stack. Thanks to those <strong>GREAT</strong> Open Source contributors, there are lots of frameworks to choose from, such as <a href="https://www.djangoproject.com/">Django</a>, <a href="http://flask.pocoo.org/">Flask</a>, <a href="https://rubyonrails.org/">RoR</a>. Each has its advantages and disadvantages. Since my project would be quite tiny, I chose Flask as my Web Framework.</p>

<p>From my perspective, Flask would be more tiny and lightweight. For a beginner, if you don’t want to waste too much time on learning how a framework works, then I think Flask would be a good choice.</p>

<h3 id="step2-learn-basic-knowledge">Step2: Learn Basic Knowledge</h3>

<p>Take Flask as an example, the only thing you need to know is:</p>

<ul>
  <li>
    <p>How to run an app</p>

    <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># hello.py
</span><span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">Flask</span>
<span class="n">app</span> <span class="o">=</span> <span class="n">Flask</span><span class="p">(</span><span class="n">__name__</span><span class="p">)</span>
  
<span class="o">@</span><span class="n">app</span><span class="p">.</span><span class="n">route</span><span class="p">(</span><span class="s">"/"</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">hello</span><span class="p">():</span>
    <span class="k">return</span> <span class="s">"Hello World!"</span>
</code></pre></div>    </div>

    <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ FLASK_APP</span><span class="o">=</span>hello.py flask run
<span class="c"># "Hello World!" gonna show on localhost:5000</span>
</code></pre></div>    </div>
  </li>
  <li>
    <p>How flask routes</p>

    <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">@</span><span class="n">app</span><span class="p">.</span><span class="n">route</span><span class="p">(</span><span class="s">'/'</span><span class="p">)</span> <span class="c1"># localhost:5000/
</span><span class="k">def</span> <span class="nf">index</span><span class="p">():</span>
    <span class="k">return</span> <span class="s">'Index Page'</span>  
  
<span class="o">@</span><span class="n">app</span><span class="p">.</span><span class="n">route</span><span class="p">(</span><span class="s">'/hello'</span><span class="p">)</span> <span class="c1"># localhost:5000/hello
</span><span class="k">def</span> <span class="nf">hello</span><span class="p">():</span>
    <span class="k">return</span> <span class="s">'Hello, World'</span>
</code></pre></div>    </div>
  </li>
  <li>
    <p>How flask uses variables through URL</p>

    <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="o">@</span><span class="n">app</span><span class="p">.</span><span class="n">route</span><span class="p">(</span><span class="s">'/user/&lt;username&gt;'</span><span class="p">)</span> <span class="c1"># localhost:5000/user/&lt;username&gt;
</span><span class="k">def</span> <span class="nf">show_user_profile</span><span class="p">(</span><span class="n">username</span><span class="p">):</span>
    <span class="c1"># show the user profile for that user
</span>    <span class="k">return</span> <span class="s">'User %s'</span> <span class="o">%</span> <span class="n">username</span>
</code></pre></div>    </div>

    <p><strong>Note</strong>: URL is used for the website, not equivalent to a file path. If you need URL variables to generate a file path, do it inside the function by using the parameters passed by the URL.</p>

    <p>Here is a small example on passing URL to download file. I am not sure if there is a better way, but it works.</p>

    <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">send_from_directory</span>
  
<span class="c1"># URL: /download/123___a.txt
</span><span class="o">@</span><span class="n">app</span><span class="p">.</span><span class="n">route</span><span class="p">(</span><span class="s">'/download/&lt;userkey_filename&gt;'</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">download_file</span><span class="p">(</span><span class="n">userkey_filename</span><span class="p">):</span>
    <span class="n">user_key</span><span class="p">,</span> <span class="n">filename</span> <span class="o">=</span> <span class="n">userkey_filename</span><span class="p">.</span><span class="n">split</span><span class="p">(</span><span class="s">'___'</span><span class="p">)</span>  <span class="c1"># user_key: 123, filename: a.txt
</span>    <span class="n">download_path</span> <span class="o">=</span> <span class="n">os</span><span class="p">.</span><span class="n">path</span><span class="p">.</span><span class="n">join</span><span class="p">(</span><span class="n">user_key</span><span class="p">,</span> <span class="s">'download'</span><span class="p">)</span>
    <span class="k">return</span> <span class="n">send_from_directory</span><span class="p">(</span><span class="n">download_path</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
</code></pre></div>    </div>

    <p>In this case, it does not matter what name is your function, since I do not call it from other part. What I do is to bind the URL with the file path. Then when I pass the result containing both of them to the html, when the URL is clicked, it will directly goes to my file path, and download the file.</p>

    <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">render_template</span>
  
<span class="o">@</span><span class="n">app</span><span class="p">.</span><span class="n">route</span><span class="p">(</span><span class="s">'/result'</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s">'GET'</span><span class="p">,</span> <span class="s">'POST'</span><span class="p">])</span>
<span class="k">def</span> <span class="nf">show_result</span><span class="p">():</span>
    <span class="n">results</span> <span class="o">=</span> <span class="p">{</span><span class="s">'url_file'</span><span class="p">:</span> <span class="p">[</span><span class="s">'/download/123___a.txt'</span><span class="p">,</span> <span class="s">'a.txt'</span><span class="p">]}</span>
    <span class="k">return</span> <span class="n">render_template</span><span class="p">(</span><span class="s">'result.html'</span><span class="p">,</span> <span class="n">results</span><span class="o">=</span><span class="n">results</span><span class="p">)</span> <span class="c1"># passing values to html
</span></code></pre></div>    </div>

    <div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  
</code></pre></div>    </div>

    <p>Therefore, in thise case, <code class="language-plaintext highlighter-rouge">href = </code> related to the url, and `` will show file name.</p>

    <p>When the link is clicked, it will trigger the <code class="language-plaintext highlighter-rouge">@app.route('/download/&lt;userkey_filename&gt;')</code> to find the file directory, and sent the file from that directory.</p>
  </li>
  <li>
    <p>How the project package looks like</p>

    <p>A project should looks alike <a href="http://flask.pocoo.org/docs/1.0/tutorial/layout/">flask layout</a>, however, since I use file instead of database and I do not focus on those fancy demonstrations, I compress it into this:</p>

    <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/home/user/Projects/flask-tutorial			
├── __init__.py
├── frontend.py         <span class="c"># only do things related to frontend</span>
├── do_<span class="k">*</span>.py             <span class="c"># do things related to backend logic</span>
├── templates/          <span class="c"># html</span>
│   ├── base.html
│   └── error.html
├──static/              <span class="c"># static files</span>
│   └── style.css
├── db.json             <span class="c"># file storage</span>
├── venv/
├── setup.py
└── MANIFEST.in
</code></pre></div>    </div>
  </li>
</ul>

<h3 id="step3-use-open-source-templates">Step3: Use Open Source Templates</h3>

<p><a href="https://getbootstrap.com/">Bootstrap</a> is a GREAT template for those who don’t want to spend much time on how to adjust demonstration. You even don’t need to download the package, just use <a href="https://www.bootstrapcdn.com/">BoostrapCDN</a> and it will access the network resource to retrieve the style.</p>

<p>Pick one of the <a href="https://getbootstrap.com/docs/4.1/examples/">Boostrap examples</a>, right click View Page Source. Select all, copy, paste it into one of your templates.</p>

<p>Change the local resource</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">&lt;!-- Bootstrap core CSS --&gt;</span>
<span class="nt">&lt;link</span> <span class="na">href=</span><span class="s">"../../dist/css/bootstrap.min.css"</span> <span class="na">rel=</span><span class="s">"stylesheet"</span><span class="nt">&gt;</span>
</code></pre></div></div>

<p>into CDN resource:</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">&lt;!-- Bootstrap core CSS --&gt;</span>
<span class="nt">&lt;link</span> <span class="na">href=</span><span class="s">"https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css"</span> <span class="na">rel=</span><span class="s">"stylesheet"</span><span class="nt">&gt;</span>
</code></pre></div></div>

<h3 id="step4-start-building-your-own">Step4: Start Building Your Own</h3>

<p>This is a passage which not only a tutorial, but also a reminder. Skills could be forgot easily without use. I hope when I finish my current project on <a href="https://github.com/marvinquiet/flask-tf-binding">Find the Transcriptional Binding</a> expectedly before October due to server reasons, I will publish a full link here. Let’s just get it!</p>

<p><strong>Special thanks to <a href="https://lujiaying.github.io/">Jiaying Lu</a></strong> who taught me these quick web development skills and gave me technical instructions with no reservation.</p>]]></content><author><name>Wenjing Ma</name><email>wma2026@cuhk.edu.cn</email></author><summary type="html"><![CDATA[I am fresh new to Web Development, which means, I haven’t developed any application related to web before. However, due to research reason, we could not always let researchers download our Python or R package, and run data themselves. For one, our simulation consumes a lot of CPU cores which not every researcher owns; for another, there are plenty installation issues due to different OS. Fortunately, I have experience in programming, especially in Python and Java. Then, why not having a try?]]></summary></entry></feed>