-
Notifications
You must be signed in to change notification settings - Fork 2
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 URIs matching error in sdrfToNfConf.R #46
Conversation
|
||
if (is.data.frame(uri_select) || is.matrix(uri_select)) { | ||
# the following line gives an error: dim(X) must have a positive length | ||
# if not a matrix or a data.frame | ||
missing_uri_files <- files[which(! apply(apply(species.protocol.sdrf[,uri_cols], 2, function(x) basename(x) == files), 1, any))] | ||
} else { | ||
missing_uri_files <- files[which(! apply(as.data.frame( apply(species.protocol.sdrf[,uri_cols], 2, function(x) basename(x) == files) ), 1, any))] | ||
missing_uri_files <- files[which(! any(apply(species.protocol.sdrf[, uri_cols], 2, function(x) basename(x) == files)) )] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain briefly what are you trying to do here.. So I know what I understood from code is right..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anilthanki Did you have a look to the description of the PR?
Basically, in this chunk for each library it is checked if there is a fastq URI that can supply the file. The error was in the fix for the case when uri_select
is not a matrix or a data.frame
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for reviewing @anilthanki |
The PR fixes the error for the droplet protocol, that arises when
uri_select
is not a matrix or a data.frame:The PR now reports a single value (TRUE or FALSE) as expected, as
files
in this casehas a single file.
Tested with the following accessions: E-GEOD-153723, E-GEOD-157775, E-MTAB-4850