<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Biomedical science and Mathematics</title>
    <description>The English blog of Lijia Yu.</description>
    <link>https://yulijia.net/en/</link>
    <atom:link href="https://yulijia.net/en/feed/index.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 01 Oct 2026 05:43:53 +0000</pubDate>
    <lastBuildDate>Thu, 01 Oct 2026 05:43:53 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Good habits for academic life</title>
        <description>&lt;p&gt;So, I want to say what I said before again.&lt;/p&gt;

&lt;p&gt;The most important good habits include:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Manage your time: I learned this from a pre-med student and a colleague that you should always prepare what you need to do for tomorrow and make a list of them before sleep. If there is anything that won’t be finished that day, don’t worry,  just move it to the next day.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Keep health: both mentally and physically; don’t be gaslit by superiors or peers. Also, don’t sit in front of a screen for a long time; keep walking a little bit.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Manage your emotions and energy: don’t waste time on something that you couldn’t change; if it really hurts you, make a reflection on how you should do next time when met the same situation. Don’t overthinking.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

</description>
        <pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/learning/2026/09/06/good-habits-for-academic-life.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/learning/2026/09/06/good-habits-for-academic-life.html</guid>
        
        <category>good habits</category>
        
        
        <category>Learning</category>
        
      </item>
    
      <item>
        <title>What you need to think and do before and during a postdoc training?</title>
        <description>&lt;p&gt;To begin, I should say this post is not about how to make a correct decision at the very beginning of your postdoc life (someone can, but I can’t due to subjective and objective reasons).&lt;/p&gt;

&lt;p&gt;This is a journey to learn from mistakes, avoid making them again, and seriously share the experience so others might avoid the same situation.&lt;/p&gt;

&lt;p&gt;I accepted a postdoc position two years ago, but looking back, if I faced the same option, I should ask for more details about the purpose of the training and what I would be expected to do during this training.&lt;/p&gt;

&lt;p&gt;I may have stepped onto a path that was not quite suited to my strengths, and over time it became harder to find my footing. Although J tried to help keep things on course, I still feel very bad recently.  Perhaps it is only the view from where I am standing, but recently I have felt a little like a stranger in a room I once hoped to belong to.&lt;/p&gt;

&lt;p&gt;So lessons:&lt;/p&gt;

&lt;p&gt;Before accepting the offer:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Ask what the training goal is, what and how many publications are expected, and what collaborative work you will need to do. Does all collaborative work have an outcome when you finish the contract?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;During the training:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Don’t complain even if you feel something shouldn’t be like that; it only makes your supervisor feel that you can’t do that.&lt;/li&gt;
  &lt;li&gt;Be professional, don’t interpret, and maintain good manners.&lt;/li&gt;
  &lt;li&gt;Protect your own rights.&lt;/li&gt;
  &lt;li&gt;I am too serious to do everything, but it really doesn’t need to be so responsible. Don’t spend time doing something that won’t have an outcome.&lt;/li&gt;
  &lt;li&gt;Don’t be led by consulting questions, and reply slowly to avoid disrupting your current work.&lt;/li&gt;
&lt;/ol&gt;

</description>
        <pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/learning/2026/09/06/What-you-need-to-think-and-do-before-and-during-a-postdoc-training.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/learning/2026/09/06/What-you-need-to-think-and-do-before-and-during-a-postdoc-training.html</guid>
        
        <category>Postdoc</category>
        
        
        <category>Learning</category>
        
      </item>
    
      <item>
        <title>Email etiquette guide for students</title>
        <description>&lt;p&gt;I read a lot of  &lt;a href=&quot;https://matt.might.net/articles/&quot;&gt;Matt Might’s blog articles&lt;/a&gt;, and I really like them and still recommend that students who are in undergraduate or graduate school read his blog. He gives a lot of systematic suggestions on how to deal with specific tasks for undergraduate/graduate students.&lt;/p&gt;

&lt;p&gt;This year, I am starting to supervise students, and I would like to open a new category to repeat something that we all learned in our past university studies, but new students might not have grasped at their stage.&lt;/p&gt;

&lt;p&gt;Today, I am starting with how to write an email, as I received a lot of supervision inquiries from undergraduate and postgraduate students this year. I guess mainly because I updated my university personal page.&lt;/p&gt;

&lt;p&gt;Every email should have a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;subject line&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;greeting&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;context&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;closing&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;signature&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Subject line&lt;/strong&gt;: can be short, but it needs to be clear so the receiver won’t mix it with advertisement email.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Good example&lt;/th&gt;
      &lt;th&gt;Bad example&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Expression of Interest: xxx project&lt;/td&gt;
      &lt;td&gt;slides&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;2.Greeting&lt;/strong&gt;: It is totally fine if you don’t know how to address a person properly, but at least start with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hi,&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For PhD position inquiry emails, please address the supervisor by name, but don’t just write &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hi Professor,&lt;/code&gt;. We all know you send multiple faculty member emails, but we also don’t want to reply to you if you are too lazy to add our name when you send these emails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Context&lt;/strong&gt;: Please introduce yourself if this is an inquiry email for a project or PhD position opportunity, and please also write it in paragraphs, not just a long one-line sentence. If you don’t provide any of your information, we won’t be able to evaluate whether you are suitable for the project or position, we will just assume you are not suitable.&lt;/p&gt;

&lt;p&gt;With the use of AI, more and more international students will draft their emails using AI tools. It is ok, but please don’t write it too long, as our research shows that &lt;a href=&quot;https://www.biorxiv.org/content/biorxiv/early/2026/09/01/2025.11.09.687479/F1.large.jpg?width=800&amp;amp;height=600&amp;amp;carousel=1&quot;&gt;current reasoning AI models can potentially provide longer conversations than old non-reasoning AI models&lt;/a&gt;. In which, if you ask AI to help you draft an email, it could be longer than a usual email. Think about the words and information in each sentence and write it yourself (include only essential details), and use AI to help correct grammar errors and inaccurate words is the way I recommend.&lt;/p&gt;

&lt;p&gt;For a PhD position inquiry email, please don’t just copy the supervisor’s personal page research topic when you express the interesting, I more want to see why your background aligns with my research.&lt;/p&gt;

&lt;p&gt;It is also better to make one main ask, not five different problems at once. If you need to ask multiple questions, you could number them, so I won’t miss any questions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.Closing and Signature&lt;/strong&gt;: Always thanks for their time and look forward to their reply. I do receive emails without the student’s signature (name). It is fine if their email address shows their name, and it is not fine to me if it doesn’t, I don’t know who I need to reply to.&lt;/p&gt;

</description>
        <pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/howto/forstudents/2026/09/06/Email-etiquette-guide-for-students.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/howto/forstudents/2026/09/06/Email-etiquette-guide-for-students.html</guid>
        
        <category>email etiquette</category>
        
        
        <category>HowTo</category>
        
        <category>ForStudents</category>
        
      </item>
    
      <item>
        <title>Craig Venter</title>
        <description>&lt;p&gt;If I don’t write it down, I never seem to find time to do it.
Craig Venter passed away in April 29, it makes me feel my world become old and faraway with these excited people.&lt;/p&gt;

&lt;p&gt;For me, it marks the end of an era.&lt;/p&gt;

&lt;p&gt;Venter is someone I first learned about from textbooks when I studied genomics. 
My mentor in the US also worked at the J. Craig Venter Institute before, and he told me that he could focus on a project and not talk to anyone for a week (which I doubt).&lt;/p&gt;
</description>
        <pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/uncategorized/2026/05/04/Craig-Venter.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/uncategorized/2026/05/04/Craig-Venter.html</guid>
        
        <category>Human Genome</category>
        
        
        <category>Uncategorized</category>
        
      </item>
    
      <item>
        <title>The most important thing I learned in last two years</title>
        <description>&lt;blockquote&gt;
  &lt;p&gt;What people say to you may not reveal their true character, watch how they treat others.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I finished my PhD in the last two years, but I haven’t updated my blog since 2023. It is not just too busy with research, but also about seeing how people treat others, and for me,  how to manage up (apparently, I am not good at it).&lt;/p&gt;

&lt;p&gt;Academic life is all about how to manage your time, your thoughts, your health, and your emotions.
Thanks to the good environment, peers, and more experienced supervisors, I graduated.&lt;/p&gt;

&lt;p&gt;I will keep writing, my views are my own.&lt;/p&gt;
</description>
        <pubDate>Sun, 29 Mar 2026 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/learning/2026/03/29/the-most-important-thing-i-learned-in-last-two-years.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/learning/2026/03/29/the-most-important-thing-i-learned-in-last-two-years.html</guid>
        
        <category>Lifelong Learning</category>
        
        
        <category>Learning</category>
        
      </item>
    
      <item>
        <title>How to update all R packages after installing a new version of R?</title>
        <description>&lt;p&gt;Many R users are unfamiliar with the process of updating all their R packages after upgrading to a new version of R.&lt;/p&gt;

&lt;p&gt;Would you like to learn how to update all R pacakges in a safe and straightforward way?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The method I described below should work for all platforms, however, I didn’t use R in Windows, so I don’t know the specific directory path, I will describe the steps using a Linux system.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For example, I upgraded R from 4.2.1 to 4.3.1 recently.&lt;/p&gt;

&lt;p&gt;As we can see in the R library folder, there are two sub-folders, one is 4.2 (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home/ylj/R/x86_64-pc-linux-gnu-library/4.2&lt;/code&gt;) and the other is 4.3 (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home/ylj/R/x86_64-pc-linux-gnu-library/4.3&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;First, we need to copy all the packages from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4.2&lt;/code&gt; folder to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4.3&lt;/code&gt; folder. Alternatively, it is also possible to perform the reverse operation, but in that case, the folder needs to be renamed.&lt;/p&gt;

&lt;p&gt;Then, in R terminal/Rstudio run each line below.&lt;/p&gt;

&lt;div class=&quot;language-r highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;## load all installed packages&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkglist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data.frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;installed.packages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lib.loc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/path/to/lib&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# at here, lib.loc=&quot;/home/ylj/R/x86_64-pc-linux-gnu-library/4.3&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;## update all packages&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BiocManager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkglist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Package&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;update&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ask&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;FALSE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;checkBuilt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;## reload new Rsession&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;## check if there are any packages that weren&apos;t updated&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkgupdated&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data.frame&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;installed.packages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lib.loc&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/path/to/lib&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkgfailed&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkgupdated&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkgupdated&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Built&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;4.3.1&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For all packages in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkgfailed&lt;/code&gt;. we have to install them manually.&lt;/p&gt;

</description>
        <pubDate>Wed, 05 Jul 2023 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/howto/2023/07/05/How-to-update-all-R-packages-after-installing-a-new-version-of-R.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/howto/2023/07/05/How-to-update-all-R-packages-after-installing-a-new-version-of-R.html</guid>
        
        <category>update R packages</category>
        
        
        <category>HowTo</category>
        
      </item>
    
      <item>
        <title>Lifelong Learning</title>
        <description>&lt;p&gt;I have initiated a category dedicated to discussing the valuable insights gained from my supervisors, and peers, and sharing personal reflections/thoughts. This category aims to share thoughts during &lt;strong&gt;the ongoing, voluntary, and self-motivated pursuit of knowledge for either personal or professional reasons&lt;/strong&gt; (lifelong learning).&lt;/p&gt;

&lt;p&gt;In this initial post, I will continuously update and share insightful quotes from various individuals.&lt;/p&gt;

&lt;p&gt;J: You are using only two numbers to determine your life.
&lt;em&gt;confusion matrix isn’t enough, let’s use AUC.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;T: If this decision is hard to make, that means this decision does not matter.
If this decision does not matter, then you can decide by tossing a coin.&lt;/p&gt;

&lt;p&gt;T:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;“Must a name mean something?” Alice asks Humpty Dumpty, only to get this answer: “When I use a word… it means just what I choose it to mean – neither more nor less.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This reminds me of a famous statement from the 1960s: &lt;a href=&quot;https://en.wikipedia.org/wiki/The_medium_is_the_message&quot;&gt;The medium is the message&lt;/a&gt;. Here you seem to be letting Google docs or Google form/spreadsheet determine how to organise your thoughts. That doesn’t seem to me to be the right way around.&lt;/p&gt;
</description>
        <pubDate>Sat, 01 Jul 2023 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/learning/2023/07/01/Lifelong-Learning.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/learning/2023/07/01/Lifelong-Learning.html</guid>
        
        <category>Lifelong Learning</category>
        
        
        <category>Learning</category>
        
      </item>
    
      <item>
        <title>Keep good dry lab habits</title>
        <description>&lt;p&gt;I have been worked in multiple dry labs during the last 10 years. Each laboratory has its own style, but few of them training students with good dry lab habits. I learned a lot of good habits from Dr. Malay Basu’s lab. Now, I would like to share these good habits and tips when doing bioinformatics study in a dry lab. All the suggestions based on the Linux environment.&lt;/p&gt;

&lt;h2 id=&quot;habtis&quot;&gt;Habtis&lt;/h2&gt;

&lt;h4 id=&quot;no1&quot;&gt;No.1&lt;/h4&gt;

&lt;p&gt;Maintain a good documentary for all analysis. I learned this since the first week at Malay’s lab. We recommand follow the style of Rmarkdown reprot from &lt;a href=&quot;https://bioinformatics.mdanderson.org/Supplements/ResidualDisease/Reports/&quot;&gt;MD Anderson Cancer Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The report should includes:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Executive Summary (*)
    &lt;ul&gt;
      &lt;li&gt;Introduction&lt;/li&gt;
      &lt;li&gt;Data and Methods&lt;/li&gt;
      &lt;li&gt;Results&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Data Mungling&lt;/li&gt;
  &lt;li&gt;Analysis
    &lt;ul&gt;
      &lt;li&gt;Step 1&lt;/li&gt;
      &lt;li&gt;Step 2&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Appendix (*)
    &lt;ul&gt;
      &lt;li&gt;Working dir&lt;/li&gt;
      &lt;li&gt;Script descriptions&lt;/li&gt;
      &lt;li&gt;List of Figures&lt;/li&gt;
      &lt;li&gt;List of Tables&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to share the report with others, it is better to generate a HTML report, if you want to see the report as a MD file on Github, you need to generate a Github MD report.&lt;/p&gt;

&lt;p&gt;Always use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sessionInfo()&lt;/code&gt; to print the collect information about the current R session in the bottom of the report.&lt;/p&gt;

&lt;h4 id=&quot;no2&quot;&gt;No.2&lt;/h4&gt;

&lt;p&gt;Each research project should also follow a clean structure:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;bin&lt;/li&gt;
  &lt;li&gt;original_data
    &lt;ul&gt;
      &lt;li&gt;README - containing where the data is from&lt;/li&gt;
      &lt;li&gt;Data in compressed form.
        &lt;ol&gt;
          &lt;li&gt;If the raw data is huge. Then only the process data. The the processed step should be captured in the “exp” directory.&lt;/li&gt;
        &lt;/ol&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;“exp” - Actual experiments. Each directory must be named as
    &lt;ol&gt;
      &lt;li&gt;YYYYMMDD-some_identifiable_info-#githubissue-INITIALS&lt;/li&gt;
      &lt;li&gt;each directory should link input files in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;in&lt;/code&gt; folder and generate outputfiles in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;out&lt;/code&gt; folder. The outfiles should have the name date and time appended to it.&lt;/li&gt;
      &lt;li&gt;The entire experiments should be done through and RMD file or single “run.sh” or a “Makefile”. There must be the RMD/MD file in each directory. You must write the executable summary and the list of figures and tables and their descriptions in the report.&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;“design” (?)
    &lt;ul&gt;
      &lt;li&gt;Reserved for PI.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;docs
    &lt;ul&gt;
      &lt;li&gt;Reserved for PI.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;reports
    &lt;ol&gt;
      &lt;li&gt;“index.htm”: A top level index files listing every file and few lines description of the files in the directory.&lt;/li&gt;
      &lt;li&gt;A list of files names matching with the each directory names of “exp”, preferebly in html format generated from RMDs&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can upload the project structure and code to any cloud storage, make a backup every day/week.&lt;/p&gt;

&lt;h4 id=&quot;no3&quot;&gt;No.3&lt;/h4&gt;

&lt;p&gt;Whatever, back up the server data every week, lost data is a huge pain for every researcher.&lt;/p&gt;

&lt;h4 id=&quot;no4&quot;&gt;No.4&lt;/h4&gt;

&lt;p&gt;After a project is finished. You need to review the whole project’s data and make sure every folder in the project has a document to record what you had done before, every script should also have a note to record the meaning of it.&lt;/p&gt;

&lt;h4 id=&quot;no5&quot;&gt;No.5&lt;/h4&gt;

&lt;p&gt;when link a data from one sub-folder to another sub-folder in one project folder, you should use relative symbolic link &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ln -rs&lt;/code&gt;. When you need to move a project folder to other place, the data structure will not be broken.&lt;/p&gt;

&lt;h2 id=&quot;tips&quot;&gt;Tips&lt;/h2&gt;

&lt;h4 id=&quot;no1-1&quot;&gt;No.1&lt;/h4&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tmux&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;screen&lt;/code&gt; when you want to run some program after exit the terminal session, they are usable with interactive commands. I perfer using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tmux&lt;/code&gt; , because it has more function compare with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;screen&lt;/code&gt;. Please try to avoid to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nohup&lt;/code&gt; which you couldn’t control the program later.&lt;/p&gt;

&lt;p&gt;When you have a Rstudio-server, sometime you may wish to run program via Rstudio termianl after you close the Rstudio interface, but I still suggest you run the program using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tmux&lt;/code&gt; inside the Rstudio terminal.&lt;/p&gt;

&lt;p&gt;The main reason for this is when the Rstudio terminal session is not reponse, you still can do interactive in tmux from other ssh session.&lt;/p&gt;

&lt;h4 id=&quot;no2-1&quot;&gt;No.2&lt;/h4&gt;

&lt;p&gt;Always monitor the memory usage via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ps aux --sort -rss | head&lt;/code&gt;, some parallel program may cause momory leak, you maynot know about memory leak even the program is running sucessfully.&lt;/p&gt;

&lt;h4 id=&quot;no3-1&quot;&gt;No.3&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Control+C&lt;/code&gt; aborts the application almost immediately while &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Control+Z&lt;/code&gt; shunts it into the background, suspended. If you shunt any application into the background, &lt;strong&gt;please keep in mind that the program is still waiting for your command&lt;/strong&gt;.&lt;/p&gt;

&lt;h4 id=&quot;no4-1&quot;&gt;No.4&lt;/h4&gt;

&lt;p&gt;Do not save the large files to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home&lt;/code&gt; directory if your server has limited storage for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home&lt;/code&gt;. Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;df -h&lt;/code&gt; to check the size of each system disk.&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;du -sh * | sort -rh&lt;/code&gt; to check the size of each folder.&lt;/p&gt;

&lt;h4 id=&quot;no5-1&quot;&gt;No.5&lt;/h4&gt;

&lt;p&gt;Better to learn one of &lt;a href=&quot;https://www.biostars.org/p/91301/&quot;&gt;Pipeline Building Framework&lt;/a&gt; and Docker, it makes everything reproducible more easily.&lt;/p&gt;

&lt;h4 id=&quot;no6&quot;&gt;No.6&lt;/h4&gt;

&lt;p&gt;You need have &lt;a href=&quot;https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf&quot;&gt;basic knowledge&lt;/a&gt; of conda, and use it when run python code.&lt;/p&gt;

&lt;p&gt;Also makesure you know where is the installed version of it. I found someone who is a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;su&lt;/code&gt; user installs miniconda on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home&lt;/code&gt; directory but the all user’s environment of the conda has changed to this person’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home&lt;/code&gt; version. That’s ridiculous.&lt;/p&gt;

&lt;h4 id=&quot;no7&quot;&gt;No.7&lt;/h4&gt;

&lt;p&gt;Always compress dataset in to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.xz&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gz&lt;/code&gt; format. R and Python (or other programming language) has function to read compressed datasets, you don’t need to uncompress any dataset for analysis. That’s may save a lot of space.&lt;/p&gt;

&lt;h4 id=&quot;no8&quot;&gt;No.8&lt;/h4&gt;

&lt;p&gt;When generate a modified file, never cover the orginal files.&lt;/p&gt;

&lt;h4 id=&quot;no9&quot;&gt;No.9&lt;/h4&gt;

&lt;p&gt;Bioinformatics is a field that has rapid changes. Stay hungry, keep learning.&lt;/p&gt;
</description>
        <pubDate>Wed, 28 Apr 2021 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/bioinfo/2021/04/28/keep-good-dry-lab-habits.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/bioinfo/2021/04/28/keep-good-dry-lab-habits.html</guid>
        
        <category>Rstudio</category>
        
        <category>tmux</category>
        
        <category>Ctrl-z</category>
        
        
        <category>bioinfo</category>
        
      </item>
    
      <item>
        <title>Some useful R codes</title>
        <description>&lt;p&gt;This is an Attic to store some useful R codes, I don’t want to search them every time, so I put these codes at here.&lt;/p&gt;

&lt;h3 id=&quot;check-packages-if-they-are-installed&quot;&gt;Check packages if they are installed&lt;/h3&gt;

&lt;div class=&quot;language-r highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;check.package&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new.pkg&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%in%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;installed.packages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()[,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Package&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new.pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
    &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install.packages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new.pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dependencies&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sapply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pkg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character.only&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;


&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;packages.name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;reshape&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;ggplot2&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;gridExtra&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;check.package&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;packages.name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;draw-beautiful-arrowhead&quot;&gt;Draw beautiful arrowhead&lt;/h3&gt;

&lt;div class=&quot;language-r highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggplot2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;seals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sample&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nrow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;seals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ggplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;geom_segment&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aes&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;xend&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta_long&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
                 &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yend&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lat&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delta_lat&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arrow&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arrow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;angle&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;closed&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;colour&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;black&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arrow.fill&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;red&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; 
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;TBC&lt;/p&gt;
</description>
        <pubDate>Mon, 04 May 2020 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/r-language/2020/05/04/Some-useful-R-codes.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/r-language/2020/05/04/Some-useful-R-codes.html</guid>
        
        <category>R</category>
        
        
        <category>R-Language</category>
        
      </item>
    
      <item>
        <title>How to convert webm to gif on Linux</title>
        <description>&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;webm&lt;/code&gt; is an audiovisual media file format. It is primarily intended to offer a royalty-free alternative to use in the HTML5 video and the HTML5 audio elements. It has a sister project WebP for images. On Fedora system, you could use the &lt;a href=&quot;https://fedoraproject.org/wiki/ScreenCasting&quot;&gt;Gnome’s embedded screencast tool&lt;/a&gt; to create a 30 seconds video of your screen by default. What I want is a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gif&lt;/code&gt; animation that would be easier to be transferred and shown online.&lt;/p&gt;

&lt;p&gt;So how to convert &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;webm&lt;/code&gt; file to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gif&lt;/code&gt; file on Linux?&lt;/p&gt;

&lt;p&gt;The best way is using ffmpeg &lt;sup id=&quot;fnref:1&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ffmpeg &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.webm &lt;span class=&quot;nt&quot;&gt;-vf&lt;/span&gt; palettegen palette.png
ffmpeg &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.webm &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; palette.png &lt;span class=&quot;nt&quot;&gt;-filter_complex&lt;/span&gt; paletteuse &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; 10 output.gif
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After that I also recommend using GNU Image Manipulation Program (GIMP) to crop off the unwanted part in the animation, it is also a way to reduce the animation size.&lt;/p&gt;

&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:1&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;&lt;a href=&quot;https://askubuntu.com/questions/506670/how-to-do-i-convert-an-webm-video-to-a-animated-gif-on-the-command-line&quot;&gt;How to do I convert an webm (video) to a (animated) gif on the command line?&lt;/a&gt; &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
        <pubDate>Mon, 04 May 2020 00:00:00 +0000</pubDate>
        <link>https://yulijia.net/en/howto/2020/05/04/How-to-convert-webm-to-gif-on-Linux.html</link>
        <guid isPermaLink="true">https://yulijia.net/en/howto/2020/05/04/How-to-convert-webm-to-gif-on-Linux.html</guid>
        
        <category>webm</category>
        
        <category>gif</category>
        
        <category>GIMP</category>
        
        
        <category>HowTo</category>
        
      </item>
    
  </channel>
</rss>
