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

Fix grepl for ROIs #3

Merged
merged 1 commit into from
Nov 29, 2019
Merged

Fix grepl for ROIs #3

merged 1 commit into from
Nov 29, 2019

Conversation

romainFr
Copy link
Collaborator

Switch to grepl with fixed=TRUE when matching ROI names as some of the ROI names contain brackets. This was causing neuprint_find_neurons to return connections all equal to 0 when the ROI name contained a parenthesis.

@@ -203,7 +203,7 @@ extract_connectivity_df <- function(rois, json){
a = unlist(strsplit(json,"}"))
values = data.frame()
for(roi in rois){
b = a[grepl(sprintf("\"%s\"",roi),a)]
b = a[grepl(sprintf("\"%s\"",roi),a,fixed=TRUE)]
if(length(b)){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me @romainFr. @alexanderbates?

@jefferis jefferis merged commit 4e724e3 into natverse:master Nov 29, 2019
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.

2 participants