Skip to content

Commit 60523c5

Browse files
Merge pull request #495 from pepkit/dev
Release 0.40.7
2 parents 5b255d8 + cfccd7e commit 60523c5

File tree

7 files changed

+45
-5
lines changed

7 files changed

+45
-5
lines changed

peppy/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.40.6"
1+
__version__ = "0.40.7"

peppy/project.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ def attr_merge(self):
809809
if len(this_sample_rows) == 0:
810810
_LOGGER.debug(
811811
"No merge rows for sample '%s', skipping",
812-
sample[SAMPLE_NAME_ATTR],
812+
sample[self.st_index],
813813
)
814814
continue
815815
_LOGGER.debug("%d rows to merge", len(this_sample_rows))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
pep_version: "2.1.0"
2+
sample_table: sample_table.csv
3+
subsample_table:
4+
- subsample_table1.csv
5+
- subsample_table2.csv
6+
7+
sample_table_index: sample_id
8+
9+
sample_modifiers:
10+
append:
11+
local_files: LOCAL
12+
genome: "fg"
13+
derive:
14+
attributes: [local_files]
15+
sources:
16+
LOCAL: "../data/{file_path}"
17+
imply:
18+
- if:
19+
identifier: "frog1"
20+
then:
21+
genome: "frog_frog"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sample_id,protocol,identifier
2+
frog_1,anySampleType,frog1
3+
frog_2,anySampleType,frog2
4+
frog_3,anySampleType,frog3
5+
frog_4,anySampleType,frog4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sample_id,file_path,subsample_name
2+
frog_1,file/a.txt,a
3+
frog_1,file/b.txt,b
4+
frog_1,file/c.txt,c
5+
frog_2,file/a.txt,a
6+
frog_2,file/b.txt,b
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sample_id,random_string,subsample_name
2+
frog_1,x_x,x
3+
frog_1,y_y,y
4+
frog_1,z_z,z
5+
frog_2,xy_yx,xy
6+
frog_2,xx_xx,xx

tests/test_Project.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ def test_subsample_table_works_when_no_sample_mods(self, example_pep_cfg_path):
226226
p = Project(cfg=example_pep_cfg_path)
227227
assert any([s["file"] != "multi" for s in p.samples])
228228

229-
@pytest.mark.parametrize("example_pep_cfg_path", ["custom_index"], indirect=True)
230-
def test_cutsom_sample_table_index_config(self, example_pep_cfg_path):
229+
@pytest.mark.parametrize(
230+
"example_pep_cfg_path", ["custom_index", "multiple_subsamples"], indirect=True
231+
)
232+
def test_custom_sample_table_index_config(self, example_pep_cfg_path):
231233
"""
232234
Verify that custom sample table index is sourced from the config
233235
"""
@@ -599,7 +601,7 @@ def test_unequality(self, example_pep_cfg_path, example_pep_csv_path):
599601

600602
@pytest.mark.parametrize(
601603
"example_pep_cfg_path",
602-
["append", "custom_index", "imply", "subtables"],
604+
["append", "custom_index", "imply", "subtables", "multiple_subsamples"],
603605
indirect=True,
604606
)
605607
@pytest.mark.parametrize("orient", ["dict", "records"])

0 commit comments

Comments
 (0)