Closed fxwiegand closed 2 months ago
LGTM. One thing we might think about, is making the
units.tsv
also work with just one of those options' columns present. That way, we wouldn't have to always drag around a bunch of empty columns. But this might entail changing quite a bit of code whenever these columns are called. What do you think?
I absolutely see the point you're making. We would need to make the pandas calls on these lines a more robust so they can handle when the bam columns are not present:
Besides that these lookup
calls from snakemake would cause trouble. I am not sure how they handle missing columns.
You can nowadays offer a default=""
argument in the lookup()
function, to capture those: https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#the-lookup-function. We just have to enforce the latest Snakemake version, then. Would be willing to create a new PR referencing this discussion? Then we can continue discussing there, as well.
You can nowadays offer a
default=""
argument in thelookup()
function, to capture those: https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#the-lookup-function. We just have to enforce the latest Snakemake version, then. Would be willing to create a new PR referencing this discussion? Then we can continue discussing there, as well.
Yeah i will give it shot and we will discuss further in the new PR! This would also be quite nice for saving the versioning because now i think about it #94 was indeed a breaking change since the config needs the new bam columns for the workflow to run.
Yeah, I think you are right. But I have honestly not payed enough attention to what's a breaking change in these workflows in the past. But we should. This regularly trips up users (us included). :sweat_smile:
Yeah, I think you are right. But I have honestly not payed enough attention to what's a breaking change in these workflows in the past. But we should. This regularly trips up users (us included). 😅
Yep indeed - @Addimator #105 will let you remove the bam columns from your config again.
Just a quick PR to update the docs for the recent changes from #94.