Underscore in NAME clashes with R package syntax
lonsbio opened this issue · 5 comments
Just noting that _
in program name will clash with the R implementation when using biotool-boot.sh
and produce an error:
Malformed package name
Not sure whether to enforce for all languages a minimal common set of characters, or add a check for R only
Thanks @lonsbio. Can you please provide more details about the problem?
Maybe an example scenario or command which would trigger it?
I think this is now solved? @jessicachung, can you comment on this?
R package names have certain requirements, mainly the name can only contain letters, numbers and periods.
So a package name like bio_test
would fail to install if using the boot script.
boot/bionitio-boot.sh -l r -n bio_test
cd bio_test && R CMD INSTALL bio_test
Not sure if this type of non-allowed character problem is only specific to R. Maybe we could include a regex check after step 2 of the boot script.
An expression like this will work for R names:
[[ ${new_project_name} =~ ^[A-Za-z]+[A-Za-z0-9.]*[A-Za-z0-9]$ ]] && echo "ok"
Thanks @jessicachung. I suspect this problem might occur in other languages too.
I can see two options:
- Just warn people that this problem might occur, and to be careful with the package name. Easy for us, but not so nice for the user.
- Update bionitio-boot.sh to check for bad names. This will have to be on a per-language basis. More work for us, but better for the user.
Option 2 is probably the best thing to do, but it requires some people to implement it. Maybe we can do it lazily, by fixing R first, and then fixing any others if/when we discover a problem?
Fixed.