fritzsedlazeck / SURVIVOR

Toolset for SV simulation, comparison and filtering
MIT License
354 stars 47 forks source link

problem with gunzipped vcf.gz #115

Open stefanucci-luca opened 4 years ago

stefanucci-luca commented 4 years ago

Hi Fritz,

I have a few thousands of vcf.gz, one per sample. They all have SV called with manta and I'd like to merge them. I saw I can't use .vcf.gf file, so I've unzipped them with bcftools:

bcftools view $i > $(basename -s .gz ${i})

While doing this I get few warnings about some coordinates: e.g.

INFO/END=128265288 is smaller than POS at 10:128265289

then I created a list with ls -1 *.vcf

I run the command:

SURVIVOR merge ${list} 1000 2 1 0 0 30 ${out}

But I get File Parser: could not open file: ${list}

I tried with other vcf and it works ok. Do you have any suggestions?

Thanks for your help, Luca

fritzsedlazeck commented 4 years ago

Hi Luca, I think the ${list} is the problem as SURVIVOR indicates. Is list a variable to the file that holds the list? If so try $list

Its easier to unzip them with eg. gunzip *gz Then do als *vcf > mylist

Then SURVIVOR merge mylist 1000 2 1 0 0 30 myoutput.vcf

You are generating a consensus of at least 2 with that command. Just checking.

Thanks Fritz

stefanucci-luca commented 4 years ago

I think I've found the problem.. I don't know why but if I wrap the script in a bash script that looks like:

#!/usr/bin/env bash
list='~/funcgen_dir/BPD_WGS/aggregate_VCF_BPD/SV/list_vcf_file' # list od the sample to merge, one per line as pat/to/sample.vcf
out='~/funcgen_dir/BPD_WGS/aggregate_VCF_BPD/sv/bpd/merged_SV_latest.vcf' # latesst on 26 march 2020 are the on in direcotry WGS10K/ilmn/20161019/UC01342705/*/Variations/*.SV.vcf.gz
export PATH=/home/ls760/SURVIVOR/Debug:$PATH
SURVIVOR merge ${list} 1000 2 1 0 0 30 ${out}

Is not working, but if I run from the command shell:

export PATH=/home/ls760/SURVIVOR/Debug:$PATH
SURVIVOR merge ~/funcgen_dir/BPD_WGS/aggregate_VCF_BPD/SV/list_vcf_file 1000 1 1 0 0 30 ~/funcgen_dir/BPD_WGS/aggregate_VCF_BPD/sv/bpd/merged_SV_latest.vcf

works like a charm, any suggestions?

Thanks,

Luca

fritzsedlazeck commented 4 years ago

Try: SURVIVOR merge $list 1000 2 1 0 0 30 $out

Cheers Fritz