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

108 create rl map cellphonedb input checks and readins #109

Merged
merged 7 commits into from
Mar 18, 2024

Conversation

dimalvovs
Copy link
Collaborator

refactored:

  • input checks;
  • readins;
  • python/R bool conversions;

if (alternate_convert & is.null(alternate_convert_table)) {
stop("If using alternate conversion table (not recommended), a table must be provided")
}
check_arg(genes, c("character", "data.frame"))
Copy link

@drbergman drbergman Mar 13, 2024

Choose a reason for hiding this comment

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

it looks like the read_if_char function acts on genes below in a way that requires genes to be a single character. So, should this also include a check as below of allow_len = c(1)?

Similarly for next few lines.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

valid point, addressed in bd01e01

}
}
}
genes <- conv_py_bools(genes)

Choose a reason for hiding this comment

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

Any concern that any of these might contain all True's or all False's? It looks like conv_py_bools will only make changes if both are present.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jmitchell81 could there be cases with only True or only False that we need to care about?

Copy link

@drbergman drbergman left a comment

Choose a reason for hiding this comment

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

Just two comments. Looks much simpler to read now!

@dimalvovs dimalvovs merged commit f53f030 into dev Mar 18, 2024
1 check passed
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.

3 participants