CDCgov / mycosnp-nf

CDCgov/mycosnp-nf
Apache License 2.0
36 stars 33 forks source link

SnpEff cloud patch #103

Closed DOH-JDJ0303 closed 1 year ago

DOH-JDJ0303 commented 1 year ago

The SnpEff config and database files are not currently being staged by Nextflow because they are being supplied as an argument via the modules.config file, rather than as a process input. This is only an issue when running on cloud because the files must be staged before they can be used. Fixing this issue revealed several other issues with the current format. Specifically, only the name of the database is supplied via the "--species" flag in MycoSNP, which means the database files are never staged. My workaround for this was to supply the directory containing the config file (i.e., ${projectDir}/assets/snpeffdb/) and database files instead of just the config file (i.e., ${projectDir}/assets/snpeffdb/snpEff.config) as input for the "--snpeffconfig" flag. This also solved issues with how SnpEff assumes that database files are within a subdirectory of the config file directory. This approach assumes that your config file is named "snpEff.config" and that your database is in a subdirectory called "data". There are probably better ways to approach this, but I aimed for making the smallest number of changes possible.