RNA-Seq 基因表达量自动定量在PipePool的使用方法
这个脚本将演示如何使用 Salmon 这种极其高效的“准比对”(Quasi-mapping)工具来直接对转录组进行定量。这个脚本会自动化执行:构建索引、序列定量以及结果整理。
·
这个脚本将演示如何使用 Salmon 这种极其高效的“准比对”(Quasi-mapping)工具来直接对转录组进行定量。
这个脚本会自动化执行:构建索引、序列定量以及结果整理。
#!/bin/bash
#pp -nodes 100
# 1. Setting Variables
SAMPLE=$1
THREADS=8
INDEX_DIR="../references/transcripts_index"
TRANSCRIPTS="../references/target_transcripts.fa.gz"
FASTQ_DIR="../raw_data"
OUTPUT_DIR="../quants"
echo "--- Processing Sample: $SAMPLE ---"
# 2. Build Index (Only if it doesn't exist)
# Salmon requires a mapping index of the transcriptome
if [ ! -d "$INDEX_DIR" ]; then
echo "[Step 1/2] Building Salmon index..."
salmon index -t $TRANSCRIPTS -i $INDEX_DIR
else
echo "[Skip] Index already exists, moving to quantification."
fi
# 3. Run Quantification
# Using paired-end reads; -l A automatically detects library type
echo "[Step 2/2] Running quantification (Salmon)..."
salmon quant -i $INDEX_DIR -l A \
-1 ${FASTQ_DIR}/${SAMPLE}_1.fastq.gz \
-2 ${FASTQ_DIR}/${SAMPLE}_2.fastq.gz \
-p $THREADS \
--validateMappings \
-o ${OUTPUT_DIR}/${SAMPLE}_quant
# 4. Completion Summary
echo "--------------------------------------"
echo "Quantification for $SAMPLE finished."
echo "Results saved in: ${OUTPUT_DIR}/${SAMPLE}_quant/quant.sf"
更多推荐


所有评论(0)