CLI and API returning different results

Hello,

I have written a somewhat functioning plugin, however the API and CLI are behaving slightly differently. When I run the plugin through the API I get the expected result:

pf = phylofactor.methods.phylofactor(data, 
                                     unrooted_tree, 
                                     metadata, 
                                     family='binomial', 
                                     formula='Subject~Data',
                                     choice='F',
                                     nfactors=3,
                                     ncores=4)
print([e for e in dir(pf) if not e.startswith('_')])

['count', 'factors', 'featuretable', 'index', 'tree']

Above you can see the three results that should be returned (factors, featuretable, and tree)
However when I run the command with the same data from the CLI:

$ qiime phylofactor phylofactor --i-table example/table-dada2.qza --i-phylogeny example/unrooted-tree.qza --m-metadata-file example/sample-metadata.tsv --p-family binomial --p-formula 'Subject~Data' --p-nfactors 2 --output-dir foo --verbose
$ ls foo
featuretable.qza  tree.qza

Now there is no factors file being returned. There are no errors however I’m guessing this is related to the definition of the factor artifact, but I don’t know where to begin looking for the solution.

I apologize I realize the above example is in no way reproducible and I will be happy to provide additional data, however as I said I’m not sure where to start with this, I was thinking that the machinery behind the scenes was the same regardless of interface.

1 Like

The issue was the cache. My updates were not being recognized. Running:

$ qiime dev refresh-cache

Fixed it.

This has probably been discussed on the forum previously, so feel free to delete this post. Or if it’s useful for others I’m happy leaving it open

1 Like