I'm literally specifying all of the arguments explicitly for this function (https://rdrr.io/bioc/coRdon/man/codonUsage.html).
What could be happening in R? The error is not very informative on what's happening since I'm using all of the arguments available.
Unused argument in R suggested I remove the variable but that didn't help.
Here's my code:
# Command line options
opts = parser$parse_args()
# Get function
cu_func = eval(parse(text=opts$method))
# Read in sequences
coding_sequences = readSet(file=opts$coding_sequences)
reference_sequences = readSet(file=opts$reference_sequences)
# Create codon table objects
cT_coding = codonTable(x=coding_sequences)
cT_reference = codonTable(x=reference_sequences)
# Subset
subset = list(reference=cT_reference)
names(subset) = c(opts$reference_name)
# Compute codon usage bias
df_codon_usage_bias = cu_func(
cTobject=cT_coding,
subsets=subset,
self=TRUE,
id_or_name2=opts$genetic_code,
ribosomal=FALSE,
alt.init=opts$use_alternative_start_codons,
stop.rm=opts$remove_stop_codons,
filtering="hard",
len.threshold=opts$length_threshold
)
Here's my very uninformative error:
Error in cu_func(cTobject = cT_coding, subsets = subset, self = TRUE, :
unused arguments (cTobject = cT_coding, subsets = subset, self = TRUE, id_or_name2 = opts$genetic_code, ribosomal = FALSE, alt.init = opts$use_alternative_start_codons, stop.rm = opts$remove_stop_codons, filtering = "hard", len.threshold = opts$length_threshold)
Execution halted