Analyzing Your Bulk RNA-seq Assay Data
Step 1: Assess the Quality of Your Sequencing Data with FastQC
If you do not already have FastQC installed, please refer to Installing FastQC.
You can launch the FastQC graphical interface by simply running:
fastqcAlternatively, you can run FastQC directly from the command line:
fastqc --extract --outdir=outdir somefile.fastq someotherfile.fastq ...where you list all the FASTQ files you wish to analyze after the fastqc command, and outdir is the directory in which you would like the output files to be stored.
For a detailed tutorial on using FastQC and interpreting the output reports, see our page on Quality Control of Raw Sequencing Data with FastQC.
Step 2: Pseudoalign Your Library Reads with kb-python
Here we provide a brief example of how to pseudoalign a bulk library to a reference using kb count. For a more in-depth tutorial, see our page on kb-python.
kb count
The default kb count command is designed for scRNA-seq data, where each captured RNA molecule is reverse transcribed at most once and labeled with a unique molecular identifier (UMI). These UMIs allow PCR duplicates to be identified and collapsed so that the final counts approximate the number of original RNA molecules captured from each cell.
This is not the case for bulk RNA-seq data. In bulk RNA-seq, RNA from an entire sample is extracted and fragmented before sequencing. As a result, a single RNA molecule can generate multiple sequencing reads, either because the transcript was fragmented into multiple pieces or because fragments were amplified during PCR. Since bulk RNA-seq libraries typically do not include cell barcodes or UMIs, individual reads cannot be directly traced back to their original molecules.
Instead, transcript abundances must be statistically inferred from the collection of sequenced fragments. In this case, pseudoalignment is used to determine which transcripts are compatible with each read. Then, transcript abundances are estimated using a statistical model that accounts for factors such as transcript length and shared sequences between transcripts.
For this reason, using kb count on bulk data requires special flags which generate a separate output than that for scRNA-seq.
An Example
To pseudoalign your bulk data, run:
kb count --h5ad -x BULK --tcc --matrix-to-directories --parity=paired -g t2g.txt -i index.idx \
sample1_R1.fastq.gz sample1_R2.fastq.gz sample2_R1.fastq.gz sample2_R2.fastq.gzwhere index.idx and t2g.txt are files generated by kb ref, and R1.fastq.gz and R2.fastq.gz are your raw paired-end reads. This command will create a directory for each sample containing the abundance estimates for each transcript.
The --tcc flag with the --matrix-to-directories flag will create a directory for each sample (here one for sample 1 and one for sample 2). The directory names will begin with abundance and be numbered according to the order in which the samples were listed in the command.
Assuming paired-end sequencing, we also include the flag --parity=paired to indicate that both read 1 and read 2 for each read contain biological sequence.
If you performed a bulk nuclear RNA-seq experiment, generate your index with kb ref using the NAC workflow. Then, run kb count with the standard workflow as shown above.
Step 3: Process and Analyze Your Data
Now you are ready to process your data! To continue with downstream analysis, follow our example bulk rna-seq workflow.