sbslee / fuc

Frequently used commands in bioinformatics
https://sbslee-fuc.readthedocs.io
MIT License
48 stars 5 forks source link

[VCF] Issue reading vcf from mutect2, strelka2 #62

Closed ironb25 closed 2 years ago

ironb25 commented 2 years ago

Hello,

I am trying to read vcf file from mutect2 and strelka2 and getting this error below.

Code:

from fuc import pyvcf
vf = pyvcf.VcfFrame.from_file('mutect2.vcf')
vf.df

Error:

DtypeWarning: Columns (0) have mixed types.Specify dtype option on import or set low_memory=False.
  vf = pyvcf.Vcf

Could you please help?

Thanks Rohan

sbslee commented 2 years ago

@ironb25,

Thanks for your interest in using fuc!

  1. First off, DtypeWarning is a warning, not an error. Are you sure you're getting an error? If there was an error, please copy and paste the entire error message. Also, can you show me the output of:
>>> vf.df.head()
  1. If you are sure there was an error while importing a VCF file (i.e. 'mutect2.vcf'), could you send me the file so I can take a look? If it's small enough you can directly attach it to this thread. If not, you can send me an email to sbstevenlee@gmail.com.

  2. Which version of fuc are you using? The latest is 0.33.1.

sbslee commented 2 years ago

The conversation has been moved to email, and the problem was indeed caused because the OP was using an old version of fuc. Reinstalling the latest version resolved the issue. Closing this.