-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# INSTALL | ||
|
||
ansible-playbook -i hosts install.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
|
||
app_location: ~/test_ansible/Applications | ||
data_location: ~/test_ansible/Data | ||
uniref_db: uniref90 | ||
#uniref_db: uniref50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[all] | ||
localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- name: Install dompred | ||
hosts: all | ||
roles: | ||
- blast | ||
- dompred | ||
vars_files: | ||
- ./config_vars.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
- name: Check if we the psiblast is installed | ||
stat: path={{ app_location }}/blast-2.2.26/bin/blastpgp | ||
register: blastpgp_exist | ||
|
||
- name: Download BLAST+ tarball | ||
when: blastpgp_exist.stat.exists == False | ||
get_url: | ||
url: ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.26/blast-2.2.26-x64-linux.tar.gz | ||
dest: "{{ app_location }}/" | ||
timeout: 120 | ||
register: get_url_result | ||
|
||
- name: unarchive blast | ||
when: blastpgp_exist.stat.exists == False | ||
unarchive: | ||
src: "{{ app_location }}/blast-2.2.26-x64-linux.tar.gz" | ||
dest: "{{ app_location }}/" | ||
remote_src: yes | ||
|
||
- name: remove blast+ tar.gz | ||
when: blastpgp_exist.stat.exists == False | ||
ansible.builtin.file: | ||
state: absent | ||
path: "{{ app_location }}/blast-2.2.26-x64-linux.tar.gz" | ||
|
||
- name: Check if we have uniref db | ||
stat: | ||
path: "{{ data_location }}/uniref/{{ uniref_db }}.fasta" | ||
get_md5: false | ||
get_checksum: false | ||
register: uniref_exist | ||
|
||
- name: Make uniref dir | ||
file: | ||
path: "{{ data_location }}/uniref/" | ||
mode: uog+rw | ||
state: directory | ||
when: uniref_exist.stat.exists == False | ||
|
||
- name: Download uniref | ||
when: uniref_exist.stat.exists == False | ||
get_url: | ||
url: ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/{{ uniref_db }}/{{ uniref_db }}.fasta.gz | ||
dest: "{{ data_location }}/uniref/" | ||
timeout: 120 | ||
register: get_url_result | ||
|
||
- name: unzip uniref | ||
shell: cd {{ data_location }}/uniref; /bin/gunzip {{ uniref_db }}.fasta.gz | ||
when: uniref_exist.stat.exists == False | ||
|
||
- name: Check if we have db formatted | ||
stat: | ||
path: "{{ data_location }}/uniref/{{ uniref_db }}.fasta.00.phr" | ||
get_md5: false | ||
get_checksum: false | ||
register: formatdb_exist | ||
|
||
- name: Run formatdb | ||
shell: cd {{ data_location }}/uniref; {{ app_location }}/blast-2.2.26/bin/formatdb -i {{ uniref_db }}.fasta -p T | ||
when: formatdb_exist.stat.exists == False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
|
||
- name: "install gnuplot" | ||
dnf: | ||
pkg: gnuplot | ||
state: latest | ||
become_user: root | ||
become_method: sudo | ||
become: true | ||
|
||
- name: Check if dompred is present | ||
stat: path={{ app_location }}/dompred/parseDS.pl | ||
register: dompred_exist | ||
|
||
- name : Check Out dompred from git | ||
when: dompred_exist.stat.exists == False | ||
git: | ||
repo: https://github.com/psipred/dompred.git | ||
dest: "{{ app_location }}/dompred" | ||
clone: yes | ||
force: yes | ||
|
||
- name: Download data files | ||
when: dompred_exist.stat.exists == False | ||
get_url: | ||
url: http://bioinfadmin.cs.ucl.ac.uk/downloads/dompred_data/dompred_data.tar.gz | ||
dest: "{{ app_location }}/dompred/" | ||
timeout: 120 | ||
register: get_url_result | ||
|
||
- name: untar dompred data | ||
when: dompred_exist.stat.exists == False | ||
unarchive: | ||
src: "{{ app_location }}/dompred/dompred_data.tar.gz" | ||
dest: "{{ app_location }}/dompred/" | ||
remote_src: yes | ||
|
||
- name: remove tar.gz | ||
when: dompred_exist.stat.exists == False | ||
ansible.builtin.file: | ||
state: absent | ||
path: "{{ app_location }}/dompred/dompred_data.tar.gz" | ||
|
||
- name: compile DomSSEA | ||
when: dompred_exist.stat.exists == False | ||
shell: cd {{ app_location }}/dompred/src; javac DomSSEA.java | ||
|
||
# - name: update blast location | ||
# ansible.builtin.lineinfile: | ||
# path: "{{ app_location }}/dompred/" | ||
# regexp: "^my .ncbidir =" | ||
# line: "my $ncbidir = '{{ app_location}}/blast-2.2.26/bin';" | ||
|
||
# - name: update blastdb location | ||
# ansible.builtin.lineinfile: | ||
# path: "{{ app_location }}/dompred/" | ||
# regexp: "^my .dbname =" | ||
# line: "my $dbname = '{{ data_location }}/uniref/uniref50.fasta';" |