In the plugin that I am developing for Qiime2, I have run into a issue when making the input type and output type the same core q2_type.
When you run the plugin qiime [plugin] [command]
, it shows the required inputs and parameters and not the output.
It seems like if you have the input and output the same type, it repeats the input requirement and ignores the set output.
I have the input type as:
inputs={'per_sample_sequences':SampleData[PairedEndSequencesWithQuality]}
and the output as:
outputs= [('per_sample_sequences':SampleData[JoinedSequencesWithQuality])]
Here is the whole plugin function:
plugin.methods.register_function(
function=test,
inputs={'per_sample_sequences': SampleData[PairedEndSequencesWithQuality]},
parameters={'region': Str %Choices('test1','test2'),
'taxa': Str %Choices('test1','test2'),
'threads': Int},
outputs=[('per_sample_sequences', SampleData[JoinedSequencesWithQuality)],
input_descriptions={'per_sample_sequences': '......'},
parameter_descriptions={
'region': ('The regions.'),
'taxa': ('The selected taxonomic group.'),
'threads': ('The number of processor threads to use.')
},
output_descriptions={'per_sample_sequences': '.......'},
name='Test',
description='Test is.....'
)
when test() is
def test(per_sample_sequences: SingleLanePerSamplePairedEndFastqDirFmt,
region: str,
taxa: str,
threads: int)-> SingleLanePerSampleSingleEndFastqDirFmt:
results = SingleLanePerSampleSingleEndFastqDirFmt()
return results