Add Vercel configuration for rewrites and build settings

This commit is contained in:
2025-12-17 17:47:45 +08:00
parent 072524e303
commit 0d31d42de4
32 changed files with 7435 additions and 289 deletions
+51
View File
@@ -0,0 +1,51 @@
#! /bin/bash
set -e
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <ogs_dir> <outdir> <proteome> <threads>"
echo "search homologous sequences in <proteome> using HMMs built from orthogroup alignments"
exit 1
fi
ogs_dir=$(readlink -f "$1")
outdir=$2
proteome=$(readlink -f "$3")
threads=$4
mkdir -p "$outdir"
cd "$outdir" || exit 1
echo "Working directory: $(pwd)"
echo "Using OGS directory: $ogs_dir"
echo "Using $threads threads"
echo ""
echo "Starting orthogroup sequence alignment..."
mkdir -p msa
echo -n >mafft.cmds
for i in "$ogs_dir"/*.fa; do
j=$(basename "$i")
echo "linsi --quiet $i > msa/$j" >>mafft.cmds
done
xargs -t -P "$threads" -I cmd -a mafft.cmds bash -c "cmd"
echo "Orthogroup sequence alignment completed."
echo ""
echo "Starting HMM building from alignments..."
mkdir -p hmms
echo -n >hmmbuild.cmds
for i in msa/*.fa; do
j=$(basename "$i")
echo "hmmbuild -o hmms/${j}.hmmbuild.out --amino hmms/${j}.hmm $i" >>hmmbuild.cmds
done
xargs -t -P "$threads" -I cmd -a hmmbuild.cmds bash -c "cmd"
echo "HMM building completed."
echo ""
echo "Starting HMM search against other proteome..."
mkdir -p search
echo -n >hmmsearch.cmds
for i in hmms/*.hmm; do
j=$(basename "$i")
echo "hmmsearch --tblout search/${j}search.tblout $i $proteome > search/${j}search.rawout" >>hmmsearch.cmds
done
xargs -t -P "$threads" -I cmd -a hmmsearch.cmds bash -c "cmd"
echo "HMM search completed."
echo ""
echo "All steps completed successfully."
@@ -1,8 +0,0 @@
#! /usr/bin/env bash
mkdir -p msa
echo -n > mafft.cmds
for i in ogs/*.fa ; do
j=$(basename "$i")
echo "linsi --quiet $i > msa/$j" >> mafft.cmds
done
xargs -t -P 8 -I cmd -a mafft.cmds bash -c "cmd"
@@ -1,8 +0,0 @@
#! /usr/bin/env bash
mkdir -p hmms
echo -n > hmmbuild.cmds
for i in msa/*.fa ; do
j=$(basename "$i")
echo "hmmbuild -o hmms/${j}.hmmbuild.out --amino hmms/${j}.hmm $i" >> hmmbuild.cmds
done
xargs -t -P 8 -I cmd -a hmmbuild.cmds bash -c "cmd"
+34
View File
@@ -0,0 +1,34 @@
#! /bin/bash
set -e
SCRIPTS=${SCRIPTS:-"$PROJECTHOME/99.scripts"}
THREADS=${THREADS:-12}
if [ "$#" -ne 5 ]; then
echo "Usage: $0 <ogs_dir> <hmmsearch_result_dir> <all_cds.fa> <output_dir> <homolog_stem>"
echo "Integrate hmmsearch results to new orthologous groups directory and perform MACSE alignment"
exit 1
fi
ogs_dir=$(readlink -f "$1")
search_dir=$(readlink -f "$2")
all_cds=$(readlink -f "$3")
out_dir=$4
stem=$5
echo "Integrating hmmsearch results to new orthologous groups directory..."
python3 "$SCRIPTS"/miscs/hmmsearch_result_to_new_ogs_dir.py \
-d "$ogs_dir" \
-t "$search_dir" \
-f "$all_cds" \
-o "$out_dir" \
-s "$stem"
echo "Integration completed."
echo "Starting MACSE alignment of orthologous groups..."
echo -n >macse.cmds
for og_dir in "$out_dir"/ogs/*; do
j=$(basename "$og_dir")
echo "cd $og_dir && bash $SCRIPTS/miscs/macse.sh ${j}_${stem}.fa ${j}.fa $j" >>macse.cmds
done
xargs -t -P "$THREADS" -I cmd -a macse.cmds bash -c "cmd"
echo "MACSE alignment completed."
@@ -1,8 +0,0 @@
#! /usr/bin/env bash
mkdir -p hmmsearch
echo -n > hmmsearch.cmds
for i in hmms/*.hmm ; do
j=$(basename "$i")
echo "hmmsearch --tblout hmmsearch/${j}search.tblout $i ../../01.reference/Zju.pep.fa > hmmsearch/${j}search.rawout" >> hmmsearch.cmds
done
xargs -t -P 8 -I cmd -a hmmsearch.cmds bash -c "cmd"
@@ -1,8 +0,0 @@
#! /usr/bin/env bash
mkdir -p pep_aln
echo -n > mafft.cmds
for i in raw_ogs/pep/*.fa; do
j=$(basename "$i")
echo "linsi --quiet $i > pep_aln/${j/.fa/.pal}" >> mafft.cmds
done
xargs -t -P 8 -I cmd -a mafft.cmds bash -c "cmd"
@@ -1,8 +0,0 @@
#! /usr/bin/env bash
mkdir -p cds_aln
echo -n > pal2nal.cmds
for i in pep_aln/*.pal; do
j=$(basename "$i")
echo "pal2nal.pl $i raw_ogs/cds/${j/.pal/.fa} -output fasta > cds_aln/${j/.pal/.nal}" >> pal2nal.cmds
done
xargs -t -P 8 -I cmd -a pal2nal.cmds bash -c "cmd"