Closed mattssca closed 2 years ago
In this commit the following updates have been made:
Changes in this commit include fixes to issues/suggestions raised in the recent PR review.
Use global colours - The following plotting function have been updated to read palette from get_gambl_colours()
: fancy_sv_chrdistplot
,fancy_sv_bar
, fancy_vplot
, fancy_ideogram
, fancy_multisamp_ideogram
.
Renaming of variable returned after calling get_sample_cn_segments
in fancy_cnbar (not a maf returned)
New parameter was added to fancy_cnbar
, allowing the user to specify the cut-off value for maximum CN states to be retrieved.
CN0 is now retained in fancy_cnbar
.
Chromosome tables for both ideograms are updated, now using GAMBLR::chromosome_arms_grch37
to retrieve this information.
fancy_ideogram
now stores the plot inside a variable (p) allowing the user to combine multiple plots when arranging a multiplot figure.
fancy_ideogram
is now also using the newly added helper function (subset_cnstates
).
Above mentioned helper function is also simplified to a unified call.
Overwriting line (all_meta) to database.R has been removed.
Package documentation has been regenerated to reflect added/updated parameters.
Changes in this PR include the following updates:
fancy_cnlohbar - updated colours (to match gambl palette for CN states), optional parameter to include CN state = 2, adding a second y-axis to annotate the number of nucleotides affected by each CN state. Both y-axis are now in log10 (since CN = 2 is now included). nNucleotides in each CN state are now plotted as geom_points over the corresponding CN count bar.
fancy_sv_chrdistplot - Now uses the newly added palette for DEL and INS.
fancysnv chrdistplot - Name and description of this plot have now been adjusted for SNVs (previously stated SNPs).
fancy_svbar - Now uses the newly added palette for DEL and INS.
fancy_vplot - Now uses the newly added palette for DEL and INS.
fancy_ideogram - Added in this PR. Colours have also been updated to match the defined palette for CN states. Previously, the plot annotated CN states up to 10+, but since the defined colour palette only goes up to CN state = 6, thus all CN states => 6 are annotated the same.
New palette added to get_gambl_colours, all_colours[["indels"]] = c("DEL" = "#53B1FC", "INS" = "#FC9C6D").
Updating get_codin_ssm to have these_samples_metadata parameter
Fixing bug in get_ssm_bt_region (caused an error in ashm_rainbow_plot in the vignette). Were Streamlined = TRUE was wrongly embedded inside the function, causing the function to always return only two columns. This was removed, streamlined and basic_columns were also set to FALSE by default.
lollipopPlot example in the vignette was updated to use get_coding_ssm (instead of get_ssm_by_gene), now works the intended way again.
Regenerated package documentation.
A lot of changes related to removing trailing white space in all scripts (no new code in portal.R, preprocessing_io.R and web.R).
Outstanding things that will be addressed in my next PR are examples in the vignette that are relying on the database for reading data. Examples of newly incorporated plotting functions will also be added.
Pull Request Checklists
Important: When opening a pull request, keep only the applicable checklist and delete all other sections.
Checklist for all PRs
Required
[ ] I tested the new code for my use case (please provide a reproducible example of how you tested the new functionality)
[x] I ensured all dplyr functions that commonly conflict with other packages are fully qualified.
This can be checked and addressed by running
check_functions.pl
and responding to the prompts. Test your code after you do this.devtools::document()
) and addedNAMESPACE
and all other modified files in the root directory and underman
.Optional but preferred with PRs
Checklist for New Functions
Required
[x] I documented my function using ROxygen style.)
[x] All parameters for the function are described in the documentation and the function has a decriptive title.
Example:
import
statment.Example:
Checklist for changes to existing code
[x] I added/removed arguments to a function and updated documentation for all changed/new arguments
[ ] I tested the new code for compatability with existing functionality in the Master branch (please provide a reprex of how you tested the original functionality)