-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We do not ask for the Annotation script but use MC-Annotate as default on master, to keep full backwards-compatibility.
- Loading branch information
Showing
25 changed files
with
72,992 additions
and
212 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
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
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
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,25 @@ | ||
name 1y26 | ||
length 71 | ||
seq CGCUUCAUAUAAUCCUAAUGAUAUGGUUUGGGAGUUUCUACCAAGAGCCUUAAACUCUUGAUUAUGAAGUG | ||
seq_ids | ||
define s0 1 9 63 71 | ||
define m1 10 12 | ||
define s2 13 19 27 33 | ||
define h0 20 26 | ||
define m2 34 41 | ||
define s3 42 47 55 60 | ||
define h1 48 54 | ||
define m0 61 62 | ||
connect s0 m1 m0 | ||
connect s2 h0 m1 m2 | ||
connect s3 h1 m0 m2 | ||
coord h1 40.3992211551000011 -21.0722649836000002 -8.7858799860799994 56.2509994507000002 -31.7719993591000005 -10.3870000839000003 | ||
coord s3 31.5987607900999983 -17.2471501278999995 -0.4056888140200000 40.3992211551000011 -21.0722649836000002 -8.7858799860799994 | ||
coord s2 24.2469227276999995 -28.5048147442000008 -0.4624864930680000 37.9464206031000018 -34.4588356333999997 -3.7175804801000001 | ||
coord h0 37.9464206031000018 -34.4588356333999997 -3.7175804801000001 50.0929985045999970 -23.0610008240000006 -16.1790008544999999 | ||
coord s0 2.4105633276299998 0.1812946855950000 3.8104106076800002 19.2708715511000008 -11.2603784822000001 4.3801360791599997 | ||
twist s3 -0.5945111509714611 0.2819655992687657 -0.7530284803375131 0.7082218070660000 0.0975338596706000 0.6992202930510000 | ||
twist s2 0.3326392289800000 0.2716426164470000 0.9030843993080000 -0.2406093171120000 -0.0231200541610000 -0.9703466492000000 | ||
twist s0 0.0845426612698000 0.0751065442191000 -0.9935851978769999 -0.5560404110783073 -0.8101227737674702 0.1857959974570234 | ||
project 1.0 1.0 1.0 | ||
|
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
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 |
---|---|---|
@@ -1,20 +1,41 @@ | ||
from builtins import object | ||
import json | ||
import os | ||
import forgi | ||
import os.path | ||
import logging | ||
import appdirs | ||
|
||
class Configuration(object): | ||
mids_method="template" | ||
#mids_method="basenormals" | ||
base_dir = os.path.expanduser('.') | ||
#data_base_dir = os.path.expanduser('~/data/ernwin/processed') | ||
#pdb_base_dir = os.path.expanduser('~/data/ernwin/pdb') | ||
stem_fragment_dir = os.path.join(base_dir, 'forgi/data') | ||
#lric_stats_fn = os.path.join(base_dir, 'fess/stats/temp.energy') | ||
#template_residue_fn = os.path.join(base_dir, 'fess/stats/residue_template.pdb') | ||
#longrange_contact_stats_fn = os.path.join(base_dir, 'fess/stats/temp.longrange.contact') | ||
log = logging.getLogger(__name__) | ||
|
||
#test_input_dir = os.path.expanduser('~/data/ernwin/processed/') | ||
#test_output_dir = os.path.join(base_dir, "test_output") | ||
#sampling_output_dir = 'best' | ||
#barnacle_dir = '/scr/plastilin/pkerp/apps/Barnacle' | ||
#stem_library = dict() | ||
dirs = appdirs.AppDirs("forgi", "TBI") | ||
|
||
def read_config(): | ||
config = {} | ||
for directory in [dirs.site_config_dir, dirs.user_config_dir]: | ||
filename = os.path.join(directory, "config.json") | ||
try: | ||
with open(filename) as f: | ||
conf = json.load(f) | ||
except (OSError, IOError): | ||
log.debug("No configuration file present at %s", filename) | ||
pass | ||
else: | ||
log.debug("Reading configuration from %s", filename) | ||
config.update(conf) | ||
|
||
return config | ||
|
||
def set_config(key, value): | ||
filename = os.path.join(dirs.user_config_dir, "config.json") | ||
try: | ||
with open(filename) as f: | ||
config = json.load(f) | ||
except (OSError, IOError): | ||
config = {} | ||
config[key]=value | ||
try: | ||
os.makedirs(dirs.user_config_dir) | ||
except OSError: | ||
pass | ||
with open(filename, "w") as f: | ||
json.dump(config, f) | ||
log.info("Configuration file %s updated", filename) |
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
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,29 @@ | ||
from builtins import str | ||
import collections | ||
import logging | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
RESID = collections.namedtuple("complete_resid", ["chain", "resid"]) | ||
|
||
def resid_to_str(resid): | ||
if resid.chain is not None: | ||
out="{}:{}".format(resid.chain, resid.resid[1]) | ||
else: | ||
out=str(resid.resid[1]) | ||
if resid.resid[2]!=" ": | ||
out+=".{}".format(resid.resid[2]) | ||
return out | ||
|
||
def resid_from_str(resstr): | ||
resstr = str(resstr) # Make sure we use future's newstring on python2 | ||
if ":" in resstr: | ||
chain, resid = resstr.split(":") | ||
else: | ||
resid=resstr | ||
log.debug("No chain given in string {!r}".format(resstr)) | ||
chain=str('A') | ||
idparts=resid.split(".") | ||
if len(idparts)==1: | ||
idparts.append(" ") | ||
return RESID(chain, (' ', int(idparts[0]), idparts[1])) |
Oops, something went wrong.