brentp / peddy

genotype :: ped correspondence check, ancestry check, sex check. directly, quickly on VCF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing information in .peddy.ped

olneykimberly opened this issue · comments

Hello,

Peddy is faster and works great! But the .peddy.ped output is empty and I'd love to have the PC1 and PC2 values
#family_id sample_id paternal_id maternal_id sex phenotype het_call_rate het_ratio het_mean_depth het_idr_baf ancestry-prediction PC1 PC2 PC3

I think it has to do with the input ped file which looks like this:
OBG-0024-PLAC_whole_exome OBG-0024-PLAC_whole_exome 0 0 0 -9 G G G G C C G G 0 0 C C A A C C G G C C 0 0 T T 0 0 G G 0 0 0 0 0 0 G G C C C C A A C C C C C C T T G G G G G G A A 0 0 G G A A G G G G C C G C G G G G G G C C A A A A C C CCCCT CCCCT G G 0 0 G G C C A A C C C C C C T

I tried manually making a ped file like so:
OBG-0024-PLAC_whole_exome 1 1 1 2 1
OBG0014-PLAC_whole_exome 1 1 1 2 1
OBG0015-PLAC_whole_exome 1 1 1 2 1

and this failed with the following:
"""
Traceback (most recent call last):
File "/home/kcolney/miniconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "cyvcf2/cyvcf2.pyx", line 93, in cyvcf2.cyvcf2._par_relatedness
File "cyvcf2/cyvcf2.pyx", line 783, in cyvcf2.cyvcf2.VCF._site_relatedness
File "cyvcf2/cyvcf2.pyx", line 406, in call
TypeError: '<' not supported between instances of 'NoneType' and 'float'
"""

Any help would be greatly appreciated! Thank you

Hi, maybe sure your pedigree file is tab-delimited (not space)--and yes, you only need the first 6 columns.
then, you could try to use python 3.7 or higher.

It worked and I couldn't be happier!!! Thank you soo much for the fast reply!!

Just piggingbacking on here,

I came across the same error doe to an invalid pedigree file (in my case an empty file). Would it be possible to add a few checks to the pedigree file formatting? I.e. that there is content in the file and there are a least 6 fields per line separated by tabs.

you mean you added an empty pedigree file and it didnt generate an error? (or warning?)

No, it gave an error similar to the above one. My point is that the error message itself doesn't make it clear that there is any issue with the pedigree file.

Error message:

"""
Traceback (most recent call last):
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "cyvcf2/cyvcf2.pyx", line 97, in cyvcf2.cyvcf2._par_relatedness
  File "cyvcf2/cyvcf2.pyx", line 847, in cyvcf2.cyvcf2.VCF._site_relatedness
  File "cyvcf2/cyvcf2.pyx", line 726, in gen_variants
TypeError: '<' not supported between instances of 'NoneType' and 'float'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/conda/envs/extra-v1.6.1/bin/peddy", line 10, in <module>
    sys.exit(cli())
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/site-packages/peddy/cli.py", line 209, in peddy
    in ("ped_check", "het_check", "sex_check")]):
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/site-packages/peddy/cli.py", line 43, in run
    prefix=prefix, **kwargs)
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/site-packages/peddy/peddy.py", line 971, in ped_check
    min_depth=min_depth, each=each)
  File "cyvcf2/cyvcf2.pyx", line 43, in cyvcf2.cyvcf2.par_relatedness
  File "/opt/conda/envs/extra-v1.6.1/lib/python3.7/multiprocessing/pool.py", line 748, in next
    raise value
TypeError: '<' not supported between instances of 'NoneType' and 'float'