Hi everyone, I have a doubt about the `nft-bam` pl...
# nf-test
a
Hi everyone, I have a doubt about the
nft-bam
plugin. The context: I'm writing a test to check if successive runs of
paraphase
produce the same BAM output; however, since the output BAM has timestamps in the header, I cannot make my test rely on the comparison between snapshotted md5sums (so
assert snapshot(process.out).match()
won't work). To overcome this, I decided to use the nft-bam plugin. I therefore loaded it in my
nf-test.config
, and wrote in my `main.nf.test`:
Copy code
assert bam("${params.outdir}/${sample}/${sample}.paraphase.bam").getReadsMD5()
The test runs successfully. However, am I really testing the consistency of successive test runs? After all, the documentation states that
.getReadsMD5()
only returns the md5sum of the raw reads, and not that it compares the md5sum with the one of the previous test run. Is the fact that I am using
.getReadsMD5()
in an nf-test
assert
statement automatically checking the md5sum of the previous run? Or shall I write a dedicated process to compare strings across 2 successive runs?
s
you need to snapshot the reads md5
this 2
a
Ah, got it. Thank you, @Sateesh_Peri! :)
f
I guess that is what you are testing, but I think paraphase didn't create stable reads last I checked. So don't be surprised if the md5sums from
.getReadsMD5()
don't match.
a
Thank you, @Felix Lenner. I wasn't aware of this!
n
In that case, you can still use `.getStatistics()`: https://nvnieuwk.github.io/nft-bam/dev/usage/#getstatistics-method (and thank you for trying the plugin!)
👍 1
this 1
f
Yeah, that is what I went for. If I remember correctly, it was the secondary alignments that were unstable. But it could be that this is not a problem if you are just running one gene at a time. Let me know!
👍 1
a
Thanks, @Nicolas Vannieuwkerke, good point
🎉 1
@Felix Lenner I am running the test against a panel of genes, but always one at a time, in part to reduce test waiting times, and in part because I noticed that the keys in the JSON output can differ from one gene to the other (so I can write dedicated assertions about the JSON structure)
👍 1