-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Adds FileDictMixin #347
base: dev
Are you sure you want to change the base?
Conversation
Hi @ebolyen @lizgehret Let me know if this makes sense to you or if you have any questions. |
solves #346
Adds FileDictMixin class that includes the function file_dict.
For per sample directories it returns a mapping of sample id to another dictionary where keys represent the ID and values correspond to the filepath for each file.
For files, it returns a mapping of ID to filepath for each file.
To create the ID the specified suffix is removed from the filename. it is expected that the suffix is given with the used separator character like ".report"
This mixin can only be added to classes with a pathspec attribute.
For now it is added to
Kraken2ReportDirectoryFormat
andKraken2OutputsDirectoryFormat
.I also removed GenomeDataDirFmt and its genome_dict function and added FileDictMixin to GenesDirectoryFormat, ProteinsDirectoryFormat, LociDirectoryFormat and GenomeSequencesDirectoryFormat
This Mixin would also work with
MAGSequencesDirFmt
andMultiMAGSequencesDirFmt
.