NGS Reads QC and Alignemnt

Beatriz Manso
2022-03-24

Introduction

Modern sequencing techniques enable researchers to sequence the genome at greater depth than ever before. NGS stands fro Next Generation Sequencing and allows for extremely high throughput, scalability, and speed. Using this technology, it is possible to determine nucleotide sequences within entire genomes or specific regions of DNA or RNA.

All high-throughput sequencing analyses require quality checks and processing of reads. Before we can quantify the genomic signal of interest and apply statistical and/or machine learning methods, we must process, quality check, and align the millions of reads generated by these sequencing experiments.

In this tutorial, we will assess the read quality and processing which are fundamental steps in all high-throughput sequencing analyses.

Methods

1. Set working directory

setwd("C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical")

2. Install necessary packages and load libraries

if (!requireNamespace("BiocManager", quietly = TRUE))
   install.packages("BiocManager")
BiocManager::install("Rsubread")
BiocManager::install("ShortRead")
BiocManager::install("fastqcr")
BiocManager::install("Rqc")
BiocManager::install("QuasR")
BiocManager::install("ngsReports")

3. Download Fasq data

We will use system.file() to upload data into a folder we will call ‘mydata’ in.

mydata = system.file(package="ShortRead", "extdata/E-MTAB-1147")

Now feed fastq.qz files in “mydata” to the quality check function rqc() to create the object qcRes:

qcRes=rqc(path = mydata, pattern = ".fastq.gz", openBrowser=FALSE)

Report is in C:/Users/manso/AppData/Local/Temp/RtmpMbKuwN/rqc_report.html Pasting the file path in browser window will show the html report.

4. Plot quality metrics

Plot a sequence quality per base/cycle metrics for our fastq files in qcRes object use

What does this graph depicts?

The graph above shows the sequence quality per base/cycle metrics, we can observe that the quality of the reads degrades at the end which is expected for long sequences. Good samples will have median quality scores per base above 28. If scores are below 20 towards the ends, you can think about trimming the reads.

Why is the x-axis labelled as ‘cycle’?

Cycles correspond to bases/nucleotides along the read, and the number of cycles is equivalent to the read length.

5. Find Sequence content per base/cycle

What does the per base sequence content show?

Per-base sequence content shows nucleotide proportions for each position.

This plot shows sequence bias – what is the probable cause of the bias?

Some types of sequencing libraries can produce a biased sequence composition. For example, in RNA-Seq, it is common to have bias at the beginning of the reads. This happens because of random primers annealing to the start of reads during RNA-Seq library preparation. These primers are not truly random, which leads to a variation at the beginning of the reads. Although RNA-seq experiments will usually have these biases, this will not affect the ability of measuring gene expression.

6. Filtering and trimming read

It might be necessary to trim or filter the reads based on the quality check results. It may be that adapters are present on either side of the read, or that technical errors are causing the base quality to diminish toward the ends of the read. This portion of the read should be trimmed, in both cases, to allow alignment or better alignment of the genome.

We can use QuasR or ShortRead packages to trim and filter reads the reads. However, QuasR::preprocessReads() function provides a single interface to multiple pre-processing.

6.1. First, Obtain a list of fastq file paths:

fastqFiles <- system.file(package="ShortRead",
                          "extdata/E-MTAB-1147",
                          c("ERR127302_1_subset.fastq.gz", "ERR127302_2_subset.fastq.gz"))

For this tutorial we are using built in training data from the package - and we access this data using ‘system.file’ command. When using our own data we must create the correct filepath for our data.

6.2. Next, Define processed fastq file names:

outfiles <- paste(tempfile(pattern=c("processed_1_", "processed_2_")),".fastq",sep="")

6.3. Then we Process fastq files with the following parameters as an example:

  1. Remove reads that have more than 1 N, (nBases)
  2. trim 3 bases from the end of the reads (truncateEndBases)
  3. remove ACCCGGGA patern if it occurs at the start (Lpattern)
  4. remove reads shorter than 40 base-pairs (minLength)
preprocessReads(fastqFiles, outfiles, nBases=1,
                truncateEndBases=3,Lpattern="ACCCGGGA",
                minLength=40)
                 ERR127302_1_subset.fastq.gz
totalSequences                         20000
matchTo5pAdapter                        3804
matchTo3pAdapter                           0
tooShort                                 355
tooManyN                                   4
lowComplexity                              0
totalPassed                            19641
                 ERR127302_2_subset.fastq.gz
totalSequences                         20000
matchTo5pAdapter                        3398
matchTo3pAdapter                           0
tooShort                                 426
tooManyN                                   1
lowComplexity                              0
totalPassed                            19573

6.4. Filter out reads with quality score below 20:

fastqFile <- system.file(package="ShortRead",
                         "extdata/E-MTAB-1147",
                         "ERR127302_1_subset.fastq.gz")
fq = readFastq(fastqFile)
qPerBase = as(quality(fq), "matrix")
qcount = rowSums( qPerBase <= 20) 
fq[qcount == 0]
class: ShortReadQ
length: 10699 reads; width: 72 cycles
writeFastq(fq[qcount == 0], paste(fastqFile, "Qfiltered", sep="_"))

ShortRead::FastqStreamer() - streams the fastq file in blocks, each with a pre-defined number of reads. Which can be accessed using the yield() function. As we call the yield() function after opening a fastq file with FastqStreamer(), a new section of the file is read into memory.

f <- FastqStreamer(fastqFile, readerBlockSize=1000)
while(length(fq <- yield(f))) { 
  qPerBase = as(quality(fq), "matrix") 
  qcount = rowSums( qPerBase <= 20) 
  writeFastq(fq[qcount == 0],
             paste(fastqFile, "Qfiltered", sep="_"),
             mode="a")
}

This loop will remove reads where all quality scores are < 20, get quality scores per base as a matrix; get number of bases per read that have Q score < 20, write fastq file with mode=“a”, to every new block, and written out to the same file.

7. Map or align the reads to the genome (library(QuasR) is needed)

7.1. Copy example data to current working directory:

file.copy(system.file(package="QuasR", "extdata"), ".", recursive=TRUE)
[1] TRUE

7.2. Get genome file in fasta format:

genomeFile <- "extdata/hg19sub.fa"

7.3. Get text file containing sample names and fastq file paths:

sampleFile <- "extdata/samples_chip_single.txt"

7.4. Create alignments:

proj <- qAlign(sampleFile, genomeFile)

With qAlign(), alignment parameters are automatically selected based on different types of alignment problems

8. Map or align the reads to the genome with Rsubread

Data files needed:

  1. Put all the sequencing read data (.fastq.gz files) in your data directory.
  2. Find the files and command Rsubread aligner which files to look at.

8.1. Search for all .fastq.gz files in the directory using the list.files command.

fastq.files <- list.files(path = "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq", pattern = ".fastq.gz$", full.names = TRUE)

fastq.files
 [1] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552444.fastq.gz"
 [2] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552445.fastq.gz"
 [3] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552446.fastq.gz"
 [4] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552447.fastq.gz"
 [5] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552448.fastq.gz"
 [6] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552449.fastq.gz"
 [7] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552450.fastq.gz"
 [8] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552451.fastq.gz"
 [9] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552452.fastq.gz"
[10] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552453.fastq.gz"
[11] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552454.fastq.gz"
[12] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552455.fastq.gz"

The pattern argument takes a regular expression. In this case, we are using the “$” to mean the end of the string, so we will only get files that end in “.fastq.gz”

8.2. Build the Index:

#buildindex(basename="./reference_index",reference=ref)
buildindex(basename="chr1_mm10",reference="chr1.fa")

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
||                Index name : chr1_mm10                                      ||
||               Index space : base space                                     ||
||               Index split : no-split                                       ||
||          Repeat threshold : 100 repeats                                    ||
||              Gapped index : no                                             ||
||                                                                            ||
||       Free / total memory : 16.2GB / 31.4GB                                ||
||                                                                            ||
||               Input files : 1 file in total                                ||
||                             o chr1.fa                                      ||
||                                                                            ||
\\============================================================================//

//================================= Running ==================================\\
||                                                                            ||
|| Check the integrity of provided reference sequences ...                    ||
|| No format issues were found                                                ||
|| Scan uninformative subreads in reference sequences ...                     ||
|| 41288 uninformative subreads were found.                                   ||
|| These subreads were excluded from index building.                          ||
|| Estimate the index size...                                                 ||
||    8%,   0 mins elapsed, rate=6107.6k bps/s                                ||
||   16%,   0 mins elapsed, rate=5781.8k bps/s                                ||
||   24%,   0 mins elapsed, rate=5682.1k bps/s                                ||
||   33%,   0 mins elapsed, rate=5615.0k bps/s                                ||
||   41%,   0 mins elapsed, rate=5577.1k bps/s                                ||
||   49%,   0 mins elapsed, rate=5554.7k bps/s                                ||
||   58%,   0 mins elapsed, rate=5540.9k bps/s                                ||
||   66%,   0 mins elapsed, rate=5532.0k bps/s                                ||
||   74%,   0 mins elapsed, rate=5522.6k bps/s                                ||
||   83%,   0 mins elapsed, rate=5514.6k bps/s                                ||
||   91%,   0 mins elapsed, rate=5513.6k bps/s                                ||
|| 4.0 GB of memory is needed for index building.                             ||
|| Build the index...                                                         ||
||    8%,   0 mins elapsed, rate=2291.0k bps/s                                ||
||   16%,   0 mins elapsed, rate=2356.7k bps/s                                ||
||   24%,   0 mins elapsed, rate=2372.1k bps/s                                ||
||   33%,   0 mins elapsed, rate=2375.6k bps/s                                ||
||   41%,   0 mins elapsed, rate=2379.6k bps/s                                ||
||   49%,   0 mins elapsed, rate=2383.1k bps/s                                ||
||   58%,   0 mins elapsed, rate=2388.2k bps/s                                ||
||   66%,   0 mins elapsed, rate=2390.2k bps/s                                ||
||   74%,   1 mins elapsed, rate=2391.7k bps/s                                ||
||   83%,   1 mins elapsed, rate=2391.0k bps/s                                ||
||   91%,   1 mins elapsed, rate=2390.5k bps/s                                ||
|| Save current index block...                                                ||
||  [ 0.0% finished ]                                                         ||
||  [ 10.0% finished ]                                                        ||
||  [ 20.0% finished ]                                                        ||
||  [ 30.0% finished ]                                                        ||
||  [ 40.0% finished ]                                                        ||
||  [ 50.0% finished ]                                                        ||
||  [ 60.0% finished ]                                                        ||
||  [ 70.0% finished ]                                                        ||
||  [ 80.0% finished ]                                                        ||
||  [ 90.0% finished ]                                                        ||
||  [ 100.0% finished ]                                                       ||
||                                                                            ||
||                      Total running time: 3.0 minutes.                      ||
||Index C:\Users\manso\OneDrive - University of West London\MSc Bioinfor ... ||
||                                                                            ||
\\============================================================================//

With our index generated, we can align the reads with the align command.

According to align’s default settings, it only keeps reads that uniquely map to the reference genome. We need this when testing differential gene expression, because each read is unambiguously assigned to one place in the genome, making interpretation of results easier.

8.3. Align the reads using the align command:

#to view and change parameters run: args(align) 

align("chr1_mm10", readfile1 = fastq.files, 
      useAnnotation=T, nthreads=10, annot.inbuilt="mm10",
      phredOffset = 64 )

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552444.fastq.gz                                        ||
|| Output file   : SRR1552444.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:26:38, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 141 (14.1%)                                  ||
||             Uniquely mapped : 129                                          ||
||               Multi-mapping : 12                                           ||
||                                                                            ||
||                    Unmapped : 859                                          ||
||                                                                            ||
||                      Indels : 9                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552445.fastq.gz                                        ||
|| Output file   : SRR1552445.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:27:02, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 132 (13.2%)                                  ||
||             Uniquely mapped : 127                                          ||
||               Multi-mapping : 5                                            ||
||                                                                            ||
||                    Unmapped : 868                                          ||
||                                                                            ||
||                      Indels : 1                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552446.fastq.gz                                        ||
|| Output file   : SRR1552446.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:27:26, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 119 (11.9%)                                  ||
||             Uniquely mapped : 111                                          ||
||               Multi-mapping : 8                                            ||
||                                                                            ||
||                    Unmapped : 881                                          ||
||                                                                            ||
||                      Indels : 7                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552447.fastq.gz                                        ||
|| Output file   : SRR1552447.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:27:49, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 112 (11.2%)                                  ||
||             Uniquely mapped : 104                                          ||
||               Multi-mapping : 8                                            ||
||                                                                            ||
||                    Unmapped : 888                                          ||
||                                                                            ||
||                      Indels : 3                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552448.fastq.gz                                        ||
|| Output file   : SRR1552448.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:28:13, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 53 (5.3%)                                    ||
||             Uniquely mapped : 51                                           ||
||               Multi-mapping : 2                                            ||
||                                                                            ||
||                    Unmapped : 947                                          ||
||                                                                            ||
||                      Indels : 1                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552449.fastq.gz                                        ||
|| Output file   : SRR1552449.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:28:36, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 75 (7.5%)                                    ||
||             Uniquely mapped : 66                                           ||
||               Multi-mapping : 9                                            ||
||                                                                            ||
||                    Unmapped : 925                                          ||
||                                                                            ||
||                      Indels : 2                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552450.fastq.gz                                        ||
|| Output file   : SRR1552450.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:29:00, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 124 (12.4%)                                  ||
||             Uniquely mapped : 119                                          ||
||               Multi-mapping : 5                                            ||
||                                                                            ||
||                    Unmapped : 876                                          ||
||                                                                            ||
||                      Indels : 4                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552451.fastq.gz                                        ||
|| Output file   : SRR1552451.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:29:23, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 158 (15.8%)                                  ||
||             Uniquely mapped : 143                                          ||
||               Multi-mapping : 15                                           ||
||                                                                            ||
||                    Unmapped : 842                                          ||
||                                                                            ||
||                      Indels : 9                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552452.fastq.gz                                        ||
|| Output file   : SRR1552452.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:29:47, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 142 (14.2%)                                  ||
||             Uniquely mapped : 133                                          ||
||               Multi-mapping : 9                                            ||
||                                                                            ||
||                    Unmapped : 858                                          ||
||                                                                            ||
||                      Indels : 6                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552453.fastq.gz                                        ||
|| Output file   : SRR1552453.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:30:11, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 147 (14.7%)                                  ||
||             Uniquely mapped : 137                                          ||
||               Multi-mapping : 10                                           ||
||                                                                            ||
||                    Unmapped : 853                                          ||
||                                                                            ||
||                      Indels : 5                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552454.fastq.gz                                        ||
|| Output file   : SRR1552454.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:30:34, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 130 (13.0%)                                  ||
||             Uniquely mapped : 126                                          ||
||               Multi-mapping : 4                                            ||
||                                                                            ||
||                    Unmapped : 870                                          ||
||                                                                            ||
||                      Indels : 2                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//================================= setting ==================================\\
||                                                                            ||
|| Function      : Read alignment (RNA-Seq)                                   ||
|| Input file    : SRR1552455.fastq.gz                                        ||
|| Output file   : SRR1552455.fastq.gz.subread.BAM (BAM)                      ||
|| Index name    : chr1_mm10                                                  ||
||                                                                            ||
||                    ------------------------------------                    ||
||                                                                            ||
||                               Threads : 10                                 ||
||                          Phred offset : 64                                 ||
||                             Min votes : 3 / 10                             ||
||                        Max mismatches : 3                                  ||
||                      Max indel length : 5                                  ||
||            Report multi-mapping reads : yes                                ||
|| Max alignments per multi-mapping read : 1                                  ||
||                           Annotations : inbuilt (mm10)                     ||
||                                                                            ||
\\============================================================================//

//================ Running (01-May-2022 18:30:58, pid=23920) =================\\
||                                                                            ||
|| Check the input reads.                                                     ||
|| The input file contains base space reads.                                  ||
|| Initialise the memory objects.                                             ||
|| Estimate the mean read length.                                             ||
|| WARNING  - The specified Phred score offset (64) seems incorrect.          ||
||            ASCII values of the quality scores of read bases included in    ||
||            the first 999 reads were found to be within the range of        ||
||            [35,74].                                                        ||
||                                                                            ||
|| Create the output BAM file.                                                ||
|| Check the index.                                                           ||
|| Init the voting space.                                                     ||
|| Load the annotation file.                                                  ||
|| 222996 annotation records were loaded.                                     ||
||                                                                            ||
|| Chromosomes/contigs in annotation but not in index :                       ||
||    NT_166281.1                                                             ||
||    chrY                                                                    ||
||    NT_187056.1                                                             ||
||    NT_187054.1                                                             ||
||    chr14                                                                   ||
||    NT_187060.1                                                             ||
||    NT_187057.1                                                             ||
||    chr8                                                                    ||
||    NT_166282.1                                                             ||
||    NT_166307.1                                                             ||
||    chr10                                                                   ||
||    NT_187059.1                                                             ||
||    chr11                                                                   ||
||    chr2                                                                    ||
||    NT_187062.1                                                             ||
||    chrX                                                                    ||
||    NT_187052.1                                                             ||
||    chr19                                                                   ||
||    NT_166438.1                                                             ||
||    NT_166466.1                                                             ||
||    chr12                                                                   ||
||    NT_187058.1                                                             ||
||    chrM                                                                    ||
||    chr7                                                                    ||
||    chr18                                                                   ||
||    chr3                                                                    ||
||    NT_187053.1                                                             ||
||    NT_166291.1                                                             ||
||    chr13                                                                   ||
||    chr9                                                                    ||
||    chr17                                                                   ||
||    chr6                                                                    ||
||    NT_162750.1                                                             ||
||    NT_165789.2                                                             ||
||    chr5                                                                    ||
||    chr16                                                                   ||
||    NT_166463.1                                                             ||
||    chr4                                                                    ||
||    NT_166434.1                                                             ||
||    NT_166280.1                                                             ||
||    chr15                                                                   ||
||    NT_187064.1                                                             ||
||                                                                            ||
|| Global environment is initialised.                                         ||
|| Load the 1-th index block...                                               ||
|| The index block has been loaded.                                           ||
|| Start read mapping in chunk.                                               ||
||                                                                            ||
||                           Completed successfully.                          ||
||                                                                            ||
\\====================================    ====================================//

//================================   Summary =================================\\
||                                                                            ||
||                 Total reads : 1000                                         ||
||                      Mapped : 117 (11.7%)                                  ||
||             Uniquely mapped : 112                                          ||
||               Multi-mapping : 5                                            ||
||                                                                            ||
||                    Unmapped : 883                                          ||
||                                                                            ||
||                      Indels : 6                                            ||
||                                                                            ||
||                     WARNING : Phred offset (64) incorrect?                 ||
||                                                                            ||
||                Running time : 0.4 minutes                                  ||
||                                                                            ||
\\============================================================================//
                      SRR1552444.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      141
Uniquely_mapped_reads                             129
Multi_mapping_reads                                12
Unmapped_reads                                    859
Indels                                              9
                      SRR1552445.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      132
Uniquely_mapped_reads                             127
Multi_mapping_reads                                 5
Unmapped_reads                                    868
Indels                                              1
                      SRR1552446.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      119
Uniquely_mapped_reads                             111
Multi_mapping_reads                                 8
Unmapped_reads                                    881
Indels                                              7
                      SRR1552447.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      112
Uniquely_mapped_reads                             104
Multi_mapping_reads                                 8
Unmapped_reads                                    888
Indels                                              3
                      SRR1552448.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                       53
Uniquely_mapped_reads                              51
Multi_mapping_reads                                 2
Unmapped_reads                                    947
Indels                                              1
                      SRR1552449.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                       75
Uniquely_mapped_reads                              66
Multi_mapping_reads                                 9
Unmapped_reads                                    925
Indels                                              2
                      SRR1552450.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      124
Uniquely_mapped_reads                             119
Multi_mapping_reads                                 5
Unmapped_reads                                    876
Indels                                              4
                      SRR1552451.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      158
Uniquely_mapped_reads                             143
Multi_mapping_reads                                15
Unmapped_reads                                    842
Indels                                              9
                      SRR1552452.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      142
Uniquely_mapped_reads                             133
Multi_mapping_reads                                 9
Unmapped_reads                                    858
Indels                                              6
                      SRR1552453.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      147
Uniquely_mapped_reads                             137
Multi_mapping_reads                                10
Unmapped_reads                                    853
Indels                                              5
                      SRR1552454.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      130
Uniquely_mapped_reads                             126
Multi_mapping_reads                                 4
Unmapped_reads                                    870
Indels                                              2
                      SRR1552455.fastq.gz.subread.BAM
Total_reads                                      1000
Mapped_reads                                      117
Uniquely_mapped_reads                             112
Multi_mapping_reads                                 5
Unmapped_reads                                    883
Indels                                              6

If we have paired end data, we would need to specify the second read file/s using the readfile2 argument. The mouse data for this experiment are 100bp single end reads.(this might take very long time to complete)

We can specify the output files, or we can let Rsubread choose the output file names for us. The default output file name is the filename with “.subread.BAM” added at the end.

8.4. Get a summary of the proportion of reads that mapped to the reference genome using the propmapped function:

bam.files <- list.files(path = "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq", pattern = ".BAM$", full.names = TRUE)

bam.files
 [1] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552444.fastq.gz.subread.BAM"
 [2] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552445.fastq.gz.subread.BAM"
 [3] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552446.fastq.gz.subread.BAM"
 [4] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552447.fastq.gz.subread.BAM"
 [5] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552448.fastq.gz.subread.BAM"
 [6] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552449.fastq.gz.subread.BAM"
 [7] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552450.fastq.gz.subread.BAM"
 [8] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552451.fastq.gz.subread.BAM"
 [9] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552452.fastq.gz.subread.BAM"
[10] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552453.fastq.gz.subread.BAM"
[11] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552454.fastq.gz.subread.BAM"
[12] "C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552455.fastq.gz.subread.BAM"
props <- propmapped(files=bam.files)
props
                                NumTotal NumMapped PropMapped
SRR1552444.fastq.gz.subread.BAM     1000       141      0.141
SRR1552445.fastq.gz.subread.BAM     1000       132      0.132
SRR1552446.fastq.gz.subread.BAM     1000       119      0.119
SRR1552447.fastq.gz.subread.BAM     1000       112      0.112
SRR1552448.fastq.gz.subread.BAM     1000        53      0.053
SRR1552449.fastq.gz.subread.BAM     1000        75      0.075
SRR1552450.fastq.gz.subread.BAM     1000       124      0.124
SRR1552451.fastq.gz.subread.BAM     1000       158      0.158
SRR1552452.fastq.gz.subread.BAM     1000       142      0.142
SRR1552453.fastq.gz.subread.BAM     1000       147      0.147
SRR1552454.fastq.gz.subread.BAM     1000       130      0.130
SRR1552455.fastq.gz.subread.BAM     1000       117      0.117

As a result of the alignment, there are several BAM files, each containing read alignments for each library. BAM files contain the chromosomal location of each read.

9. Quality control after alignemnt

By using the qualityScores function in Rsubread, we can examine the quality scores associated with each base that has been called by the sequencing machine.

9.1. Extract quality scores(qs) for 100 reads

qs <- qualityScores(filename="C:/Users/manso/OneDrive - University of West London/MSc Bioinformatics - UWL/6.BGA - Bioinformatics and Genome Analysis/week 2 - NGS data QC and alignment in R/practical/MouseMamRNA-Seq/SRR1552450.fastq.gz",nreads=100)

qualityScores Rsubread 2.8.2

Scan the input file...
Totally 1000 reads were scanned; the sampling interval is 9.
Now extract read quality information...

Completed successfully. Quality scores for 100 reads (equally spaced in the file) are returned.

9.2. Check dimension of qs

dim(qs)
[1] 100 100

9.3. Check first few elements of qs with head:

head(qs)
      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21
[1,] 31 34 31 37 37 37 37 37 39 37 39 39 39 41 40 41 41 41 36 38 40
[2,] 34 34 34 37 37 37 37 37 39 39 39 39 39 41 41 41 41 39 40 41 41
[3,] 34 34 31 37 37 37 37 37 39 39 39 39 39 41 41 41 41 41 41 41 41
[4,] 34 34 34 37 37 37 37 37 39 39 39 39 39 41 41 41 41 39 40 40 41
[5,] 34 34 34 37 37 37 37 37 39 39 39 39 39 41 41 41 40 41 41 41 41
[6,] 34 34 34 37 37 37 37 37 39 39 39 39 39 41 41 41 41 41 41 41 41
     22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
[1,] 41 39 40 38 40 40 40 40 40 38 40 40 40 38 37 39 40 40 41 40 41
[2,] 41 41 41 41 41 41 41 41 41 41 41 38 40 41 41 41 41 41 41 41 41
[3,] 41 41 41 41 41 41 41 41 40 40 41 38 38 38 40 41 40 41 39 40 40
[4,] 41 41 41 40 41 41 41 41 41 40 41 41 41 41 40 41 41 41 41 41 41
[5,] 41 41 40 41 41 41 41 41 39 40 41 41 41 41 40 41 41 41 41 41 41
[6,] 41 41 41 41 36 40 40 41 41 41 41 40 38 40 38 40 41 41 40 41 41
     43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
[1,] 41 38 40 40 40 41 41 41 40 40 36 40 38 37 37 35 35 33 35 35 33
[2,] 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 40 41 41 41 39 39
[3,] 41 41 41 39 40 38 40 40 37 39 40 41 41 40 37 39 39 39 37 37 37
[4,] 41 41 41 41 41 41 41 41 41 41 41 41 41 40 40 41 40 41 41 41 41
[5,] 41 41 41 41 41 41 41 41 41 40 41 41 41 41 40 41 41 41 38 40 41
[6,] 41 40 40 41 40 40 40 41 40 39 33 36 35 34 35 35 35 35 35 35 35
     64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
[1,] 35 34 35 35 35 34 34 34 35 35 35 35 35 35 35 36 35 35 35 34 34
[2,] 39 39 37 37 37 37 36 36 36 34 36 35 35 35 35 35 35 35 35 35 35
[3,] 37 37 37 36 36 35 36 35 33 35 35 35 35 34 36 35 35 34 35 35 35
[4,] 40 41 41 39 39 39 39 37 37 37 37 37 37 36 36 36 36 36 36 35 35
[5,] 41 41 41 39 39 39 39 39 38 37 37 37 37 37 35 35 35 35 35 36 35
[6,] 33 33 33 34 31 31 34 29 34 33 34 35 32 32 34 34 33 31 34 34 18
     85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
[1,] 35 34 35 35 35 35 35 35 35 35 35 35 35 35 35  33
[2,] 37 35 36 35 35 35 35 35 35 36 36 35 35 34 34  35
[3,] 34 35 35 35 35 35 33 35 35 35 31 34 35 35 33  33
[4,] 35 35 35 35 35 35 35 34 35 35 35 35 35 35 35  35
[5,] 35 35 35 35 35 35 35 35 35 36 35 35 35 35 35  35
[6,] 24 32 33 35 35 27 32 31 32 34 34 35 34 34 33  34

9.4. Visualise Quality scores

With a quality score of 30, the likelihood of making an incorrect call is 1 in 1000. (A quality score of 10 is a 1 in 10 chance of an incorrect base call.) A boxplot can be used to examine the overall distribution of quality scores across the 100 reads.

boxplot(qs)

10. Counting

The featureCounts() function can be used to calculate the number of mapped reads across mouse genes. There are built-in annotations for mouse genome assemblies (mm9, mm10) and human genome assemblies (hg19) (NCBI refseq annotations).

featureCounts() takes all the BAM files as input, and outputs an object which includes the count matrix. Each sample is a separate column, each row is a gene.

fc <- featureCounts(bam.files, annot.inbuilt="mm10")
NCBI RefSeq annotation for mm10 (build 38.1) is used.

        ==========     _____ _    _ ____  _____  ______          _____  
        =====         / ____| |  | |  _ \|  __ \|  ____|   /\   |  __ \ 
          =====      | (___ | |  | | |_) | |__) | |__     /  \  | |  | |
            ====      \___ \| |  | |  _ <|  _  /|  __|   / /\ \ | |  | |
              ====    ____) | |__| | |_) | | \ \| |____ / ____ \| |__| |
        ==========   |_____/ \____/|____/|_|  \_\______/_/    \_\_____/
       Rsubread 2.8.2

//========================== featureCounts setting ===========================\\
||                                                                            ||
||             Input files : 12 BAM files                                     ||
||                                                                            ||
||                           SRR1552444.fastq.gz.subread.BAM                  ||
||                           SRR1552445.fastq.gz.subread.BAM                  ||
||                           SRR1552446.fastq.gz.subread.BAM                  ||
||                           SRR1552447.fastq.gz.subread.BAM                  ||
||                           SRR1552448.fastq.gz.subread.BAM                  ||
||                           SRR1552449.fastq.gz.subread.BAM                  ||
||                           SRR1552450.fastq.gz.subread.BAM                  ||
||                           SRR1552451.fastq.gz.subread.BAM                  ||
||                           SRR1552452.fastq.gz.subread.BAM                  ||
||                           SRR1552453.fastq.gz.subread.BAM                  ||
||                           SRR1552454.fastq.gz.subread.BAM                  ||
||                           SRR1552455.fastq.gz.subread.BAM                  ||
||                                                                            ||
||              Paired-end : no                                               ||
||        Count read pairs : no                                               ||
||              Annotation : inbuilt (mm10)                                   ||
||      Dir for temp files : .                                                ||
||                 Threads : 1                                                ||
||                   Level : meta-feature level                               ||
||      Multimapping reads : counted                                          ||
|| Multi-overlapping reads : not counted                                      ||
||   Min overlapping bases : 1                                                ||
||                                                                            ||
\\============================================================================//

//================================= Running ==================================\\
||                                                                            ||
|| Load annotation file mm10_RefSeq_exon.txt ...                              ||
||    Features : 222996                                                       ||
||    Meta-features : 27179                                                   ||
||    Chromosomes/contigs : 43                                                ||
||                                                                            ||
|| Process BAM file SRR1552444.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 2 (0.2%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552445.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 5 (0.5%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552446.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 4 (0.4%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552447.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 1 (0.1%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552448.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 0 (0.0%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552449.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 3 (0.3%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552450.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 6 (0.6%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552451.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 2 (0.2%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552452.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 2 (0.2%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552453.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 8 (0.8%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552454.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 1 (0.1%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Process BAM file SRR1552455.fastq.gz.subread.BAM...                        ||
||    Single-end reads are included.                                          ||
||    Total alignments : 1000                                                 ||
||    Successfully assigned alignments : 5 (0.5%)                             ||
||    Running time : 0.00 minutes                                             ||
||                                                                            ||
|| Write the final count table.                                               ||
|| Write the read assignment summary.                                         ||
||                                                                            ||
\\============================================================================//
names(fc) #See what slots are stored in fc
[1] "counts"     "annotation" "targets"    "stat"      

“fc$stat” shows the statistics of the read mapping, also reporting the unassigned reads and the reasons why they weren’t assigned:

fc$stat
                          Status SRR1552444.fastq.gz.subread.BAM
1                       Assigned                               2
2            Unassigned_Unmapped                             859
3           Unassigned_Read_Type                               0
4           Unassigned_Singleton                               0
5      Unassigned_MappingQuality                               0
6             Unassigned_Chimera                               0
7      Unassigned_FragmentLength                               0
8           Unassigned_Duplicate                               0
9        Unassigned_MultiMapping                               0
10          Unassigned_Secondary                               0
11           Unassigned_NonSplit                               0
12         Unassigned_NoFeatures                             138
13 Unassigned_Overlapping_Length                               0
14          Unassigned_Ambiguity                               1
   SRR1552445.fastq.gz.subread.BAM SRR1552446.fastq.gz.subread.BAM
1                                5                               4
2                              868                             881
3                                0                               0
4                                0                               0
5                                0                               0
6                                0                               0
7                                0                               0
8                                0                               0
9                                0                               0
10                               0                               0
11                               0                               0
12                             127                             115
13                               0                               0
14                               0                               0
   SRR1552447.fastq.gz.subread.BAM SRR1552448.fastq.gz.subread.BAM
1                                1                               0
2                              888                             947
3                                0                               0
4                                0                               0
5                                0                               0
6                                0                               0
7                                0                               0
8                                0                               0
9                                0                               0
10                               0                               0
11                               0                               0
12                             111                              53
13                               0                               0
14                               0                               0
   SRR1552449.fastq.gz.subread.BAM SRR1552450.fastq.gz.subread.BAM
1                                3                               6
2                              925                             876
3                                0                               0
4                                0                               0
5                                0                               0
6                                0                               0
7                                0                               0
8                                0                               0
9                                0                               0
10                               0                               0
11                               0                               0
12                              71                             117
13                               0                               0
14                               1                               1
   SRR1552451.fastq.gz.subread.BAM SRR1552452.fastq.gz.subread.BAM
1                                2                               2
2                              842                             858
3                                0                               0
4                                0                               0
5                                0                               0
6                                0                               0
7                                0                               0
8                                0                               0
9                                0                               0
10                               0                               0
11                               0                               0
12                             156                             140
13                               0                               0
14                               0                               0
   SRR1552453.fastq.gz.subread.BAM SRR1552454.fastq.gz.subread.BAM
1                                8                               1
2                              853                             870
3                                0                               0
4                                0                               0
5                                0                               0
6                                0                               0
7                                0                               0
8                                0                               0
9                                0                               0
10                               0                               0
11                               0                               0
12                             139                             129
13                               0                               0
14                               0                               0
   SRR1552455.fastq.gz.subread.BAM
1                                5
2                              883
3                                0
4                                0
5                                0
6                                0
7                                0
8                                0
9                                0
10                               0
11                               0
12                             112
13                               0
14                               0

In this matrix, the rows denote the Entrez gene identifiers for each gene, and the columns denote the output filenames from the align function.

FeatureCounts() compiled reads over genes using annotation information in the annotation slot.

head(fc$annotation)
     GeneID                           Chr
1    497097                chr1;chr1;chr1
2 100503874                     chr1;chr1
3 100038431                          chr1
4     19888 chr1;chr1;chr1;chr1;chr1;chr1
5     20671      chr1;chr1;chr1;chr1;chr1
6     27395      chr1;chr1;chr1;chr1;chr1
                                            Start
1                         3214482;3421702;3670552
2                                 3647309;3658847
3                                         3680155
4 4290846;4343507;4351910;4352202;4360200;4409170
5         4490928;4493100;4493772;4495136;4496291
6         4773198;4777525;4782568;4783951;4785573
                                              End      Strand Length
1                         3216968;3421901;3671498       -;-;-   3634
2                                 3650509;3658904         -;-   3259
3                                         3681788           +   1634
4 4293012;4350091;4352081;4352837;4360314;4409241 -;-;-;-;-;-   9747
5         4492668;4493466;4493863;4495942;4496413   -;-;-;-;-   3130
6         4776801;4777648;4782733;4784105;4785726   -;-;-;-;-   4203