Skip to content
Snippets Groups Projects
Commit bdb256a9 authored by Fabrice Allain's avatar Fabrice Allain
Browse files

changed default cutoff to 8 in contactdef. We want to give the highest...

changed default cutoff to 8 in contactdef. We want to give the highest precision values as in CASD...
parent 92f7149b
No related branches found
No related tags found
No related merge requests found
......@@ -184,10 +184,9 @@ class AriaEcCommand:
parser.add_argument("--merge", nargs="+", dest="merge",
choices=self.contact_types,
help="Merge given contact types with other maps")
parser.add_argument("--nofilter", dest="nofilter", action="store_true",
default=None, help="Do not use contact list "
"filter and select top n "
"contacts")
parser.add_argument("--filter", dest="nofilter", action="store_true",
default=False, help="Use contact list filter "
"and top n contacts selection")
parser.add_argument("--onlyreport", dest="onlyreport",
action="store_true",
default=False, help="Generate only report file")
......
......@@ -6,10 +6,9 @@ scsc_min_file:
ariaproject_template:
[contactdef]
; Contact definition section used to define contactmap from pdb file. This
; threshold is volontary low since it define the base if other cutoff are
; given (ca_ca, ...)
default_cutoff: 5.0
; Contact definition section used to define contactmap from pdb file.
; Decrease this threshold if using other cutoff (ca_ca, ...)
default_cutoff: 8.0
; Add contact cutoff folowwing the syntax atm1_atm2
;ca_ca: 7.0
;cb_cb: 7.0
......
......@@ -47,11 +47,9 @@ class AriaEcContactMap(object):
# Load Sequence file
self.protein.set_aa_sequence(self.settings.contactmap.args.get("seq", None))
# Load secondary structure prediction file
ss_file = self.settings.main.config["ss_dist_file"] if \
self.settings.main.config["ss_dist_file"] else None
self.protein.set_sec_struct(self.settings.contactmap.args.get("sspred",
None),
ss_file,
ssdist_filename=self.settings.ssdist,
ssidx=self.settings.contactmap.args.get(
"ssidx", False))
# ---------------------------- Processing ---------------------------- #
......@@ -72,7 +70,7 @@ class AriaEcContactMap(object):
self.reftype = fo.filetype
self.refname = fo.filename if type(self.outprefix) != list \
else self.outprefix[idx]
if not self.settings.contactmap.args.get("nofilter"):
if self.settings.contactmap.args.get("filter"):
self.filter(fo.mapdict, fo.filetype, fo.contactlist,
self.protein, clashlist=fo.clashlist,
outprefix=self.outprefix[idx] if type(
......@@ -158,7 +156,7 @@ class AriaEcContactMap(object):
# TODO: only one function for output files
# Write contact list in txt file
refmap.report(cmpmap, scoremap=scoremap, outprefix=prefix,
refmap.report(cmpmap, scoremap=scoremap,
outdir=outdir,
plotag=not self.settings.contactmap.args.get(
"onlyreport"),
......
......@@ -312,7 +312,9 @@ class ProteinMap(Map):
def report(self, cmpmap, scoremap=None, outprefix="", outdir="", plotdir="",
plot_ext="pdf", plotag=True):
reportpath = "%s/%s.mapreport" % (outdir, outprefix)
filename = ".".join((outprefix, "mapreport")) if outprefix else \
"mapreport"
reportpath = "%s/%s" % (outdir, filename)
logger.info("Generate map report file (%s)" % reportpath)
with open(reportpath, 'w') as reportf:
y_true = list(self.values.astype(int).flat)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment