Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added checks for existing output directories, fixed typos #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Ab_epitope/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OAS_download

data/epitope_all.fasta

result/

data/dataset

data/raw_data/OAS_memory_paired.csv
27 changes: 21 additions & 6 deletions Ab_epitope/data_clean_for_LM.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
#!/bin/bash
python mBLM/script/merge_raw_data.py
python mBLM/script/df2fasta.py mBLM/result/memory_paired_Abs.csv mBLM/result/memory_paired_Abs.fasta

# clustering
output_prefix=mBLM/result/cluster/
f=mBLM/result/memory_paired_Abs.fasta
name=memory_paired_Abs

echo "Checking if $output_prefix exists"
if [ ! -d "$output_prefix" ]; then
echo "Creating output directory"
mkdir -p "$output_prefix"
fi

python mBLM/script/merge_raw_data.py
python mBLM/script/df2fasta.py mBLM/result/memory_paired_Abs.csv mBLM/result/memory_paired_Abs.fasta


for x in 0.5 0.6
do
cd-hit -i $f -o $output_prefix$name$x -c $x -M 32000 -d 0 -T 32 -n 3 -aL 0.8 -s 0.95 -uS 0.2 -sc 1 -sf 1
cd-hit -i $f -o $output_prefix$name$x -c $x -M 32000 -d 0 -T 32 -n 3 -aL 0.8 -s 0.95 -uS 0.2 -sc 1 -sf 1
done

for x in 0.7 0.8 0.9 0.95
do
cd-hit -i $f -o $output_prefix$name$x -c $x -M 32000 -d 0 -T 32 -n 5 -aL 0.8 -s 0.95 -uS 0.2 -sc 1 -sf 1
cd-hit -i $f -o $output_prefix$name$x -c $x -M 32000 -d 0 -T 32 -n 5 -aL 0.8 -s 0.95 -uS 0.2 -sc 1 -sf 1
done


# add cluster id to dataset

python mBLM/script/add_clstr2df.py -i mBLM/result/memory_paired_Abs.csv -o mBLM/result/memory_paired_Abs_final.csv


datasetdir=data/dataset
echo "Checking if $datasetdir exists"
if [ ! -d "$datasetdir" ]; then
echo "Creating output directory"
mkdir "$datasetdir"
fi

# split dataset
python mBLM/script/split_dataset.py -i mBLM/result/memory_paired_Abs_final.csv -o data/dataset/memory_paired_Abs
11 changes: 9 additions & 2 deletions Ab_epitope/data_clean_for_epitope.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ fasta_prefix=./data/
output_prefix=./result/cluster/
f=epitope_all.fasta
name=`basename $f ".fasta"`

echo "Checking if $output_prefix exists"
if [ ! -d "$output_prefix" ]; then
echo "Creating output directory"
mkdir "$output_prefix"
fi

for x in 0.8 0.9 0.92 0.95 0.98 0.99 0.995
do
cd-hit -i $f -o $output_prefix$name$x$fasta_suffix -c $x -M 32000 -d 0 -T 8 -n 5 -aL 0.8 -s 0.95 -uS 0.2 -sc 1 -sf 1
cd-hit -i $fasta_prefix$f -o $output_prefix$name$x$fasta_suffix -c $x -M 32000 -d 0 -T 8 -n 5 -aL 0.8 -s 0.95 -uS 0.2 -sc 1 -sf 1
done


Expand All @@ -23,4 +30,4 @@ python ./script/add_clstr2df.py
# split dataset
python ./script/split_dataset.py
# remove repeat fasta sequence
pytho script/rm_fas_repeats.py result/epitope_clean.fasta result/epitope_clean_v2.fasta
python script/rm_fas_repeats.py result/epitope_clean.fasta result/epitope_clean_v2.fasta