Skip to content

Commit

Permalink
Revert "fix: isa-tab add-ped now only modifies values on process node…
Browse files Browse the repository at this point in the history
…s of ped supplied samples #207"

This reverts commit 55f0f24.
  • Loading branch information
Nicolai-vKuegelgen committed Jun 25, 2024
1 parent 55f0f24 commit c8ecdc9
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 133 deletions.
5 changes: 0 additions & 5 deletions cubi_tk/isa_tab/add_ped.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ def on_visit_material(self, material, node_path, study=None, assay=None):

def on_visit_process(self, process, node_path, study=None, assay=None):
super().on_visit_process(process, node_path, study, assay)
donor_name = node_path[0].name if _is_source(node_path[0]) else _sample_to_donor_name(node_path[0].name)
if donor_name not in self.donor_map:
return None
proc_config_pairs = {
"library construction ": {
"library type": "library_type",
Expand Down Expand Up @@ -481,8 +478,6 @@ def _append_assay_line_protocol(
counter += 1
return counter, curr

def _sample_to_donor_name(sample_name):
return sample_name.rstrip("-N1")

def _donor_to_sample_name(donor_name):
return "%s-N1" % donor_name
Expand Down

This file was deleted.

95 changes: 0 additions & 95 deletions tests/data/isa_tab/expected_output2/i_Investigation.txt

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion tests/data/isa_tab/in_sheet_subset/input.ped

This file was deleted.

24 changes: 0 additions & 24 deletions tests/test_isa_tab_add_ped.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,3 @@ def test_add_ped_just_update(tmpdir):
str(scratch_dir),
str(pathlib.Path(__file__).parent / "data" / "isa_tab" / "expected_output"),
)

def test_add_ped_sheet_subset_update(tmpdir):
"""Test updating study and assay, but only a subset of the sheet."""
scratch_dir = tmpdir / "scratch"
path_ped = pathlib.Path(__file__).parent / "data" / "isa_tab" / "in_sheet_subset" / "input.ped"
shutil.copytree(
str(pathlib.Path(__file__).parent / "data" / "isa_tab" / "in_just_update"), str(scratch_dir)
)

# Update metadata
args = BASE_ARGS[:]
args[12] = "S00000XYZ"

argv = args + [str(scratch_dir / "i_Investigation.txt"), str(path_ped)]

# Actually exercise code and perform test.
res = main(argv)

assert not res

compare_input_output(
str(scratch_dir),
str(pathlib.Path(__file__).parent / "data" / "isa_tab" / "expected_output2"),
)

0 comments on commit c8ecdc9

Please sign in to comment.