[ENH] Update participant.tsv - #391
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #391 +/- ##
==========================================
+ Coverage 75.91% 76.04% +0.13%
==========================================
Files 17 17
Lines 1557 1578 +21
Branches 264 270 +6
==========================================
+ Hits 1182 1200 +18
- Misses 298 299 +1
- Partials 77 79 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| if participants_file.exists(): | ||
| with open(participants_file, "r") as f: | ||
| lines = f.readlines() | ||
| # Skip header line (participant_id) | ||
| if len(lines) > 1: | ||
| existing_participants = {line.strip() for line in lines[1:]} |
There was a problem hiding this comment.
This checks whether whole lines contain sub-* ONLY to match it with the participant_name. However, if a line contains other details, it will treat that participant_name as a new one and add another row. For example, when I try it using the dcm2bids_scaffold default participants.tsv pre-filled data, it output this after 2 runs of dcm2bids with the same participant ID. Note that I also tested by manually added the 88 for the second run:
sub-01
sub-01 88
sub-01 34 M control
sub-02 12 F control
sub-03 33 F patient
I think it should check whether the first column matches or not, not the whole row.
No description provided.