Options for plugin inputs/arguments (ghost-tree progress)

Hey there!

ghost-tree standalone now accepts different graft levels and it will also accept a phylogenetic tree (and not just aligned seqs) as a foundation. Yay! This pic is just for fun.... no need to read it. Just showing different graft levels.

11%20PM

q2-ghost-tree works for different graft levels but it will not accept a phylogenetic tree. It keeps saying that it needs aligned seqs but I added this code to allow either aligned seqs or phylogenetic tree as a foundation file but it's not working for me. I really want it to be able to accept one of these three types. I know that Jai suggested making another command that uses a tree as the foundation, but it seems like more work and maintenance.... 2nd opinion? Thanks! :sunny: :beach_umbrella: :ocean:

2 Likes

@ebolyen I got another opinion and he agrees with Jai. No need to respond if you also agree that I should just have another registered function. Thx.

Hey @Jennifer_Fouquier,

I suppose I don't have a particular opinion on how the inputs should work, but with respect to your particular issue in the linked code:

Just change:

'foundation_alignment': (FeatureData[AlignedSequence] or
                         Phylogeny[Rooted] or Phylogeny[Unrooted])

to:

'foundation_alignment': FeatureData[AlignedSequence] | Phylogeny[Rooted | Unrooted]

You had the right idea, just the wrong spelling of "or" :slight_smile:

2 Likes

Thank you. I did try that and it kept saying it was trying to convert my aligned sequences into a newick, not allow either input.

I decided to separate them out into two separate commands and it's working!

Quick q: Is there a print option or debug mode when developing q2-plugins? I wanted to double check things using the ascii art print feature. I checked the ascii art in ghost-tree but want to verify graft levels in q2-ghost-tree. I can't get things to print to console.

Unrelated feature request: it would be nice if 'qiime import' would make a green text console output similar to what the regular plugins do. It catches me a bit off guard when I do not see the green output. Thank you!

1 Like

Sweet!

Just print(...) whatever it is you want to debug, but make sure to add the --verbose flag to your q2cli command, otherwise the print statement will be redacted. I use this technique for debugging all the time :tm:

Good idea! I opened an issue up to track this feature. No idea on ETA now, but stay tuned! :tv:

Thanks! :t_rex:

1 Like