Hello. Is there some interest for a nf-core module...
# modules
m
Hello. Is there some interest for a nf-core module that sorts a bed/vcf file before compressing it with tabix ? All in one module with a pipe
a
Does
sort
not already provide/expose the
-O
and
-W
options which allow setting compression and indexing of the VCF as part of command?
m
Right, I see. Yes for VCF files, I can use
bcftools sort
to sort + compress + index in one command. That’s the best. Thank you 🙇 !
Do you know a similar trick for BED files 😅 ?
(sorry, there’s a mistake in my OP. I meant compressing with bgzip. Essentially trying to recreate the first command of this example from the tabix manpage
Copy code
(grep "^#" in.gff; grep -v "^#" in.gff | sort -t"`printf '\t'`" -k1,1 -k4,4n) | bgzip > sorted.gff.gz;
tabix -p gff sorted.gff.gz;
tabix sorted.gff.gz chr1:10,000,000-20,000,000;
a
Hmm. Well BCFtools is bgzip compression internally. So for VCF still use
bcftools/sort
. For this second issue though I am not aware of any existing module