Skip to content
This repository was archived by the owner on Aug 26, 2019. It is now read-only.

Commit

Permalink
v2.1 Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
HAShihab committed Dec 12, 2012
1 parent b7af65e commit b19ba85
Show file tree
Hide file tree
Showing 5 changed files with 373 additions and 145 deletions.
21 changes: 5 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,9 @@ You will need the following packages installed on your system:

* Our pre-computed database, including instructions on how to create/upload the
database, can be found at ftp://supfam2.cs.bris.ac.uk/FATHMM/database
* Create a configuration file named "config.ini" and enter the following (substituting
the required information with your credentials):

```
[DATABASE]
HOST = [MySQL Host]
PORT = [MySQL Port]
USER = [MySQL Username]
PASSWD = [MySQL Password]
DB = fathmm
```

* Download "fathmm.py" from ./cgi-bin
* Download "fathmm.py" and "config.ini" from the ./cgi-bin folder
* Amend "config.ini", substituting the required information with your MySQL
credentials:

## Running our Software

Expand Down Expand Up @@ -55,6 +45,8 @@ P43026 L441P
P35555 N548I,E1073K,C2307S
```

## Optional Parameters

The --help parameter can be used to view additional program parameters. In brief,
there are two optional parameters:

Expand Down Expand Up @@ -88,7 +80,4 @@ KW : UniProtKB KeyWords

## Known Issues:

* Our predictions appear to be derived/written slower than previous version(s) of our
software - we are looking into this issue and will provide an update as soon as possible.

We welcome any comments and/or suggestions that you may have regarding our software and server - please send an email directly to fathmm@biocompute.org.uk
78 changes: 1 addition & 77 deletions cgi-bin/fathmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def process_record(dbSNP, protein, substitution):
Tag = "DAMAGING"
else:
# "Cancer-Associated" predictions ...
Tag = "NON-CANCER/PASSENGER"
Tag = "PASSENGER/OTHER"

if float(Score) < -0.50:
Tag = "CANCER"
Expand Down Expand Up @@ -217,13 +217,6 @@ def process_record(dbSNP, protein, substitution):
metavar = "<PHENO>",
default = "DO"
)
parser.add_option(
"--HTML",
dest = "HTML",
help = SUPPRESS_HELP,
action = "store_true",
default = False
) # web-based parameter used to write HTML predictions - hidden from program user(s)

(options, args) = parser.parse_args()

Expand Down Expand Up @@ -321,72 +314,3 @@ def process_record(dbSNP, protein, substitution):

# move predictions to the requested location
os.system("mv /tmp/" + os.path.basename(os.path.splitext(options.input)[0]) + ".tmp " + options.output)

#
# WRITE WEB-BASED PREDICTIONS (IF REQUESTED)
#

if options.HTML:
HTM = open(os.path.splitext(options.output)[0] + ".htm", "w")
HTM.write(
"""
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>dbSNP ID</th>
<th>Protein ID</th>
<th>Substitution</th>
<th>Prediction</th>
<th>Score</th>
<th>Further Information</th>
</tr>
</thead>
<tbody>
"""
)

for record in open(options.output, "r"):
if record and not record.startswith("#"):
record = record.split("\t")

# prediction formatting
if record[4] in [ "DAMAGING", "CANCER" ]:
record[4] = "<p class='text-error'>%s</p>"% record[4]
else:
record[4] = "<p class='text-success'>%s</p>"% record[4]

# warning/phenotypes formatting
if record[7].strip():
record[6] = record[7]
else:
if record[6].strip():
record[6] = "<ul>" + "".join([ "<li>" + x + "</li>" for x in record[6].split("|") ]) + "</ul>"

HTM.write(
"""
<tr>
<td>""" + record[0] + """</td>
<td>""" + record[1] + """</td>
<td>""" + record[2] + """</td>
<td>""" + record[3] + """</td>
<td>""" + record[4] + """</td>
<td>""" + record[5] + """</td>
<td>""" + record[6] + """</td>
</tr>
"""
)

HTM.write(
"""
</tbody>
</table>
<script>
document.getElementById("info").setAttribute("class", "btn btn-primary btn-large pull-right");
document.getElementById("info").innerHTML = "Download Predictions &raquo;";
clearInterval(Refresh);
</script>
"""
)
Loading

0 comments on commit b19ba85

Please sign in to comment.