Skip to content

Commit

Permalink
Merge branch '85_amrfinderplusannotation_type' into 87_annotate_mags_…
Browse files Browse the repository at this point in the history
…amrfinderplus
  • Loading branch information
VinzentRisch committed Jul 10, 2024
2 parents f10dcb3 + bbaca6e commit 81f0fbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions q2_amr/amrfinderplus/types/_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,13 @@ def _validate_(self, level):

class ARMFinderPlusAnnotationsDirFmt(MultiDirValidationMixin, model.DirectoryFormat):
annotation = model.FileCollection(
r".+_amr_(annotations|mutations)\.tsv$", format=ARMFinderPlusAnnotationFormat
r".+amr_(annotations|mutations)\.tsv$", format=ARMFinderPlusAnnotationFormat
)

@annotation.set_path_maker
def annotation_path_maker(self, sample_id, mag_id):
return rf"{sample_id}/{mag_id}_amr_(annotations|mutations)\.tsv$"
prefix = f"{sample_id}/{mag_id}_" if mag_id else f"{sample_id}/"
return f"{prefix}amr_annotations.tsv"


ARMFinderPlusAnnotationDirFmt = model.SingleFileDirectoryFormat(
Expand Down

0 comments on commit 81f0fbb

Please sign in to comment.