Commit 106514c2 authored by Pauline Pommeret's avatar Pauline Pommeret

Adding supervised learning-related features

parent 9a140f0f
......@@ -2,8 +2,7 @@
"""
Main module of the Xylok project
Author: Pauline Pommeret
Jonas Senizergues
Author: Pauline Pommeret, Jonas Senizergues
Defines:
- :py:class:`Sequence`
......@@ -79,9 +78,17 @@ class Sequence(object):
# self.sequence using self.trx_scale_path
self.trx = {}
# Stores md_parameters for computation
self.md_parameters = md_parameters
# Populates some of the attributes
self.load_fasta(fasta)
self.load_md(md_parameters)
def do_analysis(self):
"""
Compute complex data from parameters.
"""
self.load_md()
self.load_trx()
def get(self, name, default):
......@@ -149,7 +156,7 @@ class Sequence(object):
self.accession = str(parsed_sequence.id.split("|")[3])
self.description = str(parsed_sequence.description)
def load_md(self, md_parameters):
def load_md(self):
# XXX
"""
Loads MD files and populates:
......@@ -158,7 +165,6 @@ class Sequence(object):
Parameters:
- ``self``
- ``md_parameters`` : dictionary {..., "helicoidal param": path, ...}
Uses:
- :py:meth:`lib.file_tools:load_md_data`
......@@ -177,7 +183,7 @@ class Sequence(object):
# -*- Populating self.mdd -*- #
# Iterates on every helicoidal parameter file
for (helicoidal_parameter, path) in md_parameters.iteritems():
for (helicoidal_parameter, path) in self.md_parameters.iteritems():
# Loads the file
_md_params[helicoidal_parameter] = file_tools.load_md_data(path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment