-
Notifications
You must be signed in to change notification settings - Fork 7
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
Rename BRC seq_region names #292
Conversation
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.
Quite nice new features with the usage of Enum
I didn't know about 🤓
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 have tested it, works well. Thank you !
) | ||
seq_attrib = session.scalars(stmt).one() | ||
seq_attrib.value = seq_region.brc_name | ||
elif seq_region.operation == Operation.insert: |
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 am not able to replicate this case if i have such case as
if not db_brc_name: logging.info(f"Seq region {seqr.name} doesn't have a BRC name")
it gives the log message however seq_regions = []
so doesnt apply the insert operation for me
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.
Do you get the message that says the insert operation is not supported (I have only implemented the update part)?
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.
The value for return seq_regions
in get_seq_regions_to_replace
is an empty list for me, so I dont get any message
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.
Ok good spot, I've updated the logic
Co-authored-by: J. Alvarez-Jarreta <jalvarez@ebi.ac.uk>
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.
Ready to go 👍
Co-authored-by: J. Alvarez-Jarreta <jalvarez@ebi.ac.uk>
A script to automate the renaming of seq_region
BRC4_seq_region_name
attributes.The script accepts a simple tab file with the current name and the new BRC name, and checks against the current database to see what it would do (not found, insert, update, or already exists). Then just add the usual
--update
argument to make the changes.NB: the current name can be the seq_region name or a synonym.