---
# System prepended metadata

title: BTK6002 - Introduction to high-throughput data analysis (2020-21)

---

# BTK6002 - Introduction to high-throughput data analysis (2020-21)

Here is the primary place where we write down our questions that we have during the **computer sessions via Zoom** and their answers.

If you have a question, please check whether it has been already asked and whether it has an answer. This way, we can save time because the same question is only answered once.

Let's remember that, everybody can contribute by answering. So, please go ahead and answer if you know the answer to a question.

:warning: **PLEASE DO NOT PROVIDE THE CORRECT ANSWER TO THE EXERCISE QUESTIONS in this document BUT ONLY PROVIDE HELP, TIPS, AND HINTS TOWARDS THE SOLUTION!**

:warning: Please **note** that this is a public note and everybody who has the link can access it and see the content. So, please do not put sensitive information such as your username and password.

- To make something **bold** put the word in between \*\*example** or \_\_example__ or select the word and press ctrl+b
- To make something *italic* put the word in between \*example* or \_example_ or select the word and press ctrl+I
- To add smileys, you can start with : and type the name of the smiley and you will see a preview of possible smileys. \:gem: would result in :gem:
- To show Unix commands, variable names, command-line options, enclose them between two backticks (i.e. \`\` for example `ls`).
- If you want to quote an error message, put \> before the message. For example: \>"Permission denied!"
    > "Permission denied!"

:warning: Please add your new questions at the bottom of that week's question list. This makes it easier to answer the questions and not miss any!


## Week 1

### Announcments
- Check here for general announcements for the corresponding week.

### Questions and answers
-  Type here your question. Follow the example below.
-  :question: Is it okay if I use `samtools view ... > output.bam` instead of `samtools view ... -o output.bam`? 
    -  :bulb: Yes (let's use \:bulb: if we are sure about the answer)
    -  :zap:  I guess it is even better when you want to pipe the result to another command but I am not sure! (let's use \:zap: if we have an idea)
-  :question: Next question goes here...


## Week 2
- :question: Exercise 3, MultiQC -part:
 I cannot get the `multiqc --help` to open the help page. I get: 

    >"RuntimeError:Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment", a huge list of UTF-8 supporting locales and "Click discovered that you exported a UTF-8 locale but the locale system could not pick up from it because it does not exist.  The exported locale is "en_US.UTF-8" but it is not supported". 

    Is there something wrong in my end or is it something else?
    - :zap: If I am not mistaken, you should be using Mac. This should be fixed by updating your locale.
    - :bulb: Got it! :)
  ```bash
  export LC_ALL=en_US.UTF-8
  export LANG=en_US.UTF-8
  ```
  I had the same problem. And apparently it is required to update your locale every time you login to binf server. You can type `locale` on command line if you are not sure which locale should be updated. The one that need to be updated is missing `"en_US.UTF-8"`. 

- :question: when you have a list of screens, is there a command so that you can switch among them easily?
    - :zap: detaching and re-attaching is the easiest way I can think of. Also using the keyboard shortcuts some of which we learn during exercise 1.


- :question: Is there a way to stay automatically logged into BINF each time you open a new tab in the Mac terminal (without having to re-log back in each time)?
    - :zap: I cannot think of a quick answer except for setting up and using a SSH key. Follow the instructions here: <https://askubuntu.com/a/46935/846413>

- :question: In screen, how do you terminate a process (for example a *for-loop*) while it is running? I tried to type `exit` while it was running but nothing happened...
    - :bulb: `exit` is for terminating the session. To detach, you need to use `Ctrl+a` and `d` quickly one after another. 
    - :zap: To break out of a running loop, you can use `Ctrl+c`.

- :question: ~~Next question here~~


## Week 3

- :question: On exercise 5, last question. I cannot use `scp` due to locale error. Therefore, I cannot open index.html and visualize the results. Could I find an answer for the GC% on samtools_stats.log on the section of GCD (GC-depth)? If yes, which one of the columns should I find it? How to read these columns: GC%, unique sequence percentiles, 10th, 25th, 50th, 75th and 90th depth percentile?
    - :bulb: It should be possible but I do not know which column should be used (I checked, I could not figure it out. If you are interested, you can read the source code possibly [here](https://github.com/samtools/samtools/blob/6d644120d8202ce86e919bcedf78368d5aef4452/misc/plot-bamstats#L888). I recommend fixing the **locale** issue. There is one solution up under *week 2* section in this document. You can check whether that fixes your issue.
    - Are you using Mac?
        - Yes, I'm using Mac. I know how to update locale but it is not permanent and that's the problem. I'll try to find a solution for that.
            :bulb: I see! I guess if you append/add the `exports` to the `~/.bashrc` or `~/.bash_profile` files, it should work and become permanent. 


## Week 4

- No questions!


## Week 5

- No questions!

## Week 6




## Week 7 (Capstone project)
:question: Next question here...



