snakemake-workflows / rna-seq-kallisto-sleuth

A Snakemake workflow for differential expression analysis of RNA-seq data with Kallisto and Sleuth.
MIT License
64 stars 43 forks source link

docs: Fix units configuration docs for bam files #104

Closed fxwiegand closed 2 months ago

fxwiegand commented 2 months ago

Just a quick PR to update the docs for the recent changes from #94.

fxwiegand commented 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:

https://github.com/snakemake-workflows/rna-seq-kallisto-sleuth/blob/8d9773e952323eaddcdbad55ee70a076c0203de2/workflow/rules/common.smk#L93-L112

Besides that these lookup calls from snakemake would cause trouble. I am not sure how they handle missing columns.

https://github.com/snakemake-workflows/rna-seq-kallisto-sleuth/blob/8d9773e952323eaddcdbad55ee70a076c0203de2/workflow/rules/bam.smk#L6

https://github.com/snakemake-workflows/rna-seq-kallisto-sleuth/blob/8d9773e952323eaddcdbad55ee70a076c0203de2/workflow/rules/bam.smk#L25

dlaehnemann commented 2 months ago

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.

fxwiegand commented 2 months ago

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.

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.

dlaehnemann commented 2 months ago

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:

fxwiegand commented 2 months ago

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.