-
Notifications
You must be signed in to change notification settings - Fork 11
ENH: Semantic Type for fetch-busco-db
output
#75
Conversation
# File collections for text files | ||
( | ||
ancestral, | ||
dataset, | ||
lengths_cutoff, | ||
scores_cutoff, | ||
links_to_ODB10, | ||
ancestral_variants, | ||
ogs_id, | ||
species, | ||
prfls, | ||
hmms, | ||
refseq_db_md5 | ||
) = [ | ||
model.FileCollection(pattern, format=BuscoGenericTextFileFmt) | ||
for pattern in [ | ||
r'.+ancestral$', | ||
r'.+dataset\.cfg$', | ||
r'.+lengths_cutoff$', | ||
r'.+scores_cutoff$', | ||
r'.+links_to_ODB10\.txt$', | ||
r'.+ancestral_variants$', | ||
r'.+ogs\.id\.info$', | ||
r'.+species\.info$', | ||
r'.+\.prfl$', | ||
r'.+\.hmm$', | ||
r'.+refseq_db\.faa\.gz\.md5' | ||
] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @misialq. I wanted to get your input on this first draft of the BuscoDatabaseDirFmt
. I defined all file collections as BuscoGenericTextFileFmt
but I was wondering if you'd like me to create more specific formats for some of these (e.g. hmms
which are the HMMER files).
# Define path maker methods for each | ||
@ancestral.set_path_maker | ||
def ancestral_path_maker(self, name): | ||
return str(name) | ||
|
||
@dataset.set_path_maker | ||
def dataset_path_maker(self, name): | ||
return str(name) | ||
|
||
@lengths_cutoff.set_path_maker | ||
def lengths_cutoff_path_maker(self, name): | ||
return str(name) | ||
|
||
@scores_cutoff.set_path_maker | ||
def scores_cutoff_path_maker(self, name): | ||
return str(name) | ||
|
||
@links_to_ODB10.set_path_maker | ||
def links_to_ODB10_path_maker(self, name): | ||
return str(name) | ||
|
||
@ancestral_variants.set_path_maker | ||
def ancestral_variants_path_maker(self, name): | ||
return str(name) | ||
|
||
@ogs_id.set_path_maker | ||
def ogs_id_path_maker(self, name): | ||
return str(name) | ||
|
||
@species.set_path_maker | ||
def species_path_maker(self, name): | ||
return str(name) | ||
|
||
@prfls.set_path_maker | ||
def prfls_path_maker(self, name): | ||
return str(name) | ||
|
||
@hmms.set_path_maker | ||
def hmms_path_maker(self, name): | ||
return str(name) | ||
|
||
@refseq_db.set_path_maker | ||
def refseq_db_path_maker(self, name): | ||
return str(name) | ||
|
||
@refseq_db_md5.set_path_maker | ||
def refseq_db_md5_path_maker(self, name): | ||
return str(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also wondering if you know a less verbose way of defining all these path_maker
's. I guess I could add methods to the class with a loop but outside of the class definition. I also don't know exactly what this method is for so I'm not sure if returning str(name)
is enough for our use case.
BTW you were right, qiime complains if file collections don't have this path_maker
method overwritten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I managed to do this inside init so the lines above are outdated :)
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 96.77% 96.78% +0.01%
==========================================
Files 42 42
Lines 1548 1586 +38
==========================================
+ Hits 1498 1535 +37
- Misses 50 51 +1 ☔ View full report in Codecov by Sentry. |
I added some test data with the expected file structure and empty files but its a lot of them. Do you think I should follow another approach for testing the |
About this repo
q2-types-genomics
is aqiime2
plugin that defines semantic types (ST) for other plugins.What's new
fetch-busco-db
action which downloads some data to be used in theevaluate-busco
action.fetch-busco-db
's output #74Set up an environment
Run it locally
cd wherever_you_want_to_download_the_data_to
FYI I can't run busco from the visual code terminal (it can find it), only from i-term.
qiime tools import --input-path wherever_you_want_to_download_the_data_to --output-path busco_db.qza --type "ReferenceDB[BuscoDB]"
Running the tests