brennanpincardiff / drawProteins

Creating package to draw proteins from Uniprot API
Other
33 stars 17 forks source link

Add 1 chain if missing #15

Closed daniel-wells closed 3 years ago

daniel-wells commented 4 years ago

This is a great package thanks for putting it together! I came across one problem in that many proteins in uniprot have no annotated chain, so I added some code to add a chain if it's missing using the sequence length contained in the json.

Reproducible example of problem:

library(drawProteins)
rel_json <- drawProteins::get_features("Q96J94 E2RDH8 G3RI55 U3IY01 H2Q773")
#> [1] "Download has worked"
rel_data <- drawProteins::feature_to_dataframe(rel_json)
p <- draw_canvas(rel_data)
p <- draw_chains(p, rel_data)
p <- draw_domains(p, rel_data, label_domains = F)
p

Created on 2019-08-19 by the reprex package (v0.3.0)

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 963ded844f39cd121db597393201380c5563ae4d on daniel-wells:replace_chain into ad6143fee6c8ae1d5daa7bf588131a4d7b560be4 on brennanpincardiff:master.

brennanpincardiff commented 3 years ago

Nice addition. Thanks a lot and sorry for the slow pull.