更新 .gitignore,添加 run.status.json;删除旧的 mapping.sh 脚本并添加新的 01.mapping.sh 脚本
This commit is contained in:
parent
d8888b8589
commit
e8ba2ed962
|
|
@ -10,9 +10,10 @@
|
|||
05.reduce_redundancy/*
|
||||
05.orthology_inference/*
|
||||
06.phylogeny_reconstruction/*
|
||||
10.plastid/*
|
||||
98.results/*
|
||||
99.scripts/bucky/
|
||||
99.scripts/phyparts/
|
||||
run.status
|
||||
run.status.json
|
||||
!*/_description.md
|
||||
tmp/
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#! /usr/bash
|
||||
if [ "$#" -ne 5 ]; then
|
||||
echo "Usage: $0 <reference_genome> <fastq_1> <fastq_2> <output_directory> <stem>"
|
||||
exit 1
|
||||
fi
|
||||
ref=$1
|
||||
fq1=$2
|
||||
fq2=$3
|
||||
outdir=$4
|
||||
stem=$5
|
||||
mkdir -p "$outdir"
|
||||
hisat -p 4 --dta -x "$ref" -1 "$fq1" -2 "$fq2" -S "${outdir}/${stem}.sam"
|
||||
samtools view -b -@ 4 "${outdir}/${stem}.sam" | samtools sort -@ 4 -o "${outdir}/${stem}.sorted.bam" --write-index
|
||||
rm "${outdir}/${stem}.sam"
|
||||
echo "Mapping completed. Sorted BAM file is at ${outdir}/${stem}.sorted.bam"
|
||||
Loading…
Reference in New Issue