rotary-genomics / rotary

Assembly/annotation workflow for Nanopore-based microbial genome data containing circular DNA elements
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

delete requirement to check for other polca files. #100

Closed LeeBergstrand closed 10 months ago

LeeBergstrand commented 10 months ago

I ran into this error where Polca wouldn't find the files:

The polca folder has the other files created by the polca run but not these. Does the newer version of Polca not produce these files? Either way, none of these files are used by the follow-on steps, so I removed them from the required outputs.

jmtsuji commented 10 months ago

@LeeBergstrand Interesting that those files were not generated for you. I wonder if we could add a code block like the following to shell in that rule, so that those files are deleted, if they are made?

(polypolish_sam and polypolish_bam would be moved to params)

if [[ -f {params.polypolish_sam} ]]; then
  rm {params.polypolish_sam}
fi

if [[ -f {params.polypolish_bam} ]]; then
  rm {params.polypolish_bam}
fi

This code could be added underneath the final cd in the shell block. Thoughts?

jmtsuji commented 10 months ago

From @LeeBergstrand in #102 :

POLCA leaves an entire folder full of output files not specified in the rule output. I'm considering having it delete its entire folder using temp. See: https://github.com/rotary-genomics/rotary/issues/92

Agreed that just specifying the whole output directory as a temp file might work really well, given that the output files from this rule might be a bit unstable. Shall we pursue this option?

LeeBergstrand commented 8 months ago

@jmtsuji Added code to delete the entire polca directory between runs: https://github.com/rotary-genomics/rotary/commit/e8e237555cc9cfbb44f9906c6822534e685dc105

There was an issue where if polca were rerun on a prior run's data with an existing polca folder, then it would cause errors like the above.

jmtsuji commented 8 months ago

@LeeBergstrand This makes sense -- thanks!