fakedrtom / SVAFotate

MIT License
39 stars 2 forks source link

Output not generated #7

Closed priyambial123 closed 1 year ago

priyambial123 commented 1 year ago

Hello,

I ran this command for annotating the vcf:

svafotate annotate -v "rerun_secondcleanup.GRCh38.pbsv.vcf.gz" -o "rerun_secondcleanup.GRCh38.pbsva4annotate.vcf" -b "SVAFotate_core_SV_popAFs.GRCh38.bed.gz"

Error:

Annotating the following VCF: rerun_secondcleanup.GRCh38.pbsv.vcf.gz

No reciprocal overlap fraction indicated; using default 0.001

Reading the following data source file: rerun_secondcleanup/pbsv/SVAFotate_core_SV_popAFs.GRCh38.bed.gz

Annotating with the following sources and reciprocal overlap fractions:
CCDG    0.001
gnomAD  0.001
1000G   0.001

Gathering SV coordinates from VCF file: rerun_secondcleanup/pbsv/bipolar_rerun_secondcleanup.GRCh38.pbsv.vcf.gz
[W::hts_idx_load2] The index file is older than the data file: ```python

``` rerun_secondcleanup.GRCh38.pbsv.vcf.gz.tbi

Creating pyranges object from VCF data...

Running pyranges.join for:
CCDG

Running pyranges.join for:
gnomAD

Running pyranges.join for:
1000G

Creating pyranges objects per SVTYPE from VCF data...

Adding annotations to output VCF...
Traceback (most recent call last):
  File "miniconda3/envs/svafotate-env/bin/svafotate", line 11, in <module>
    sys.exit(main())
  File "miniconda3/envs/svafotate-env/lib/python3.5/site-packages/svafotate/__main__.py", line 41, in main
    args.func(parser, args)
  File "

miniconda3/envs/svafotate-env/lib/python3.5/site-packages/svafotate/svafotate_main.py", line 1103, in annotate
    if outfile == "vcf"
  File "cyvcf2/cyvcf2.pyx", line 2042, in cyvcf2.cyvcf2.Writer.__init__ (cyvcf2/cyvcf2.c:39257)
TypeError: __init__() takes exactly 2 positional arguments (3 given)

What are the two positional arguments here or is there an error in the installation process

Thank you

fakedrtom commented 1 year ago

Thanks for contacting me. I am having trouble recreating your error so I'm not sure what to recommend right now. It doesn't look like an installation error to me as SVAFotate appears to be running as expected. It is just having trouble writing to an output and the error itself is coming from cyvcf2. Could you try running it with the --out_type parameter? I would try that with the vcf and maybe also again with the vcfgz options. Let me know if either or both of those return the same error. Also maybe check which version of cyvcf2 is running in our env and make sure it is matches what is in the requirements.txt file (cyvcf2==0.30.4).

priyambial123 commented 1 year ago

I tried with out_type parameter with vcf and vcf.gz options, both returned the same error as the one above in previous post. cyvcf2 version is 0.10. I couldn't update it 0.30.4 as there are conflicts with other packages in the conda environment

fakedrtom commented 1 year ago

I'm guessing that is the problem. The error is coming from cyvcf2. I recommend that you upgrade it to the specified version. Did you create a new conda environment for this as outlined (https://github.com/fakedrtom/SVAFotate#installation)? All the packages and their versions listed in requirements.txt should work with one another.

priyambial123 commented 1 year ago

I installed mambaforge and could install all the required packages. There were conflicts with required versions in miniconda3. After installation of the required versions of packages, the output was returned as a vcf file

Thank you

fakedrtom commented 1 year ago

Great! I'm glad that it is working now!