Skip to content
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

BMRB refactor #20

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

BMRB refactor #20

wants to merge 6 commits into from

Conversation

rvhonorato
Copy link
Member

This PR refactors the way the BMRB table is used in FANDAS.

Since there was no input format before, the user would input a simple text file and then manually tell the code which column contained which information via sequence_start, resnum_column and chemical_shift_column.

However, BMRB has the very nice NMR-STAR format that should be used instead, its highly documented and BMRB itself provides a conversion tool from other formats to it.

With this enhancement we can drop the column parameters and substitute it for a target_entity that will tell FANDAS which entity from the BMRB file it should use.

The NMR-STAR format also contains sequence information, which can then in turn be used to match the input sequence with the BMRB entity, thus allowing for a great flexibility when using BMRB files.

# ...
 [2022-08-01 17:48:47,545 main:L99 INFO] Assigning chemical shifts
 [2022-08-01 17:48:47,545 assign:L34 INFO] Loading standard chemical shifts from /Users/rodrigo/repos/fandas/src/fandas/data/standard.csv
 [2022-08-01 17:48:57,012 use_bmrb:L68 INFO] Aligning input sequence with BMRB entity 1
 [2022-08-01 17:48:57,038 align_to:L52 INFO] Identity: 100.00%
 [2022-08-01 17:48:57,039 align_to:L54 INFO] ------TLTGKTITLEVEPSDTIENVKAKIQDKEG-----QRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
 [2022-08-01 17:48:57,039 align_to:L54 INFO] ------|||||||||||||||||||||||||||||-----||||||||||||||||||||||||||||||||||||
 [2022-08-01 17:48:57,039 align_to:L54 INFO] MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
 [2022-08-01 17:48:57,039 use_bmrb:L70 INFO] Updating shifts based on BMRB table
 [2022-08-01 17:48:57,039 _update_shifts:L85 INFO] # (bmrb.7) 7 T       H       8.22    >> 8.72
# ...

also add a feature to align the input sequence with the sequence present in the BMRB file
@rvhonorato rvhonorato self-assigned this Aug 1, 2022
@rvhonorato rvhonorato added enhancement New feature or request user request labels Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request user request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant