Closed earnaud closed 2 years ago
Hi @earnaud. I'm unable to reproduce this error. Would you mind forwarding the function call?
A potential issue is that taxa.table
doesn't accept the full file name (i.e. /this/is/my/path/decomp.csv), it should be only the file name (e.g. decomp.csv).
We could perhaps change this if there's a strong argument for it.
Hi @clnsmth,
Here is a caption of my screen after having tested template_taxonomic_coverage()
with my inputs from MetaShARK:
Browse[1]> rv$taxa.table
[1] "/home/pndb-elie/dataPackagesOutput/emlAssemblyLine/test_emldp/Nitrogen_fixation.csv"
Browse[1]> rv$taxa.table <- basename(rv$taxa.table)
Browse[1]> template_taxonomic_coverage(
+ paste(
+ savevar$emlal$selectDP$dp_path,
+ savevar$emlal$selectDP$dp_name,
+ "data_objects",
+ sep = "/"
+ ),
+ taxa.table = rv$taxa.table,
+ taxa.col = rv$taxa.col,
+ taxa.name.type = rv$taxa.name.type,
+ taxa.authority = rv$taxa.authority
+ )
Templating taxonomic coverage ...
Error in validate_arguments(fun.name = "template_taxonomic_coverage", :
Input argument "taxa.name.type" must be "scientific", "common", or "both".
Browse[1]> template_taxonomic_coverage(
+ paste(
+ savevar$emlal$selectDP$dp_path,
+ savevar$emlal$selectDP$dp_name,
+ "data_objects",
+ sep = "/"
+ ),
+ paste(
+ savevar$emlal$selectDP$dp_path,
+ savevar$emlal$selectDP$dp_name,
+ "data_objects",
+ sep = "/"
+ ),
+ taxa.table = rv$taxa.table,
+ taxa.col = rv$taxa.col,
+ taxa.name.type = rv$taxa.name.type,
+ taxa.authority = rv$taxa.authority
+ )
Templating taxonomic coverage ...
Error in validate_arguments(fun.name = "template_taxonomic_coverage", :
Input argument "taxa.name.type" must be "scientific", "common", or "both".
Here are my inputs:
$taxa.authority
[1] "Catalogue of Life (COL)"
$taxa.table
[1] "Nitrogen_fixation.csv"
$taxa.col
[1] "YEAR"
$complete
[1] TRUE
$taxa.name.type
[1] "scientific name" "common name"
Try taxa.name.type = "both"
Hi again ! I found what was messing up concerning this issue, and it was my bad: I confused "data.path" argument in {EMLassemblyline}'s function and "data.files" argument in {EDIutils}'s function.
Well .. sorry: it actually does not work.
Warning: Error in EDIutils::validate_file_names: Invalid data.files entered: /home/pndb-elie/dataPackagesOutput/emlAssemblyLine/Test_emldp/Test/data_objects/decomp.csv
[No stack trace available]
> file.exists("/home/pndb-elie/dataPackagesOutput/emlAssemblyLine/Test_emldp/Test/data_objects/decomp.csv")
[1] TRUE
Hmmm ... this error message suggests an outdated version of validate_file_names()
. Does a fresh install of EDIutils fix this?
This function is deprecated in the new release on the main
branch. The previous version of EDIutils is on the deprecated
branch and will be permanently deleted on 2022-06-01.
Hi,
when I am using
EMLassemblyline::template_taxonomic_coverage()
, an error occurs onvalidate_file_names
:I use a path in the
path
argument and letdata.files
take its default value (akapath
). By manual tests, I see that this error occurs at the condition:But
sum_i
has length equals to the vector of files inpath
directory. So it could not have length equals todata.files
. I think the condition could be re-written: