更新 .gitignore,添加 run.status.json;删除旧的 mapping.sh 脚本并添加新的 01.mapping.sh 脚本

This commit is contained in:
2025-12-17 23:27:49 +08:00
parent d8888b8589
commit e8ba2ed962
3 changed files with 20 additions and 16 deletions
+18
View File
@@ -0,0 +1,18 @@
#! /bin/bash
set -e
THREADS=${THREADS:-6}
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <reference_genome> <fastq_1> <fastq_2> <output_prefix>"
exit 1
fi
ref=$1
fq1=$2
fq2=$3
out=$4
outdir=$(dirname "$out")
mkdir -p "$outdir"
hisat2 -p "$THREADS" --dta -x "$ref" -1 "$fq1" -2 "$fq2" -S "${out}.sam"
samtools view -b -@ "$THREADS" "${out}.sam" | samtools sort -@ "$THREADS" -o "${out}.sorted.bam" --write-index
rm "${out}.sam"
echo "Mapping completed. Sorted BAM file is at ${out}.sorted.bam"