Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the classification code so that a second classification round can be performed with a targeted viral database.
To trigger viral reclassification, add
--run_viral_reclassification
. This will extract the viral+unclassified file only from the first classification round, classify this file with a viral database, then merge the kraken reports and assignment files (overwriting read assignments/counts where a new classification was made, keeping where it wasn't) before continuing with the downstream pipeline steps (hcid/spike detection, read extraction, report generation).In the process:
unique_id
,database_name
,file
for clarity (rather than pairsunique_id
,file
Note there are updates to
report.py
,assignments.py
,merge.py
andtaxonomy.py
. These files all exist in a separate project https://github.com/rmcolq/krakenpy (along with unit tests) but given I haven't put it on bioconda they are imported directly at the moment. These classes simplify much of the kraken report handling and I intend to separately continue refactoring other python scripts to import the same classes.Some command line parameters have changed during this refactor. Namely:
database_set
and is nowkraken_database.default.name
k2_host
and is nowkraken_database.default.host
k2_port
and is nowkraken_database.default.port
database
and is nowkraken_database.default.path
The config file for climb has had defaults removed which no longer apply - can be updated on climb and saved on github if required.
Note that this has been compared for output changes on tests when virus recalling is switched off and kraken is running against the same database and it doesn't change outputs in this case.