-
Notifications
You must be signed in to change notification settings - Fork 16
107 lines (107 loc) · 5.93 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
schedule:
- cron: '00 04 * * 1' # 4am every Monday
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-18.04
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: dmpfold
- run: pwd
- run: echo ~
- run: sudo apt-get install -y hhsuite # Install HH-suite
- run: git clone --recursive https://github.com/soedinglab/CCMpred.git # Install CCMpred
- run: |
cd CCMpred
cmake -DWITH_CUDA=OFF .
make
cd ..
- run: sudo apt-get install -y freecontact # Install FreeContact
- run: conda info -a
- run: conda install -y numpy scipy # Install NumPy and SciPy
- run: |
export KEY_MODELLER=${{ secrets.MODELLERKEY }}
conda install -y modeller -c salilab # Install MODELLER
- run: conda install -y pytorch torchvision cpuonly -c pytorch # Install Pytorch
- run: conda list
- run: which -a python3
- run: python3 -c "import torch"
- run: curl ${{ secrets.DEPENDENCYURL }}/cns_solve_1.3.tgz -o cns_solve_1.3.tgz # Install CNS; this is a version with fixes outlined in the README
- run: tar -zxvf cns_solve_1.3.tgz
- run: |
cd cnsfiles # Download and patch CNS scripts
sh installscripts.sh
cd ..
- run: git clone https://github.com/weizhongli/cdhit.git # Install CD-HIT
- run: |
cd cdhit
make
cd ..
- run: sudo apt-get install -y csh # Install csh shell
- run: sudo apt-get install -y libgfortran3 # Install libgfortran3
- run: curl ${{ secrets.DEPENDENCYURL }}/ncbi_legacy.tgz -o ncbi_legacy.tgz # Install legacy NCBI BLAST software
- run: tar -zxvf ncbi_legacy.tgz
- run: |
cd src # Test compilation of source files
make
ls
cd ..
- run: sed -i "s/set dmpfolddir = ~\/DMPfold/set dmpfolddir = ~\/work\/DMPfold\/DMPfold/" seq2maps.csh # Modify installed locations
- run: sed -i "s/set ccmpreddir = ~\/CCMpred\/bin/set ccmpreddir = .\/CCMpred\/bin/" seq2maps.csh
- run: sed -i "s/set freecontactcmd = ~\/freecontact\/bin\/freecontact/set freecontactcmd = freecontact/" seq2maps.csh
- run: sed -i "s/set ncbidir = ~\/blast\/bin/set ncbidir = ~\/work\/DMPfold\/DMPfold\/ncbi_legacy/" seq2maps.csh
- run: sed -i "s/set dmpfolddir = ~\/DMPfold/set dmpfolddir = ~\/work\/DMPfold\/DMPfold/" aln2maps.csh
- run: sed -i "s/set ccmpreddir = ~\/CCMpred\/bin/set ccmpreddir = .\/CCMpred\/bin/" aln2maps.csh
- run: sed -i "s/set freecontactcmd = ~\/freecontact\/bin\/freecontact/set freecontactcmd = freecontact/" aln2maps.csh
- run: sed -i "s/set ncbidir = ~\/blast\/bin/set ncbidir = ~\/work\/DMPfold\/DMPfold\/ncbi_legacy/" aln2maps.csh
- run: sed -i "s/set dmpfolddir = ~\/dmpfold/set dmpfolddir = ~\/work\/DMPfold\/DMPfold/" bin/runpsipredandsolvwithdb
- run: sed -i "s/set ncbidir = ~\/blast\/bin/set ncbidir = ~\/work\/DMPfold\/DMPfold\/ncbi_legacy/" bin/runpsipredandsolvwithdb
- run: sed -i "s/dmpfolddir=~\/DMPfold/dmpfolddir=~\/work\/DMPfold\/DMPfold/" run_dmpfold.sh
- run: sed -i "s/source ~\/cns_solve_1.3\/.cns_solve_env_sh/source ~\/work\/DMPfold\/DMPfold\/cns_solve_1.3\/cns_solve_env_sh/" run_dmpfold.sh
- run: sed -i "s/dmpfolddir=~\/DMPfold/dmpfolddir=~\/work\/DMPfold\/DMPfold/" predict_tmscore.sh
- run: sed -i "s/cdhitcmd=~\/cdhit\/cd-hit/cdhitcmd=.\/cdhit\/cd-hit/" predict_tmscore.sh
- run: sed -i "s/\$HHBIN\/hhblits/#\$HHBIN\/hhblits/" seq2maps.csh # For autobuild, eliminate HHblits step and use existing a3m file
- run: cp example/PF10963.a3m .
- run: ulimit -s unlimited
- run: csh seq2maps.csh example/PF10963.fasta # Generate map and 21c files from single sequence
- run: du -h PF10963.* # Check files generated okay
- run: bash run_dmpfold.sh example/PF10963.fasta PF10963.21c PF10963.map ./PF10963_fasta 3 5 # Run DMPfold
- run: head PF10963_fasta/final_1.pdb
- run: bash predict_tmscore.sh example/PF10963.fasta PF10963.aln PF10963_fasta/final_1.pdb PF10963_fasta/rawdistpred.1 # Predict TM-score
- run: curl https://zhanglab.ccmb.med.umich.edu/TM-align/TMalign.gz | gunzip > TMalign # Download TMalign
- run: chmod +x TMalign
- run: ./TMalign PF10963_fasta/final_1.pdb example/3FGX.pdb # Check model accuracy
- run: |
tma=$(./TMalign PF10963_fasta/final_1.pdb example/3FGX.pdb | grep "if normalized by length of Chain_1" | sed -E 's/^.{10}//' | sed -E 's/.{37}$//')
if (( $(echo "$tma >= 0.5" | bc -l) )); then echo "Correct fold, TMalign score $tma"; else echo "Incorrect fold, TMalign score $tma"; exit 1; fi # Throw an error if the model is the wrong fold
- run: rm PF10963.*
- run: mkdir temp1 temp2 # For the run from an alignment we also check that it works when run in another directory
- run: |
cd temp1
csh ../aln2maps.csh ../example/PF10963.aln # Generate map and 21c files from alignment
du -h PF10963.* # Check files generated okay
cd ..
- run: |
cd temp2
bash ../run_dmpfold.sh ../example/PF10963.fasta ../temp1/PF10963.21c ../temp1/PF10963.map ../PF10963_aln 3 5 # Run DMPfold on new inputs
cd ..
- run: head PF10963_aln/final_1.pdb
- run: ./TMalign PF10963_aln/final_1.pdb example/3FGX.pdb # Check model accuracy
- run: |
tma=$(./TMalign PF10963_aln/final_1.pdb example/3FGX.pdb | grep "if normalized by length of Chain_1" | sed -E 's/^.{10}//' | sed -E 's/.{37}$//')
if (( $(echo "$tma >= 0.5" | bc -l) )); then echo "Correct fold, TMalign score $tma"; else echo "Incorrect fold, TMalign score $tma"; exit 1; fi # Throw an error if the model is the wrong fold