Closed rafalstepien closed 1 month ago
Hi! Just a reminder to in general not rely on access to attributes prefixed with _
since the correctness is often less thoroughly vetted and they're more likely to change, but thanks for catching this and opening a ticket @rafalstepien !
Hi @vreuter thanks for the comment. You are absolutely right. I mentioned self._samples
but I meant self.samples
. If you look to the code, accessing self.samples
simply returns self._samples
if it is present, that's why I used the shortcut and went directly for _samples
.
This issue was solved in https://github.com/pepkit/peppy/pull/409
Peppy does not create correct list of
Sample()
objects stored inself._samples
.If there is a column in
sample_table.csv
orsubsample_table.csv
that is empty for any row, thenpeppy
does not createSample()
object with this attribute. The problem is that this is not true, andSample()
instance should have this attribute with valueNone
. To better explain:Given following
sample_table.csv
:peppy
will create the following structure:And any attempt to access
self._samples[1].fastq_2
will raise an attribute error. In my opinion the correct structure should be: