-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beginning update reproin.py to deal with ses-X* instances #592
base: master
Are you sure you want to change the base?
Conversation
@@ -124,6 +124,9 @@ | |||
|
|||
- We replace all ( with { and ) with } to be able e.g. to specify session {date} | |||
- "WIP " prefix unconditionally added by the scanner is stripped | |||
|
|||
|
|||
-Michael-Sun Plans on adding a heuristic to deal with ses-X* instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it happen!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add above , where _ses-
marker described, description that XXX
markers are dealt in some other way.
Made some edits to do some default behavior if it sees and X* or x* |
if prior_sessions: | ||
session = '%03d' % (len(prior_sessions) + 1) | ||
else: | ||
session='001' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should hardcode to %03d
since intention on formatting might have been different etc.
- do not just take the length of
prior_sessions
but- extract labels (what comes after
ses-
), see what length they have. if non-uniform (1,...,12
) - use plain'%d'
. If uniform - usef'%0{len(ses_labels[0])}d
'` - do not base on
len(prior_sessions)
but convert all session labels intoint
. If errors - errors. Take max of those ints, so smth likemax(map(int, ses_labels))
- extract labels (what comes after
- make this logic into a function
get_next_xxx_session(prior_session_dirs: list[str])
, for which also add unittests for it
@@ -780,6 +783,13 @@ def infotoids(seqinfos, outdir): | |||
"Should have got a single session marker. Got following: %s" | |||
% ', '.join(map(repr, ses_markers)) | |||
) | |||
if re.match("(X|x)*", ses_markers): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if re.match("(X|x)*", ses_markers): | |
if re.match("XX+$", ses_markers) or re.match("xx+$", ses_markers): |
to
- ensure consistent
xxx
orXXX
and notXxX
- require at least 2 of those xs
- no other symbol there (anchor)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left comments on how to proceed. Will move to draft
mode. Please undraft when you consider it ready and ping me
No description provided.