Skip to content

Commit 4829175

Browse files
authored
implement db creation
Fixed an error introduced during refactoring, where the implementation of the uniprot database creation was left out
1 parent 8b10ce4 commit 4829175

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

run.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ select process_option in "${options[@]}"; do [[ "$process_option" ]] && break; d
3030
[ "$process_option" == "Exit" ] && { echo "Exiting."; exit 0; }
3131

3232
uniprot_files=("uniprotkb/uniprot_sprot.fasta.gz" "uniprotkb/uniprot_trembl.fasta.gz")
33+
dbfile="$mdir/uniprotkb/uniprot_sequences.db"
3334

3435
if [[ "$process_option" == "Process PDBs matching UniProt" ]]; then
3536
if [[ ! -f "$dbfile" ]]; then
@@ -42,10 +43,7 @@ if [[ "$process_option" == "Process PDBs matching UniProt" ]]; then
4243
fi
4344
done
4445
if (( found_files == 0 )); then
45-
echo "Uniprot files are missing. These are necessary to match PDBs with UniProt."
46-
echo "You can download the required files from https://www.uniprot.org/downloads and place them in the 'uniprotkb' directory."
47-
echo "The required files are uniprot_sprot.fasta.gz (SwissProt only), which expands from a 92 MB .gz file to a 250 MB database,"
48-
echo "or both uniprot_sprot.fasta.gz and uniprot_trembl.fasta.gz (SwissProt+TrEMBL), which expand from 62 GB .gz files to a ~191 GB database."
46+
echo "No Uniprot files found. Download from https://www.uniprot.org/downloads and place in 'uniprotkb' directory. Required: uniprot_sprot.fasta.gz (350MB uncompressed); Optional: uniprot_sprot.fasta.gz + uniprot_trembl.fasta.gz (250GB uncompressed)."
4947
exit 1
5048
else
5149
echo "Creating database."
@@ -54,8 +52,8 @@ if [[ "$process_option" == "Process PDBs matching UniProt" ]]; then
5452
# Only process the files found
5553
for filepath in "${uniprot_files[@]}"; do
5654
if [[ -f "$mdir/$filepath" ]]; then
57-
# logic for creating database here...
5855
echo "Processing $filepath..."
56+
gunzip -c "$mdir/$filepath" | ./bin/fasta_to_sqlite
5957
fi
6058
done
6159

0 commit comments

Comments
 (0)