RNA-seq exercise: from FASTQ to an expression matrix
1. What you will practice
Section titled “1. What you will practice”This exercise asks one question.
What must be produced and checked at each stage for paired-end RNA-seq FASTQ to become a trustworthy expression table?
The final outputs are a gene-level TPM expression table and a raw count table. The analysis is not complete merely because two files were created. You must check quality before and after trimming, reference consistency, alignment rate, and count assignment rate in sequence before trusting the downstream expression analysis.
The complete flow is:
FastQC → Trim Galore! → FastQC → STAR → RSEM + featureCounts
If you want to understand the principles first, read FASTQ quality control and trimming, RNA read alignment, and Building an expression matrix before you begin.
What does paired-end FASTQ contain?
Section titled “What does paired-end FASTQ contain?”In RNA-seq, RNA extracted from tissue or cells is broken into short fragments, and a sequencer reads the nucleotide sequence of each fragment. Paired-end sequencing reads one end of a fragment in R1 and the opposite end in R2. Records at the same position in both files form a pair from the same fragment.
One FASTQ record has four lines. The short values below are synthetic examples that demonstrate the format.
@read0001/1ACGTTGCA+IIIIIHGF| Line | Synthetic value | Meaning |
|---|---|---|
| 1 | @read0001/1 | Read identifier and pair direction |
| 2 | ACGTTGCA | Nucleotide sequence read by the sequencer |
| 3 | + | Separator between sequence and quality |
| 4 | IIIIIHGF | Phred quality for each base, encoded as characters |
The second and fourth lines must have the same number of characters. The first record in R1 and the first record in R2 must refer to the same fragment. If one file was partially truncated, the pairs may be out of sync. This is why the first prompt checks not just filenames but also record structure and pairing.
FASTQ contains no gene names. It contains only short sequences such as ACGTTGCA..., so STAR must place each sequence at a position in the reference genome before its gene of origin can be determined. GTF is the coordinate table that identifies the exons and genes at those positions.
Inputs and outputs
Section titled “Inputs and outputs”| Input | Role |
|---|---|
sample_R1.fastq.gz, sample_R2.fastq.gz | Paired-end raw reads from opposite ends of the same fragments |
| Reference genome FASTA | The coordinate reference STAR uses to locate reads |
| GTF from the same release | Coordinate annotation for genes and exons |
| STAR index | Precomputed files used for genome alignment |
| RSEM reference | Precomputed files used to calculate transcript and gene expression |
| Stage | Main output | What happens next |
|---|---|---|
| FastQC | HTML and ZIP reports | Find problems in the original reads |
| Trim Galore! | _val_1.fq.gz, _val_2.fq.gz | Clean adapters and low-quality ends |
| STAR | Genome BAM, transcriptome BAM, alignment log | Check locations and alignment quality |
| RSEM | genes.results | Obtain TPM and expected counts |
| featureCounts | Gene-level count file and summary | Obtain raw counts for differential expression analysis |
From raw reads to one number
Section titled “From raw reads to one number”A number such as ENSG... = 1250 in the final table was not stored directly in FASTQ. It is constructed by collecting reads or fragments that pass these decisions:
- Clean portions with very low quality or remaining adapters.
- Find where each read pair came from in the reference.
- Check which gene exon in the GTF overlaps that position.
- Count fragments assigned to one gene, or use a model to divide probabilities across multiple transcripts.
A featureCounts raw count is a relatively direct count of fragments assigned in steps 3 and 4. RSEM’s expected_count can be fractional because it is an expected value that probabilistically divides ambiguous reads across multiple transcripts. TPM corrects for gene length and sequencing depth within a sample, making relative expression proportions among genes within that sample easier to compare.
This exercise processes one sample from start to finish. To test differential expression across multiple conditions, process every sample with the same procedure, then combine the raw count columns into one matrix. A high TPM in one sample alone cannot establish an increase or decrease across conditions.
Order of checks in this exercise
Section titled “Order of checks in this exercise”Ask an agent to proceed one stage at a time while checking these questions:
- Are R1 and R2 truly a complete pair from the same sample?
- Where are the low-quality and adapter problems, and did they decrease after trimming?
- Do most reads align to the expected reference?
- Did the genome BAM and transcriptome BAM each go into the correct quantification tool?
- What do the rows and values in the RSEM and featureCounts results mean?
- Is enough information preserved to rerun the same analysis on another computer?
2. Ask an agent to inspect the working environment
Section titled “2. Ask an agent to inspect the working environment”Run Codex CLI or Claude Code in the working folder containing the input FASTQ, then submit the prompt below. If you know the paths, replace the bracketed text in the prompt with actual values. If you do not, the agent will search the current folder for candidates and stop when a selection is required.
Exercise environment inspection prompt
Inspect the environment for an exercise that converts paired-end RNA-seq FASTQ into expression tables.
Input candidates:
- FASTQ: *.fastq.gz or *.fq.gz under the current folder
- STAR index: [enter the path if known, otherwise search for candidates]
- RSEM reference prefix: [enter the path if known, otherwise search for candidates]
- GTF: [enter the path if known, otherwise search for candidates]
Requirements:
1. Do not run any analysis commands yet.
2. Find paired-end FASTQ candidates and summarize filenames, sizes, and R1/R2 pairs in a table. Explain how you determined the sample name.
3. Check whether FastQC, Trim Galore!, STAR, RSEM, featureCounts, and samtools are installed, and report their versions. Do not install missing tools yourself.
4. Confirm that the STAR index's genomeParameters.txt, the files associated with the RSEM reference prefix, and the GTF actually exist.
5. To the extent possible, check whether their genome builds and annotation releases match. If an inference is based only on filenames, label it as an inference.
6. Do not modify the original FASTQ or references. Plan to save working outputs under qc/raw, trimmed, qc/trimmed, align, quant, and counts.
7. Report in English the sample name to use, absolute paths, detected tool versions, missing inputs and tools, and an outline of the command to run in the next stage, then stop.
If the inputs or R1/R2 pairing are ambiguous, do not choose arbitrarily. Show the candidates and stop. The first thing to inspect in the environment report is the R1/R2 pairing. If files from different samples are paired, every downstream file may still be created successfully while the results remain biologically meaningless.
If a tool is missing, ask the agent separately for an installation plan suited to your operating system and package-management method. This document does not let the agent install tools automatically into the global environment. This avoids overwriting an existing research environment or mixing incompatible versions.
Folders used after preparation
Section titled “Folders used after preparation”After the environment inspection, the agent proposes this structure. Because nothing has run yet, output folders other than the input FASTQ and references may still be empty.
qc/raw/: FastQC HTML and ZIP before trimmingtrimmed/: newly created paired FASTQ while preserving the originalsqc/trimmed/: FastQC HTML and ZIP after trimmingalign/: STAR BAM, alignment logs, and execution recordsquant/: RSEM gene and isoform results and execution recordscounts/: featureCounts result table, summary, and execution records
This structure keeps the inputs and outputs of raw FASTQ → trimmed FASTQ → BAM → expression table separate. The sample name must also remain the same at every stage. For example, if the inputs are tumor01_R1.fastq.gz and tumor01_R2.fastq.gz, keeping tumor01 in the STAR prefix and RSEM results makes it safer to combine multiple samples later.
3. Process one stage at a time with prompts
Section titled “3. Process one stage at a time with prompts”Submit the prompts below one at a time, starting from the top. After each stage, do not read only the agent’s summary. Inspect the actual reports and logs before moving on.
3-1. Inspect raw FASTQ structure and quality
Section titled “3-1. Inspect raw FASTQ structure and quality”The first stage does not change any reads. It checks gzip integrity and FASTQ record structure, then records the original state with FastQC.
Step 1 prompt: raw FASTQ and FastQC
Perform only the original quality inspection on the paired-end FASTQ selected earlier.
1. Run gzip integrity checks on the selected R1 and R2. Do not decompress or modify the original files.
2. Safely read the first FASTQ record in each file and confirm the header format, sequence length, and that sequence and quality strings have matching lengths. In the output, do not expose the entire sequence or potentially identifying header. Summarize only the structure.
3. Create the qc/raw directory and run FastQC. Record the FastQC version and command used.
4. From the generated HTML and zip results, summarize total sequences, sequence length, per base sequence quality, adapter content, and duplication levels in a table split by R1 and R2.
5. Do not judge each item only by its PASS/WARN/FAIL label. Explain the actual values and graph patterns.
6. Confirm the paths and sizes of the result files. If there is an error, investigate the cause but do not proceed to trimming or alignment.
7. Report in English the problems observed in the original reads, the evidence for whether trimming is needed, and suggested minimum read length and quality thresholds for the next stage, then stop.
Do not run Trim Galore!, STAR, RSEM, or featureCounts yet. In FastQC, inspect total read count, per-base quality, read-length distribution, and adapter signals together. Some genes are expressed very strongly in RNA-seq and can produce high duplication, so do not declare failure from a red duplication flag alone. See QC with FastQC for the meaning of each module.
FastQC HTML contains many graphs, but start with these four items:
| Item | Graph axes or value | First thing to check |
|---|---|---|
| Basic Statistics | Read count, length, GC proportion | Do R1 and R2 contain the same number of reads at the expected length? |
| Per base sequence quality | x-axis is read position, y-axis is Phred score | How much does quality fall toward the 3′ end? |
| Sequence Length Distribution | x-axis is read length | Are all raw reads one length, or are multiple lengths mixed? |
| Adapter Content | x-axis is read position, y-axis is adapter detection rate | Does a particular adapter signal rise at the read end? |
A Phred score of 20 represents about a 1% probability that one base was read incorrectly, while 30 represents about 0.1%. If the yellow box in the graph drops at a particular position, many reads have lower quality at that position. Distinguish between a low minimum in a few reads and a decline in the whole distribution.
If Total Sequences differs between R1 and R2, investigate the cause before trimming. Properly paired FASTQ files should contain the same number of records. A transfer may have been interrupted, or files from different processing stages may have been paired.
3-2. Compare before and after trimming
Section titled “3-2. Compare before and after trimming”The goal of trimming is not to make scores look good. It is to remove only as much adapter sequence and unreliable terminal sequence as needed to prevent interference with alignment.
Step 2 prompt: Trim Galore! and before-and-after comparison
Preserve the raw FastQC results and perform only trimming and post-trimming quality comparison.
1. Use Trim Galore! in paired-end mode on the R1/R2 selected in the previous stage.
2. Unless there is separate evidence, use --quality 20 and --length 20. If you use different values, first explain which raw FastQC observation justified the change.
3. Save outputs in the trimmed directory and do not modify the original FASTQ.
4. Check gzip integrity and paired-file existence for the generated *_val_1.fq.gz and *_val_2.fq.gz files.
5. Run FastQC again into qc/trimmed.
6. Compare raw and trimmed total sequences, length distributions, per-base quality, and adapter content in one table. Also calculate the number and proportion of reads removed.
7. Use actual values to judge whether adapters and low-quality ends decreased and whether read loss was excessive.
8. Report the command used, tool versions, result paths, and exact FASTQ paths to use in the next stage, then stop.
Do not run STAR alignment or quantification yet. The before-and-after comparison should answer four questions:
- Did low quality at the 3′ end improve?
- Did adapter signals decrease?
- Did too many reads become short?
- Was the number and proportion of removed reads unexpectedly large?
If trimming performs poorly, do not push the output into the next stage with the same options. First determine whether the original data has a quality problem or automatic adapter recognition was incorrect.
Compare before-and-after numbers in the same units. For example, if raw R1 has 20 million reads and trimmed R1 has 19.4 million, 600,000 reads, or 3%, failed the pair-preservation criteria and were removed. This is a synthetic example demonstrating the calculation. The acceptable range depends on the experiment and original quality.
In paired mode, if one read becomes shorter than the minimum length, both reads from that fragment may be excluded. Do not interpret loss from R1 alone. Check the pair-handling result in the Trim Galore! report together with the record counts in both R1 and R2.
--quality 20 does not mean that every base is made Q20 or higher. It is the rule Cutadapt applies to quality trimming at read ends. One low-quality base inside a read does not cause everything before and after that position to be discarded. --length 20 excludes reads shorter than 20 nt after trimming.
If the graphs improve but most reads are lost, the result is not good. Conversely, if the original data had almost no adapter signal and sufficient quality, a small change after trimming is not failure. The goal is not to cut as much as possible. It is to preserve information useful for alignment while removing only clear problems.
3-3. Align to the genome and transcriptome with STAR
Section titled “3-3. Align to the genome and transcriptome with STAR”STAR produces two BAM files for different purposes from the same input reads. The genome-coordinate BAM goes to featureCounts, and the transcriptome-coordinate BAM goes to RSEM.
Step 3 prompt: STAR alignment and log interpretation
Perform only the stage that aligns the trimmed FASTQ with STAR.
1. Reconfirm the absolute paths of the validated STAR index and trimmed R1/R2.
2. Inspect available CPU and memory and choose a runThreadN value that will not interfere with other work. Report the reason for the choice.
3. Run STAR into the align directory using the sample name as the prefix.
4. Because the inputs are paired gzipped FASTQ, use --readFilesCommand zcat.
5. Include --twopassMode Basic, --quantMode TranscriptomeSAM GeneCounts, and --outSAMtype BAM Unsorted. Do not arbitrarily add --chim* options for tumor fusion analysis to this basic exercise.
6. Save the complete command, STAR version, and index metadata in a text file.
7. Confirm that sample.Aligned.out.bam, sample.Aligned.toTranscriptome.out.bam, and sample.Log.final.out were created. Run samtools quickcheck on the genome BAM.
8. Summarize input reads, uniquely mapped reads %, multi-mapping %, reasons for unmapped reads, and splice metrics from Log.final.out in a table.
9. If the alignment rate is low or either BAM is missing, investigate the cause. Distinguish reference mismatch, read length, and possible contamination, and do not continue to the next stage.
10. Report in English the evidence that the result is usable in the next stage and the exact BAM paths, then stop.
Do not run RSEM or featureCounts yet. Values in Log.final.out vary with data type and experimental design. Uniquely mapped reads above 80% are generally a good starting point, and some multi-mapping is common in RNA-seq, but do not use this number as a universal threshold. If results are worse than expected, check genome and annotation versions, read length, trimming intensity, and contamination together.
First read STAR log percentages with Number of input reads as the denominator. For paired-end data, one input read means one fragment pair consisting of R1 and R2, not one line from the R1 file. When comparing FASTQ record counts with the STAR log, confirm that both use the same unit.
| STAR log item | Meaning | First thing to check when the value is worse than expected |
|---|---|---|
Uniquely mapped reads % | Proportion of fragments best aligned to one position | Species, genome build, read quality, and contamination |
% of reads mapped to multiple loci | Proportion aligned similarly well to several positions | Repeats, similar genes, and short reads |
% of reads unmapped: too many mismatches | Proportion with too many mismatches to accept | Wrong species, low quality, and contamination |
% of reads unmapped: too short | Proportion lacking enough evidence for alignment | Excessive trimming and short original reads |
Number of splices | Number of junctions aligned across exons | RNA-seq library and annotation context |
For example, with 20 million input fragments, 85% unique, 8% multiple loci, and 7% unmapped means about 17 million aligned to one position, 1.6 million aligned to several, and 1.4 million were unaligned. The three percentages in this synthetic example sum to approximately the whole, but real logs contain more detailed categories and rounding, so inspect the displayed numbers directly.
The two BAM files express the same alignment result in different coordinate systems.
| File | Alignment coordinates | Use in this exercise |
|---|---|---|
sample.Aligned.out.bam | Chromosome genome coordinates | Aggregate with featureCounts by overlapping GTF exons |
sample.Aligned.toTranscriptome.out.bam | Transcript sequence coordinates | Let RSEM calculate transcript-level possibilities |
If a transcriptome BAM is passed to featureCounts, or the genome BAM is passed to the current RSEM command, the files still have a BAM extension but the coordinate meanings do not match. Do not connect files by extension alone. Confirm the output names from the STAR command.
A successful samtools quickcheck means that the BAM header and end are not seriously corrupted. It does not mean the alignment rate is good or the sample is correct. Inspect log values, file size, and reference information separately.
3-4. Calculate TPM with RSEM
Section titled “3-4. Calculate TPM with RSEM”RSEM takes the transcriptome-coordinate BAM from STAR and an RSEM reference, then calculates gene- and isoform-level expression.
Step 4 prompt: RSEM gene expression
Perform only RSEM quantification using the validated transcriptome BAM.
1. Reconfirm that sample.Aligned.toTranscriptome.out.bam and the files associated with the RSEM reference prefix exist.
2. Record available evidence that the STAR index, RSEM reference, and GTF use the same genome build and annotation release.
3. Run rsem-calculate-expression with --alignments --paired-end --estimate-rspd --append-names so results are created in the quant directory. Choose the thread count according to current resources.
4. Save the complete command and RSEM version in a text file.
5. Check the existence, row count, column names, missing values, and negative values of sample.genes.results and sample.isoforms.results.
6. Show the first rows of gene_id, expected_count, and TPM from genes.results and calculate the TPM sum. Explain how to avoid confusing names appended by --append-names with gene IDs.
7. Print the top 10 genes by TPM, but do not use this alone to establish sample quality or a biological conclusion.
8. Report result paths, key validation values, and warnings in English, then stop.
Do not run featureCounts yet. sample.genes.results contains gene-level expected_count, TPM, and FPKM. Begin general expression exploration with this file, and inspect sample.isoforms.results when differences among particular transcripts matter.
Each row in the result table is one gene. Exact columns can differ with the RSEM version and reference configuration, but these are the main columns to read:
| Column | First interpretation |
|---|---|
gene_id | Stable gene identifier from the annotation |
transcript_id(s) | Transcript identifiers linked to the gene |
length | A value reflecting transcript lengths in the annotation |
effective_length | Effective length reflecting the number of positions where a fragment can actually fit |
expected_count | Expected fragment count after ambiguous alignments are divided probabilistically |
TPM | Relative expression proportion corrected for length and the sample total |
expected_count can be fractional, such as 1250.37. When one fragment matches multiple transcripts, RSEM divides the probabilities. This does not mean the file is broken. By contrast, the featureCounts raw count in the next stage is an integer counted with direct assignment rules.
TPM is a proportion scaled so values within one sample generally sum to one million. A TPM of 200 means that the gene represents about 200/1,000,000 of the sample’s total transcript signal. Because it corrects for gene-length effects, TPM is useful for examining relative expression proportions among genes within the same sample.
Do not use TPM from different samples as DESeq2 input. A differential expression test across conditions models the mean-variance relationship in counts, so it requires integer raw counts and sample-level metadata. The top 10 genes by TPM are merely the genes observed most often in that sample. They cannot be called features of an experimental condition without comparison to other samples.
With --append-names, an ID and gene symbol may appear together, as in ENSG..._GENE. Symbols are easy for people to read but can change or be duplicated. When combining results across samples, it is safer to use gene IDs from the same annotation release as the key.
3-5. Create raw counts with featureCounts
Section titled “3-5. Create raw counts with featureCounts”featureCounts uses the genome-coordinate BAM to count fragments overlapping GTF exons by gene ID. The critical point is that its input BAM differs from RSEM’s.
Aligned.toTranscriptome.out.bam→ RSEM → TPMAligned.out.bam+ GTF → featureCounts → raw count
Step 5 prompt: featureCounts raw counts
Perform only featureCounts using the validated genome BAM and GTF.
1. Confirm the absolute paths of sample.Aligned.out.bam and the GTF, and whether the BAM contains paired-end data.
2. Check the installed featureCounts version's help for the paired-end fragment-counting options. If supported, use -p --countReadPairs. If behavior differs by version, explain the options applied.
3. Use -t exon -g gene_id --extraAttributes gene_name and save the output to counts/sample.featureCounts.txt. Choose the thread count according to current resources.
4. Save the complete command, Subread/featureCounts version, and GTF identification information in a text file.
5. Distinguish annotation columns from the sample count column in the result table, then calculate the number of gene IDs, number of genes with count zero, and total assigned fragments.
6. Summarize counts and proportions for Assigned and each unassigned reason from sample.featureCounts.txt.summary in a table.
7. If the assignment rate is low, first inspect contig names in the GTF and BAM, annotation release, and strandedness settings. Do not arbitrarily change options and rerun.
8. Report in English the output file paths and the column to use when combining multiple samples into a count matrix, then stop. The raw counts in the featureCounts table are used for differential expression analysis across multiple samples. TPM and raw counts both represent expression, but they are not interchangeable versions of the same value. Converting reads into an expression matrix explains their different uses.
When you open the result file, gene annotations appear on the left and the sample count on the right. This synthetic example demonstrates the structure.
| Geneid | Chr | Start | End | Strand | Length | sample.Aligned.out.bam |
|---|---|---|---|---|---|---|
ENSG000001 | chr1 | 1001 | 1800 | + | 800 | 1,250 |
ENSG000002 | chr1 | 5001 | 6200 | - | 1,200 | 47 |
The 1,250 in the first row is the number of fragments in the sample’s genome BAM assigned to the exons of ENSG000001 under the featureCounts rules. Length = 800 is not a count divided by length. It is an annotation length calculated from GTF features. Only the final count column enters a multi-sample raw count matrix. Chr, Start, End, Strand, and Length can be retained once as gene-level annotations.
The summary file also groups fragments that did not enter the count by reason.
| Summary category | Meaning |
|---|---|
Assigned | Ultimately assigned to the specified feature and gene ID |
Unassigned_NoFeatures | Alignment position does not overlap a specified exon |
Unassigned_Ambiguity | Overlaps more than one gene, so one cannot be selected |
Unassigned_MultiMapping | Aligns to multiple genome positions and is excluded under the current rules |
Unassigned_Unmapped | Does not align to the reference |
If Unassigned_NoFeatures is large, first check whether the GTF uses the same genome build as the BAM and whether chromosome names differ, as in chr1 versus 1. Using the default unstranded setting for a strand-specific library can also change the assignment rate substantially. Do not infer strandedness from filenames. Determine it from library-preparation records or a separate inference result from a tool such as RSeQC.
featureCounts and RSEM counts do not need to match exactly. RSEM distributes ambiguous reads probabilistically in the transcriptome, while featureCounts assigns fragments according to specified overlap rules. The two tools ask different questions and use different rules, so their values differ. What matters is recording the input BAM, annotation, and options that produced each value.
3-6. Audit all outputs
Section titled “3-6. Audit all outputs”The final stage does not add a new analysis. It checks that the inputs, commands, versions, and outputs created so far connect correctly.
Step 6 prompt: final output and reproducibility audit
Perform a final read-only audit of the RNA-seq exercise outputs created so far.
1. In stage order, make a table of paths and sizes from raw FASTQ through FastQC, trimmed FASTQ, STAR BAM and logs, RSEM results, and featureCounts results.
2. Confirm that the input to each stage is the validated output of the immediately preceding stage. In particular, check that RSEM used the transcriptome BAM and featureCounts used the genome BAM.
3. Check whether execution records preserve tool versions, complete commands, and identifying information for the reference genome and annotation.
4. Check for unexplained mismatches among raw and trimmed read counts, STAR input reads, RSEM input, and the featureCounts counting unit.
5. Summarize key FastQC changes before and after trimming, STAR unique/multi/unmapped proportions, and the featureCounts Assigned proportion in one table.
6. Create a separate list of information missing for reproduction and warnings that require further inspection.
7. Do not modify files or rerun analyses. Report in English what is complete and incomplete, then stop. The final audit table should do more than list whether files exist. These connections must be traceable line by line:
| Connection to check | Required relationship |
|---|---|
| Raw and trimmed read counts | Loss is explained by the Trim Galore! report |
| Trimmed reads and STAR input | STAR actually read the trimmed pair |
| STAR and RSEM | Transcriptome BAM was used as RSEM input |
| STAR and featureCounts | Genome BAM and GTF from the same build were used |
| Output tables and sample name | Every result refers to the same sample selected at the start |
For example, if FastQC inspected tumor01 but the STAR prefix is normal01, every file may exist while traceability is broken. This is why filenames, absolute paths, and command records must be inspected together.
Scope of interpretation
Section titled “Scope of interpretation”This exercise verifies the technical process of aligning reads from one paired-end RNA-seq sample and organizing gene-level expression. Producing the results does not automatically reveal:
- Whether the sample matches its original biological condition label
- Which cell types and proportions are mixed in the tissue
- Whether a particular gene increased or decreased relative to another condition
- Whether an observed difference is statistically reproducible
- Whether an expression change is a cause or consequence of disease
Answering these questions requires multiple biological replicates, accurate metadata, cross-sample QC, and a differential expression model. The raw count from this page is input to that later analysis, not a final conclusion.
4. Completion criteria
Section titled “4. Completion criteria”- I compared the raw and trimmed FastQC HTML reports directly.
- I recorded the version compatibility of the FASTA, GTF, STAR index, and RSEM reference.
- I checked unique and multi-mapping rates and reasons for unmapped reads in STAR
Log.final.out. - I distinguished the purposes of the genome BAM and transcriptome BAM.
- I checked TPM and expected counts in RSEM
genes.results. - I checked gene-level raw counts and assignment rate in the featureCounts table and summary.
- Tool versions, execution commands, and input and output paths are preserved reproducibly.
Once one sample passes every stage, apply the same procedure to other samples and join the sample-specific featureCounts columns by gene ID to create a count matrix. Even when automating multiple samples, processing one pair from start to finish before scaling up makes errors easier to find.
Questions to answer after running everything
Section titled “Questions to answer after running everything”- Why must records at the same position in R1 and R2 come from the same fragment?
- Why can a duplication warning in FastQC alone not establish that an RNA-seq sample failed?
- If adapter signals fall after trimming but half the reads are lost, what should be rechecked?
- Which tools receive STAR’s genome BAM and transcriptome BAM, respectively?
- Why can RSEM
expected_countbe fractional while a featureCounts raw count is an integer? - Why is TPM not used as DESeq2 input?
- When featureCounts reports a large
Unassigned_NoFeatures, what should be checked in the reference and GTF? - What version information must be recorded in addition to FASTQ and commands to reproduce the same result?