Package used: STAR (Required) Download genome(.fa) and annotation(.gtf) from ncbi genome dataset
Indexing allows the aligner to quickly locate potential matches.
Input: genome annotatioin(.gtf), Reference genome(.fa)
Output: index files
-
--runThreadN
<NumberOfThreads>
Number of CPU threads to use (set to available cores). -
--runMode
genomeGenerate
Tells STAR to build genome indices. -
--genomeDir
/path/to/genomeDir
Directory (must exist) where indices will be stored. Needs ≥100 GB free for mammalian genomes. -
--genomeFastaFiles
/path/to/genome1.fa [/path/to/genome2.fa ...]
One or more reference FASTA files (chromosomes can be split across files). -
--sjdbGTFfile
/path/to/annotations.gtf
(Optional) GTF containing exon/junction annotations. Improves splice‐aware mapping. -
--sjdbOverhang
<ReadLength − 1>
Length of genomic sequence around each splice junction. Ideally set to ReadLength−1 (e.g. 99 for 100 bp reads).
Notes:
- Create (
mkdir) and cleargenomeDirbefore running.- STAR stores indices in binary format—avoid manual editing.
Example script
conda activate fastp
STAR --runThreadN 6 \
--runMode genomeGenerate \
--genomeDir INDEX_DIR \
--genomeFastaFiles GENOME_DIR/genome.fa \
--sjdbGTFfile GENOME_DIR/genome.gtf \
--sjdbOverhang 99Package used: ribodetector
Input: RNA sample transctiptome(fastq.gz)
Output: no rRNA transcriptome(.fa)
conda activate ribodetector
./RMrrna.sh /path/to/fastq_dir /path/to/output_dirPackage used: fastp
Input: no rRNA transcriptome(.fa)
Output: trimmed RNA transcriptome(.fastq.gz)
conda activate fastp
./april_trim.loop.shNotes: Follow prompted instruction to type in the absolute directory
Package used: STAR
Input: trimmed RNA transcriptome(.fastq.gz)
Output: aligned reads(.bam)
Notes:
INDEX_DIR="~/data/m6A_william/mouseGenome/STAR_mouse_genome_index_ensembl" INDEX_DIR="~/data/m6A_william/mouseGenome/STAR_mouse_genome_index_ncbi"
conda activate fastp
./april_star /path/to/fastq_dir /path/to/output_dir /path/to/index_dirPackage used: HTseq-count Input: aligned reads(.bam), genome annotatioin(.gtf)
Output: count file(.txt)
conda activate fastp
./april_count /path/to/fastq_dir /path/to/output_dir /path/to/annotation_dir./final_versionThe script will then prompt you for genome species, input directory, and output directory:
Enter species (mouse/zebrafish) [mouse]:
Input directory [$pwd] for trasncriptome raw data:
Output root directory /path/to/your/output/with/run/date:
Notes:
- Create a parent output directory with the command in the following format
mkdir ~/lab_data/samplename_ddmmyy(This should be what you type in for Output root directory)- This script will create child directory for each step automatically as "step1_RMrrna", "step2_adapter_trim", "step3_alignment", and "step4_gene_count" To learn about the difference in absolute path and relative path, refrence this link: Directory(computing)
- All directory typed in should be in absolute path format. To learn about the difference in absolute path and relative path, refrence this link: Path(computing)