facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.16k stars 627 forks source link

Adjust header in output file #445

Closed dawsonhunt closed 1 year ago

dawsonhunt commented 1 year ago

From some research, it looked to me that the pertinent part of the name in the header was the "Seita.9G099800" part, so I wanted to split that from the rest. First, see if the header is longer than one element and then isolate the "Seita.9G099800" portion:

if len(header.split()) > 1:
                first_elem = header.split()[0]
                name = '.'.join(first_elem.split('.')[:2])

If the header is just one word, simply assign the header to the name and put that in the output_file:

else:
   name = header

output_file = args.pdb / f"{name}.pdb"

Please let me know if this is satisfactory, or if you had something else in mind.

facebook-github-bot commented 1 year ago

Hi @DawsonHunt!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

facebook-github-bot commented 1 year ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot commented 1 year ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

ebetica commented 1 year ago

I agree that having space seperated text might not be optimal. However, I don't think having . as a separator is conventional either. Better to just do header.split()[0] generically imo.

tomsercu commented 1 year ago

@dawsonhunt Thanks for your contribution! Do you want to update the PR or shall we abandon?

tomsercu commented 1 year ago

I'll close it for now but happy to re-open and revise in the future!