Skip to content

Commit

Permalink
added type map for collate of allele annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
VinzentRisch committed Mar 20, 2024
1 parent aafb201 commit e8203ad
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions q2_amr/plugin_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,37 @@
"and collates them into a single artifact.",
)

T_allele_annotation_collate_in, T_allele_annotation_collate_out = TypeMap(
{
List[
SampleData[CARDAlleleAnnotation % Properties("kma", "bowtie2", "bwa")]
]: SampleData[CARDAlleleAnnotation % Properties("kma", "bowtie2", "bwa")],
List[
SampleData[CARDAlleleAnnotation % Properties("kma", "bowtie2")]
]: SampleData[CARDAlleleAnnotation % Properties("kma", "bowtie2")],
List[SampleData[CARDAlleleAnnotation % Properties("kma", "bwa")]]: SampleData[
CARDAlleleAnnotation % Properties("kma", "bwa")
],
List[
SampleData[CARDAlleleAnnotation % Properties("bowtie2", "bwa")]
]: SampleData[CARDAlleleAnnotation % Properties("bowtie2", "bwa")],
List[SampleData[CARDAlleleAnnotation % Properties("kma")]]: SampleData[
CARDAlleleAnnotation % Properties("kma")
],
List[SampleData[CARDAlleleAnnotation % Properties("bowtie2")]]: SampleData[
CARDAlleleAnnotation % Properties("bowtie2")
],
List[SampleData[CARDAlleleAnnotation % Properties("bwa")]]: SampleData[
CARDAlleleAnnotation % Properties("bwa")
],
}
)

plugin.methods.register_function(
function=collate_reads_allele_annotations,
inputs={"annotations": List[SampleData[CARDAlleleAnnotation]]},
inputs={"annotations": T_allele_annotation_collate_in},
parameters={},
outputs={"collated_annotations": SampleData[CARDAlleleAnnotation]},
outputs={"collated_annotations": T_allele_annotation_collate_out},
input_descriptions={
"annotations": "A collection of annotations from reads at "
"allele level to be collated."
Expand Down

0 comments on commit e8203ad

Please sign in to comment.