dellytools / delly

DELLY2: Structural variant discovery by integrated paired-end and split-read analysis
BSD 3-Clause "New" or "Revised" License
413 stars 136 forks source link

min and max SV size #362

Closed skeremaydin closed 5 months ago

skeremaydin commented 5 months ago

Hi, how can I set the min sv size output? delly lr outputs min sv size = 15, I want to add option to get sv size min 50.
-p [ --max-reads ] arg (=15) max. reads for consensus computation (from delly lr --help). Is this our option to change?

tobiasrausch commented 5 months ago

There is currently no delly option for this but you can easily filter the BCF output using BCFtools. For instance, to get deletions greater or equal 50bp:

bcftools filter -i '((INFO/END - POS) >= 50) && (INFO/SVTYPE=="DEL")' delly.bcf

skeremaydin commented 5 months ago

Thanks. I have seen this code in one of the issues. I will try it again.

Can I edit the code to obtain the output as all SV types >= 50bp I am asking this because delly does not write SVLEN=blabla; for INVs and DELs. It writes them as CIPOS/CIEND

skeremaydin commented 5 months ago

bcftools filter -i '(INFO/SVLEN == "." || INFO/SVLEN >= 50)' delly/delly_tumor.vcf > delly/dellyfilteredmeta_tumor.vcf then; bcftools filter -i '((INFO/SVTYPE="DEL" && INFO/END - POS >= 50) || INFO/SVTYPE!="DEL")' delly/dellyfilteredmeta_tumor.vcf > delly/dellyfiltered_tumor.vcf you can copy this if someone asks, too