MAF to CRAM converter module: local or nf-core? H...
# modules
c
MAF to CRAM converter module: local or nf-core? Hello, I would like your advice: for the #pairgenomealign pipeline I am adding CRAM support, to optionally output in this format instead of MAF, which consumes a lot of disk space. I am not aware of a MAF to CRAM tool, but the
last/mafconvert
module, which I already use in my pipeline, can do MAF to SAM, and of course the
samtools/view
module can convert SAM to CRAM. The problem is that if the MAF file takes too much space, the SAM file will too. (I am talking about multiple GB per file, which can add up to TB when the pipeline runs on a sample list of a hundred of entries). Therefore I wrote a local module that uses a sequera container where both LAST and samtools are installed, and that module basically does
maf-convert sam foo.maf | samtools view -CT genome.fasta -o foo.cram
. My questions are: • is there an interest for that module to be added to nf-core instead of being local, • if yes, would
last/mafcram
be appropriate even if it does not use the same container? • also, since adding samtools to the LAST container only increases size by ~5%, would it be fine to just add it to all the
last/*
submodules so that #pairgenomealign does not have to download two very similar containers, which would be a 100% increase, or can this be configured within the pipeline?
n
This could be an nf-core module IMO. This does not change anything to the functionality of the tooling and just enables extra output file formats for the same content. It might be better to just update the
last/mafconvert
module and add samtools to it šŸ™‚. That way we don't have many similar modules doing basically the same thing
this 3
Not sure about adding samtools to every
last
module though since only one actually uses it
c
Thanks! I will start to work on it tomorrow unless there are some recommendations against.
Is there any way a pipeline can change the container of a module in
modules/nfcore
via configuration ? This way I would be able to make the other
last
modules reuse the last+samtools container of
last/mafconvert
in #pairgenomealign if we go that direction.
n
Yes you can use the
container
configuration option per process to set the container: https://www.nextflow.io/docs/latest/process.html#directives
šŸ‘ 2