Skip to content

Commit

Permalink
Revert "Implement implied columns"
Browse files Browse the repository at this point in the history
This reverts commit 6f0df60.
  • Loading branch information
nsheff committed May 2, 2017
1 parent 94215de commit 6e78c6d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
15 changes: 0 additions & 15 deletions looper/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,21 +1249,6 @@ def set_file_paths(self, override=False):
setattr(self, col, self.locate_data_source(col))
self.derived_cols_done.append(col)

if hasattr(self.prj, "implied_columns"):
_LOGGER.debug(self.prj["implied_columns"])
for base_col in self.prj["implied_columns"]:
try:
base_col_value = self[base_col]
_LOGGER.debug(self.prj["implied_columns"][base_col][self[base_col]])
for new_col in self.prj["implied_columns"][base_col][self[base_col]].keys():
val_to_append = self.prj["implied_columns"][base_col][self[base_col]][new_col]
_LOGGER.debug(new_col)

setattr(self, new_col, val_to_append)
except KeyError: # that value was not mapped
value_to_append = None


# parent
self.results_subdir = self.prj.metadata.results_subdir
self.paths.sample_root = _os.path.join(self.prj.metadata.results_subdir, self.sample_name)
Expand Down
8 changes: 0 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@
src1: "{basedir}/data/{sample_name}{col_modifier}.txt"
src3: "{basedir}/data/{sample_name}.txt"
src2: "{basedir}/data/{sample_name}-bamfile.bam"
implied_columns:
sample_name:
a:
genome: hg38
phenome: hg72
b:
genome: hg38
""".splitlines(True)
# Will populate the corresponding string format entry in project config lines.
DERIVED_COLNAMES = ["file", "file2", "dcol1", "dcol2",
Expand Down
3 changes: 1 addition & 2 deletions tests/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

from __future__ import absolute_import
import looper
#from . import conftest
import conftest
from . import conftest

print("Running interactive.py tests")
proj, pi = conftest.interactive()

0 comments on commit 6e78c6d

Please sign in to comment.