Answers.Body: <p>There must be a problem in the BAM files you are using. Here are steps I would do to figure where exactly is the problem.</p>
  <ol>
  <li><p>Check the data you have downloaded. The tutorial is using 12 fastq.gz files (SRR1552444 - SRR1552455). You can check on sra how big they are supposed to be (For example <a href="https://www.ncbi.nlm.nih.gov/sra/?term=SRR1552444" rel="nofollow noreferrer">SRR1552444 is supposed to be an ~1.7Gb file</a>) and if your downloaded files are about the same. Check if the files are fine (In the terminal you can type <code>zcat data/SRR1552444.fastq.gz | head</code> to check the first few reads). If the files are 0 sized or somehow corrupted, you need to redownload them.</p>
  </li>
  <li><p>Check if your mapping reference looks alright (size wise, look at the first few lines) and if the reference is indexed (there is a <code>.fai</code> in the directory).</p>
  </li>
  <li><p>Check the size of the BAM files, they also need to be in the range of a few hundred Mb to a few Gb. I expect these will be corrupted for sure, otherwise, you would get your numbers. You might also want to check if they are indexed (although this should not be a problem, I suspect they will get indexed automatically). If there is nothing wrong the bamfiles, you might want to check another tool to summarise a bamfile (like <code>samtools flagstat</code>) to check if at the end the problem really is in <code>propmapped</code>. If that's the case.</p>
  </li>
  </ol>
  <p>This should at least help you to zoom to the core of your problem if not resolve it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-14T09:15:47.230Z
Answers.Text: Thank you, i'll look into that
Answers.UserDisplayName: PA_Lvl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-13T13:00:14.980Z
Answers.LastActivityDate: 2021-01-13T13:00:14.980Z
Answers.UserDisplayName: Kamil S Jaron
Body: <p>I'm currently trying to learn RNA-seq data analysis and differential expression in R. I've been using the <a href="https://combine-australia.github.io/RNAseq-R/" rel="nofollow noreferrer">Combine lab tutorial</a>.</p>
  <p>Everything was running well until the tutorial asked to use the <code>propmapped</code> function (on <a href="http://combine-australia.github.io/RNAseq-R/07-rnaseq-day2.html" rel="nofollow noreferrer">this page</a>) on my BAM files and then view the promapped proportion for each sample. In this tutorial we should be getting promapped proportion ranging from 0.05 to 0.150, however in my case I have no reads that align to my mapped genome (promapped = 0 in my case, for each sample). I don't know why as I've been using the data they provided for this tutorial.</p>
  <p>I was wondering if someone could follow the first few steps of this tutorial until the propmapped step and tell me if they eventually get the right proportion of reads or not after the propmapped function.
  This could tell me if the tutorial is the culprit or not.</p>
  
Tags: <r><rna-seq>
Title: RNA_Seq Analysis in R, propmapped function issue
ThreadText: # RNA_Seq Analysis in R, propmapped function issue
  
  (Asked by: username_0 on 2021-01-12)
  
  I'm currently trying to learn RNA-seq data analysis and differential expression in R. I've been using the [Combine lab tutorial](https://combine-australia.github.io/RNAseq-R/).
  
  Everything was running well until the tutorial asked to use the `propmapped` function (on [this page](http://combine-australia.github.io/RNAseq-R/07-rnaseq-day2.html)) on my BAM files and then view the promapped proportion for each sample. In this tutorial we should be getting promapped proportion ranging from 0.05 to 0.150, however in my case I have no reads that align to my mapped genome (promapped = 0 in my case, for each sample). I don't know why as I've been using the data they provided for this tutorial.
  
  I was wondering if someone could follow the first few steps of this tutorial until the propmapped step and tell me if they eventually get the right proportion of reads or not after the propmapped function.
  This could tell me if the tutorial is the culprit or not.
  
  **Tags:** r, rna-seq
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-01-13. Score: 1
  
  There must be a problem in the BAM files you are using. Here are steps I would do to figure where exactly is the problem.
  
  1. Check the data you have downloaded. The tutorial is using 12 fastq.gz files (SRR1552444 - SRR1552455). You can check on sra how big they are supposed to be (For example [SRR1552444 is supposed to be an ~1.7Gb file](https://www.ncbi.nlm.nih.gov/sra/?term=SRR1552444)) and if your downloaded files are about the same. Check if the files are fine (In the terminal you can type `zcat data/SRR1552444.fastq.gz | head` to check the first few reads). If the files are 0 sized or somehow corrupted, you need to redownload them.
  2. Check if your mapping reference looks alright (size wise, look at the first few lines) and if the reference is indexed (there is a `.fai` in the directory).
  3. Check the size of the BAM files, they also need to be in the range of a few hundred Mb to a few Gb. I expect these will be corrupted for sure, otherwise, you would get your numbers. You might also want to check if they are indexed (although this should not be a problem, I suspect they will get indexed automatically). If there is nothing wrong the bamfiles, you might want to check another tool to summarise a bamfile (like `samtools flagstat`) to check if at the end the problem really is in `propmapped`. If that's the case.
  
  This should at least help you to zoom to the core of your problem if not resolve it.
  
  > **Comments:**
  > **username_0**: Thank you, i'll look into that  
  
  ---
  
  