Hi there. Thank you very much for this great pipel...
# mag
e
Hi there. Thank you very much for this great pipeline. I hope I am posting in the right channel. I am confused with something while using nf-core/mag. • I am working with ancient metagenome data • I analyzed samples with
--binning_map_mode own
to calculate ancient DNA damage parameters • Now I would like to use
binning_map_mode all
parameter and resume the pipeline to get cross sample depths. • The question is: Will the pipeline redo all the binning steps? Sometimes pipeline redo some of the steps and I don't want to change the current results Thanks for your replies.
j
Yes, because many of the binners need to use depth information, and mapping to others will change the input depth files (and thus Nextflow considers the original binners as invalid results) Note that switching to
all
will break assumptions with pyDamage and give you dodgy damage statistics.
e
Thank you James. Yes, I've read the limitations of ancient dna sub workflow. But I would like to use
--binning_map_mode all
just to get cross sample depths, I am sure ancient DNA parameters will fail. But I still don't understand why pipeline redo the binning steps? I thought binning only works for sample-wise assembly. So you assemble one sample or group (let's say sample1), and align only reads from sample1 to the contigs assembled from sample1. Is there a way to get cross sample depth without re-triggering binning step using the pipeline?
👍 1
j
(@Diego Alvarez Saravia correct me if I'm wrong, I've not looked at this sectionf or a while and never run
all
myself), but it's about the way Nextflow handles cache invalidation. From a Nextflow point of view: binning map mode tells the Nextflow how to generate the depth files. If you now say 'align reads from all samples' against the contigs', this will change the depth file itself because it follows a different route in an
if_else
statement (can send the palce in the code if you're interested). The depth file is then sent to a binner. Nextflow will go 'ok this input file is not the same as the one I had the first time I ran this binner, therefore the original results are no longer valid, and I need to regenerate them'. Note that Nextflow's
-resume
is rather mysterious , so ti's my conservative prediction taht it will resume - you could try anyway and hope it doesn't re-do the binning if it successfully finished the first time around.
✅ 1
To clarify: there are a bunch of 'grouping' steps that groups reads or BAM files or depth files together, which ultimately are changing the inputs in downstrema steps
e
Thank you James.
j
You're welcome! I hope you're doing well , you're a PI now right?
e
Yes, I hope you are doing well too, take care!