comorment / mixer

Singularity wrapper for https://github.com/precimed/mixer
GNU General Public License v3.0
5 stars 4 forks source link

bug in run_mixer.ipynb #23

Closed espenhgn closed 7 months ago

espenhgn commented 7 months ago

I've introduced some error-prone code in https://github.com/comorment/mixer/blob/main/usecases/run_mixer.ipynb; as np.unique(...) returns a sorted list of unique elements, hence the fname/trait pairing in such for loops can be completely arbitrary:

# fit1
fit1_job_ids = dict()
for fname, trait in zip(np.unique(traitfiles_1 + traitfiles_2), 
                        np.unique(traitnames_1 + traitnames_2)):

It'd be better to define traitnames/files to iterate over in a dictionary as key/value pairs that shouldn't be untangled.