Pangolin icon indicating copy to clipboard operation
Pangolin copied to clipboard

missing 1 required positional argument: 'type_code'

Open astulaaa opened this issue 2 years ago • 4 comments

Hello, I am getting this kind of error. The input files are hg38 based, db and and reference used were the same as the ones suggested in theGoogle Colab code. My input vcf file at least visually appears to be formatted exactly the same as your example vcf.

Using CPU Traceback (most recent call last): File "anaconda3/envs/pytorch/bin/pangolin", line 8, in sys.exit(main()) File "anaconda3/envs/pytorch/lib/python3.10/site-packages/pangolin/pangolin.py", line 238, in main variants.infos["Pangolin"] = vcf.parser._Info( TypeError: Info.new() missing 1 required positional argument: 'type_code'

Could you help me with this please? Asta

astulaaa avatar Aug 31 '22 06:08 astulaaa

Hi,

Sorry about this, it looks like installing PyVCF with pip is broken. Could you follow the updated installation instructions on the README? Thank you!

tkzeng avatar Sep 16 '22 00:09 tkzeng

@astulaaa You can fix it by:

!pip install "setuptools<58" --upgrade !pip install pyvcf gffutils biopython pandas pyfastx

sermare avatar Mar 24 '23 21:03 sermare

Hi,

Sorry about this, it looks like installing PyVCF with pip is broken. Could you follow the updated installation instructions on the README? Thank you!

Hey @tkzeng, I tried pip install pyvcf gffutils biopython pandas pyfastx and still the same error. Could you please help?

sruthisrini avatar Mar 08 '24 10:03 sruthisrini

@tkzeng if you're open to it, I've submitted a PR to remove PyVCF from the dependencies since a) it's been basically abandoned and b) when digging into some of the bugginess, I noticed that there are actually two slightly versions of PyVCF 0.6.8 (latest)...

That PR replaces PyVCF with pysam, which should also offer much stricter VCF parsing. Running a quick test with the example VCF seems to work fine.

kkchau avatar Apr 03 '24 23:04 kkchau