Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error causing names attribute to be overwritten with NAs #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cphealy8
Copy link

add_landmark_labels is overwriting the names attribute causing the names of landmark entries in the graphml object to be set to NA. This commit prevents this overwriting when it's not needed by wrapping add_landmark_labels in an if-else statement so that this overwriting only occurs when a new variable, overwrite.names, is TRUE.

I added overwrite.names as an optional argument to get_scaffold_map and run_scaffold_analysis with a default value of TRUE.

This implementation should permit the fix without affecting existing deployments of vite.

cphealy8 and others added 3 commits June 29, 2022 10:09
add_landmark_labels is overwriting the names attribute causing the names of landmark entries in the graphml object to be set to NA. This commit prevents this overwriting when it's not needed.
@SamGG
Copy link

SamGG commented Jun 8, 2023

@cphealy8 thanks for your feedback to the community
Concerning

        good.cols <- col.names[col.names %in% colnames(tab)]
        if (length(good.cols)<length(col.names)){
            warning('Some channels requested were not present in the clustering file. Double check names.')
            col.names<-good.cols
        }

I think good.cols <- intersect(col.names, colnames(tab)) would be clearer.
I think using setdiff() would give a more informative message to the user about missing channels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants