Mercurial > repos > goeckslab > tabular_learner
comparison base_model_trainer.py @ 16:e82fd7fe796b draft default tip
planemo upload for repository https://github.com/goeckslab/gleam commit 75eddf497315160aa1282ba1db839c4db0aed0c6
| author | goeckslab |
|---|---|
| date | Fri, 23 Jan 2026 21:55:30 +0000 |
| parents | 01e7c5481f13 |
| children |
comparison
equal
deleted
inserted
replaced
| 15:01e7c5481f13 | 16:e82fd7fe796b |
|---|---|
| 119 ) | 119 ) |
| 120 | 120 |
| 121 self.target = names[target_index] | 121 self.target = names[target_index] |
| 122 sample_id_column = getattr(self, "sample_id_column", None) | 122 sample_id_column = getattr(self, "sample_id_column", None) |
| 123 if sample_id_column: | 123 if sample_id_column: |
| 124 if str(sample_id_column).isdigit(): | |
| 125 idx = int(sample_id_column) - 1 | |
| 126 if 0 <= idx < len(names): | |
| 127 resolved = names[idx] | |
| 128 if sample_id_column in names: | |
| 129 LOG.warning( | |
| 130 "Sample ID column value '%s' matches a header, but Galaxy data_column " | |
| 131 "inputs are interpreted as 1-based indices; using column #%s header '%s'.", | |
| 132 sample_id_column, | |
| 133 idx + 1, | |
| 134 resolved, | |
| 135 ) | |
| 136 LOG.info( | |
| 137 "Sample ID column '%s' not found; using column #%s header '%s' instead.", | |
| 138 sample_id_column, | |
| 139 idx + 1, | |
| 140 resolved, | |
| 141 ) | |
| 142 sample_id_column = resolved | |
| 143 else: | |
| 144 raise ValueError( | |
| 145 f"Sample ID column index {sample_id_column} is invalid. " | |
| 146 f"Please select a number between 1 and {len(names)}." | |
| 147 ) | |
| 124 sample_id_column = sample_id_column.replace(".", "_") | 148 sample_id_column = sample_id_column.replace(".", "_") |
| 125 self.sample_id_column = sample_id_column | 149 self.sample_id_column = sample_id_column |
| 126 else: | 150 else: |
| 127 self.sample_id_column = None | 151 self.sample_id_column = None |
| 128 self.sample_id_series = None | 152 self.sample_id_series = None |
