Open bryantmurphy opened 4 months ago
Thanks for the kind words, and I'm glad the package is useful! I haven't spent much time on maintaining it recently.
I've implemented the requested changes, which are currently not in the main branch but in dev-feature-shapes
].
This gives 'rectangular' feature shapes if direction == 0
and properly offsets the labels if there are multiple overlaps.
You can install it with devtools::install_github("bradyajohnston/plasmapR@dev-feature-shapes")
.
I may merge into main after having some time to add some tests for it.
tibble::tribble(
~index, ~name, ~type, ~start, ~end, ~direction,
1L, "other DNA", "source", 1L, 7276L, 1L,
3L, "pQE30 promoter", "misc_feature", 224L, 336L, 1L,
7L, "BB0346-FLAG", "CDS", 338L, 1012L, 1L,
10L, "PflaB", "promoter", 1032L, 1279L, 1L,
11L, "BBLacI(Leu)", "CDS", 1280L, 2362L, 1L,
12L, "PflgB", "promoter", 2373L, 2521L, 1L,
13L, "SmR", "CDS", 2522L, 3313L, 0L,
14L, "ori", "rep_origin", 3436L, 4024L, 1L,
15L, "Bb-ORF123-IRS", "CDS", 4102L, 7276L, -1L,
16L, "ORF3", "CDS", 4543L, 5103L, -1L,
17L, "ORF2", "CDS", 5155L, 5706L, -1L,
18L, "ORF1", "CDS", 5716L, 6843L, -1L
) -> dat
dat |>
plot_plasmid(
name = 'test',
name_size = 8
)
Of course -- I really wish I had the package development skills to help maintain it. Those additions (along with the plot customization parameters you're adding) seem to be working perfectly, though, thank you!
I'm glad it's working! If you did want to try and contribute to the package (package development is easier than you think, I promise!) then I would happily provide lots of guidance on that front. I've move away from doing lab work / working with plasmids so having someone else help to maintain the package would be ideal going into the future.
Okay, I'm convinced haha. Especially for microbiologists, I think this package will be well worth the effort to maintain and continue enhancing. I'll reach out in a few months after I've finished up my busy end to grad school and had time to thoroughly review your code along with the R packages book!
It's a great book, and it taught me lots. I look forward to hearing from you :)
Excellent work on this! The ability to plot data.frame objects is incredibly efficient for feature selection and making edits as desired. Just a few major improvement requests:
When multiple features are overlapping (as in the data frame below), the arrows are correctly stacked, but the labels all fall to the central arrow rather than associating with their corresponding stacked arrows.
Can you make it so the user is able to set
direction == 0
for certain features, resulting in a rectangle as opposed to an arrow? This would be ideal for features like promoters and terminators to help distinguish them from CDSs.