Reference preparation参考准备
rnaseq-index-flow
This flow builds the reusable reference contract for downstream RNA-seq analysis: standardized annotation, transcript FASTA, tx2gene.tsv, Salmon/Kallisto indexes, and optional HISAT2 genome index.
这个流程负责构建下游 RNA-seq 分析可复用的参考契约:标准化注释、转录本 FASTA、tx2gene.tsv、Salmon/Kallisto 索引,以及可选 HISAT2 基因组索引。
Typical command
典型命令
taf-rnaseq-index-flow \
--genome genome.fa \
--annotation genes.gff3 \
--outdir ref-out \
--indexer salmon \
--threads 8
Add --genome-indexer hisat2 when the output will feed the alignment/count branch.
如果后续要接比对/计数分支,添加 --genome-indexer hisat2。
Input requirements
输入要求
Choose exactly one input mode. Genome + annotation mode is preferred for the full RNA-seq route because it can produce standardized GTF/GFF3, transcript FASTA, tx2gene.tsv, Salmon/Kallisto indexes, and optional HISAT2 genome indexes from the same reference release. Transcript-only mode is useful when a curated transcriptome FASTA and matching tx2gene.tsv already exist.
只能选择一种输入模式。完整 RNA-seq 路线更推荐“基因组 + 注释”模式,因为它可以从同一参考版本生成标准化 GTF/GFF3、转录本 FASTA、tx2gene.tsv、Salmon/Kallisto 索引以及可选 HISAT2 基因组索引。仅转录本模式适合已经有人工确认的 transcriptome FASTA 和匹配 tx2gene.tsv 的情况。
Genome + annotation mode
基因组 + 注释模式
Provide --genome genome.fa and --annotation genes.gtf|genes.gff3. FASTA record IDs must match annotation seqids after the first whitespace-truncated token.
提供 --genome genome.fa 和 --annotation genes.gtf|genes.gff3。FASTA 序列 ID 必须和注释中的 seqid 匹配,通常按 header 第一个空白前 token 判断。
Transcript-only mode
仅转录本模式
Provide --transcripts transcripts.fa and --tx2gene tx2gene.tsv. Do not combine these with --genome or --annotation.
提供 --transcripts transcripts.fa 和 --tx2gene tx2gene.tsv。不要再同时传入 --genome 或 --annotation。
tx2gene.tsv
The first column is transcript ID and the second is gene ID. Transcript IDs must match the transcript FASTA records used for Salmon/Kallisto indexing.
第一列是转录本 ID,第二列是基因 ID。转录本 ID 必须和 Salmon/Kallisto 建索引使用的转录本 FASTA 记录一致。
tx_id gene_id
YAL001C_mRNA YAL001C
YAL002W_mRNA YAL002W
Complete parameter reference
完整参数说明
| Parameter | 参数 | Required | 是否必需 | Default | 默认值 | Meaning and when to change it | 含义与选择建议 |
|---|
--genome | mode-specific按模式 | none | Genome FASTA for genome + annotation mode. Requires --annotation.基因组 + 注释模式的基因组 FASTA;必须和 --annotation 同时使用。 |
--annotation | mode-specific按模式 | none | GTF or GFF3 annotation matching the genome FASTA. Requires --genome.与基因组 FASTA 匹配的 GTF 或 GFF3 注释;必须和 --genome 同时使用。 |
--transcripts | mode-specific按模式 | none | Transcript FASTA for transcript-only mode. Requires --tx2gene and cannot be mixed with genome mode.仅转录本模式的 transcript FASTA;必须和 --tx2gene 同时使用,不能和基因组模式混用。 |
--tx2gene | mode-specific按模式 | none | Transcript-to-gene TSV with tx_id and gene_id. Required only in transcript-only mode; generated automatically in genome mode.包含 tx_id 和 gene_id 的映射表。仅转录本模式需要用户提供;基因组模式会自动生成。 |
--outdir, -o | yes是 | none | Dedicated output directory. Existing directories are refused unless --force is used.专用输出目录。目录已存在时默认拒绝运行,除非使用 --force。 |
--threads, -t | no否 | 1 | Threads for index builders. Increase for larger references.索引构建使用的线程数。参考基因组较大时可以调高。 |
--indexer | no否 | salmon | Transcriptome index builder: salmon, kallisto, or both. Standard-flow uses Salmon; choose both when Kallisto compatibility is needed.转录组索引类型:salmon、kallisto 或 both。标准流程使用 Salmon;需要保留 Kallisto 兼容性时选 both。 |
--genome-indexer | no否 | none | hisat2 builds 03_results/hisat2_index/genome.*.ht2 for the alignment branch. Requires genome + annotation mode.设为 hisat2 时生成 03_results/hisat2_index/genome.*.ht2,供比对分支使用。只支持基因组 + 注释模式。 |
--kmer | no否 | 31 | Salmon k-mer size. Keep 31 for normal data; smaller values are mainly for tiny smoke fixtures.Salmon k-mer 长度。真实数据通常保留 31;更小值主要用于极小测试数据。 |
--force | no否 | off | Replace standard outputs inside an existing output directory.允许替换已有输出目录中的标准结果。 |
How it connects
如何接上下游
taf-rnaseq-expression-flow \
--samples samples.tsv \
--index ref-out/03_results/salmon_index \
--tx2gene ref-out/03_results/tx2gene.tsv \
--outdir expression-out
taf-rnaseq-alignment-flow \
--samples samples.tsv \
--index ref-out/03_results/hisat2_index/genome \
--outdir align-out
Key outputs and limits
关键输出与边界
Key outputs are 03_results/transcripts/transcripts.fa, 03_results/tx2gene.tsv, 03_results/salmon_index/, 03_results/kallisto_index/, and optional 03_results/hisat2_index/. The flow validates and standardizes inputs, but it does not repair biologically wrong annotations or download reference databases.
关键输出包括 03_results/transcripts/transcripts.fa、03_results/tx2gene.tsv、03_results/salmon_index/、03_results/kallisto_index/ 以及可选 03_results/hisat2_index/。流程会验证和标准化输入,但不会修复生物学上错误的注释,也不会下载参考数据库。