Fix SNP-density plot color parameter and improve API intuition in MVP.Report (issue #116)#118
Open
zankrut20 wants to merge 2 commits into
Open
Fix SNP-density plot color parameter and improve API intuition in MVP.Report (issue #116)#118zankrut20 wants to merge 2 commits into
MVP.Report (issue #116)#118zankrut20 wants to merge 2 commits into
Conversation
….Report Fixed an issue where the col parameter in MVP.Report did not affect the SNP-density plot. Improved API intuition by allowing col to act as a fallback for chr.den.col. Fixed a bug where providing a vector to chr.den.col caused a logical coercion error. Updated README.md and documentation.
Fixed a missing description for the @param authors tag in the print_info function documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses an issue where users were unable to change the colors of the SNP-density plot using the
colparameter inMVP.Report. It also fixes a bug that caused a crash when providing a vector of colors tochr.den.coland resolves a documentation warning inMVP.Utility.r.🛠️ Changes
1.
MVP.ReportAPI & Logic Improvements (R/MVP.Report.r)MVP.Reportnow checks ifchr.den.colis set to its default value ("black"). If it is, and the user has provided a vector of colors in thecolparameter, the function now automatically usescolfor the SNP-density plot. This allows users to control the overall color scheme of the report more intuitively.Error in chr.den.col == "black" && is.vector(col) : 'length = 3' in coercion to 'logical(1)'. This occurred because the&&operator was used with a logical vector. I replaced the comparison withidentical(chr.den.col, "black")to ensure the check is scalar and safe regardless of whetherchr.den.colis a single string or a vector.2. Documentation Updates (
README.md)chr.den.colinstead ofcol, ensuring users are guided toward the correct parameter for explicit density plot coloring.3. Roxygen2 Fix (
R/MVP.Utility.r)print_infofunction where the@param authorstag was missing a description. Added"authors of the package"as the description to ensure a clean package check.🧪 How to Verify
col:chr.den.col:Run
devtools::check()orrhub::rhub_check()to verify that the@param authorswarning inMVP.Utility.ris gone.