kircherlab / CADD-SV

CADD-SV – a framework to score the effect of structural variants
https://cadd-sv.bihealth.org
MIT License
14 stars 3 forks source link

Conversion from VCF to BED not working #4

Closed stefandiederich closed 1 year ago

stefandiederich commented 3 years ago

Dear all, thanks for developing a great tool like that. I have CNVs in VCF format from GATK analysis which I am trying to convert to BED like you described in the readme. Unfortunately everything I get is an empty bed file. The command I am using is as following:

SURVIVOR vcftobed /media/Berechnungen/1332-21.vcf 0 -1 /media/Berechnungen/1332-21.bed

I am not getting any error. Do you have any idea what is happening there? Bests Stefan

kleinertp commented 3 years ago

I can not replicate your error, This command line works for me using VCFv4.1 Do you use

fileformat=VCFv4.1?

stefandiederich commented 3 years ago

okay it is actually VCFv4.2.

I attached to used file here. The alignment was done against HG19.

1332-21.zip

kleinertp commented 3 years ago

SURVIVOR unfortunately has no manual that would explain how to use it for different versions of VCF-formats or why exactly it wouldn't work in this case.

I cannot guarantee that this following line is completely correct, However it creates a bedfile for your file

cut -f1,2,8 1332-21.vcf | sed 's/END=|//g' | sed '/#/d' | awk '{print $1 "\t" ($2+1) "\t" ($3+1)}' > 1332-21.bed

Remember that the type of SV (DEL,INS,DUP) has to be stated in the 4th column of your bedfile

stefandiederich commented 3 years ago

Thanks for your help, I just removed the | between END= and //g so the command is as following:

cut -f1,2,8 1332-21.vcf | sed 's/END=//g' | sed '/#/d' | awk '{print $1 "\t" ($2+1) "\t" ($3+1)}' > 1332-21.bed

and it is working like a charme. Thanks for your help!

Bests Stefan

kleinertp commented 3 years ago

great

stefandiederich commented 3 years ago

I am sorry to come back to you again. Now I am trying to run the analysis with snakemake with the following command: snakemake --use-conda --configfile config.yml -j 4 -n and get the following error:

RuleException in line 135 of /media/Berechnungen/CADD-SV/Snakefile:
'OutputFiles' object has no attribute 't1'
  File "/BioinfSoftware/Anaconda_new/4.9.2/envs/run.caddsv/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 136, in run_jobs
  File "/BioinfSoftware/Anaconda_new/4.9.2/envs/run.caddsv/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 145, in run
  File "/BioinfSoftware/Anaconda_new/4.9.2/envs/run.caddsv/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 156, in _run
  File "/BioinfSoftware/Anaconda_new/4.9.2/envs/run.caddsv/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 176, in printjob
  File "/BioinfSoftware/Anaconda_new/4.9.2/envs/run.caddsv/lib/python3.9/site-packages/snakemake/executors/__init__.py", line 162, in printjob

Can you see whats going wrong here?

kleinertp commented 3 years ago

Can you provide the input file? It seems like the annotation files are not complete, Did you download the full set of annotations at:

https://cadd-staging.kircherlab.bihealth.org/download

Please note that you can also use the webservice at: https://cadd-staging.kircherlab.bihealth.org/score using a tab separated bed file like this: chr1 123 345 DEL Without installing the webservice yourself.

kleinertp commented 3 years ago

Sorry Stefan, This is a general error that I am about to fix. I will let you know once its working again...

kleinertp commented 3 years ago

'''RuleException in line 135 of /media/Berechnungen/CADD-SV/Snakefile: 'OutputFiles' object has no attribute 't1''''

This issue should be fixed now