Showing
4 changed files
with
18 additions
and
9 deletions
This diff is collapsed. Click to expand it.
... | @@ -12,7 +12,6 @@ done | ... | @@ -12,7 +12,6 @@ done |
12 | 12 | ||
13 | PROCESS_TO_KILL="statistics.py" | 13 | PROCESS_TO_KILL="statistics.py" |
14 | PROCESS_LIST=`ps ax | grep -Ei ${PROCESS_TO_KILL} | grep -Eiv '(grep|vi statistics.py)' | awk ' { print $1;}'` | 14 | PROCESS_LIST=`ps ax | grep -Ei ${PROCESS_TO_KILL} | grep -Eiv '(grep|vi statistics.py)' | awk ' { print $1;}'` |
15 | -KILLED= | ||
16 | for KILLPID in $PROCESS_LIST; do | 15 | for KILLPID in $PROCESS_LIST; do |
17 | if [ ! -z $KILLPID ];then | 16 | if [ ! -z $KILLPID ];then |
18 | kill -9 $KILLPID | 17 | kill -9 $KILLPID | ... | ... |
... | @@ -3,8 +3,8 @@ import subprocess, os, sys | ... | @@ -3,8 +3,8 @@ import subprocess, os, sys |
3 | 3 | ||
4 | # Put a list of problematic chains here, they will be properly deleted and recomputed | 4 | # Put a list of problematic chains here, they will be properly deleted and recomputed |
5 | problems = [ | 5 | problems = [ |
6 | -"4v9n_1_DA_1-2879", | 6 | + "1k73_1_A", |
7 | -"4v9n_1_DA_148-2875" | 7 | + "1k73_1_B" |
8 | ] | 8 | ] |
9 | 9 | ||
10 | path_to_3D_data = sys.argv[1] | 10 | path_to_3D_data = sys.argv[1] |
... | @@ -15,6 +15,7 @@ for p in problems: | ... | @@ -15,6 +15,7 @@ for p in problems: |
15 | print() | 15 | print() |
16 | print() | 16 | print() |
17 | print() | 17 | print() |
18 | + homology = ('-' in p) | ||
18 | 19 | ||
19 | # Remove the datapoints files and 3D files | 20 | # Remove the datapoints files and 3D files |
20 | subprocess.run(["rm", '-f', path_to_3D_data + f"/rna_mapped_to_Rfam/{p}.cif"]) | 21 | subprocess.run(["rm", '-f', path_to_3D_data + f"/rna_mapped_to_Rfam/{p}.cif"]) |
... | @@ -25,16 +26,25 @@ for p in problems: | ... | @@ -25,16 +26,25 @@ for p in problems: |
25 | # Find more information | 26 | # Find more information |
26 | structure = p.split('_')[0] | 27 | structure = p.split('_')[0] |
27 | chain = p.split('_')[2] | 28 | chain = p.split('_')[2] |
28 | - families = [ f.split('.')[1] for f in files ] # The RFAM families this chain has been mapped onto | 29 | + if homology: |
29 | - | 30 | + families = [ f.split('.')[1] for f in files ] # The RFAM families this chain has been mapped onto |
30 | - # Delete the chain from the database, and the associated nucleotides and re_mappings, using foreign keys | 31 | + |
31 | - for fam in families: | 32 | + # Delete the chain from the database, and the associated nucleotides and re_mappings, using foreign keys |
32 | - command = ["sqlite3", "results/RNANet.db", f"PRAGMA foreign_keys=ON; delete from chain where structure_id=\"{structure}\" and chain_name=\"{chain}\" and rfam_acc=\"{fam}\";"] | 33 | + for fam in families: |
34 | + command = ["sqlite3", "results/RNANet.db", f"PRAGMA foreign_keys=ON; delete from chain where structure_id=\"{structure}\" and chain_name=\"{chain}\" and rfam_acc=\"{fam}\";"] | ||
35 | + print(' '.join(command)) | ||
36 | + subprocess.run(command) | ||
37 | + | ||
38 | + command = ["python3.8", "RNAnet.py", "--3d-folder", path_to_3D_data, "--seq-folder", path_to_seq_data, "-r", "20.0", "--extract", "--only", p] | ||
39 | + else: | ||
40 | + # Delete the chain from the database, and the associated nucleotides and re_mappings, using foreign keys | ||
41 | + command = ["sqlite3", "results/RNANet.db", f"PRAGMA foreign_keys=ON; delete from chain where structure_id=\"{structure}\" and chain_name=\"{chain}\" and rfam_acc is null;"] | ||
33 | print(' '.join(command)) | 42 | print(' '.join(command)) |
34 | subprocess.run(command) | 43 | subprocess.run(command) |
35 | 44 | ||
45 | + command = ["python3.8", "RNAnet.py", "--3d-folder", path_to_3D_data, "--seq-folder", path_to_seq_data, "-r", "20.0", "--no-homology", "--extract", "--only", p] | ||
46 | + | ||
36 | # Re-run RNANet | 47 | # Re-run RNANet |
37 | - command = ["python3.8", "RNAnet.py", "--3d-folder", path_to_3D_data, "--seq-folder", path_to_seq_data, "-r", "20.0", "--extract", "--only", p] | ||
38 | print('\n',' '.join(command),'\n') | 48 | print('\n',' '.join(command),'\n') |
39 | subprocess.run(command) | 49 | subprocess.run(command) |
40 | 50 | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment