peddy icon indicating copy to clipboard operation
peddy copied to clipboard

get warning when run peddy

Open liushuangmms opened this issue 8 years ago • 12 comments

Hi,

When I try to run peddy, I always got warnings like the following. "WARNING: 24 samples in vcf not in ped:" Does this matter? The results looks fine.

Thanks very much!

liushuangmms avatar Sep 18 '17 16:09 liushuangmms

that means your VCF has samples that are not in the ped file. can you post the full output?

and the output of zgrep -m1 CHROM $vcf ?

brentp avatar Sep 18 '17 16:09 brentp

Sure, here are the full output of the warnings "WARNING: 41 samples in vcf not in ped: Br5190,Br5481,Br5009,Br5310,Br5216,Br5006,Br5391,Br5392,Br2520,Br2469,Br5156,Br2355,Br2379,Br5263,Br5207,Br5249,Br5347,Br2272,Br524$

WARNING: 1 samples in ped not in vcf: nan

^[[1;31mped_check^[[0m plotting ran in 16.6 seconds ^[[1;31mhet_check^[[0m loaded and subsetted thousand-genomes genotypes (shape: (2504, 4604)) in 0.5 seconds /ysm-gpfs/home/sl857/anaconda2/lib/python2.7/site-packages/sklearn/utils/deprecation.py:52: DeprecationWarning: Class RandomizedPCA$ warnings.warn(msg, category=DeprecationWarning) ran randomized PCA on thousand-genomes samples at 4604 sites in 0.8 seconds Projected thousand-genomes genotypes and sample genotypes and predicted ancestry via SVM in 0.0 seconds /ysm-gpfs/home/sl857/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:59: RuntimeWarning: Mean of empty slice. warnings.warn("Mean of empty slice.", RuntimeWarning) /ysm-gpfs/home/sl857/anaconda2/lib/python2.7/site-packages/numpy/core/_methods.py:82: RuntimeWarning: Degrees of freedom <= 0 for s$ warnings.warn("Degrees of freedom <= 0 for slice", RuntimeWarning) ran in 9.9 seconds"

and here is the output of zgrep -m1 CHROM $vcf "#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Br2355 Br2379 Br2452 Br2469 Br2520 Br2294 Br5347 Br2309 Br2078 Br5374 Br2272 Br5321 Br5422 Br5391 Br5392 Br2071 Br5288 Br5006 Br5009 Br5010 Br5190 Br5207 Br5156 Br5243 Br5281 Br5310 Br5336 Br5481 Br5216 Br5230 Br5365 Br5437 Br5252 Br5263 Br5225 Br5249 Br2297 Br2328 Br2364 Br2477 Br2368"

I also checked the IDs in both ped and vcf and they seemed to match each other.

Thanks!

liushuangmms avatar Sep 18 '17 16:09 liushuangmms

This is odd. There must be somethign odd about your ped file. Can you post it here or email it to me? what is the output of cut -f 1 $ped ?

brentp avatar Sep 18 '17 16:09 brentp

The ped file is very large. Actually I got the ped file by converting the plink bim, fam and bed file format.

liushuangmms avatar Sep 18 '17 16:09 liushuangmms

ok. the ped file for peddy only needs the first 6 columns. Seems like you might have an empty row (maybe at the end?)

brentp avatar Sep 18 '17 16:09 brentp

ok, I will check the rows and columns. Thank you very much!

liushuangmms avatar Sep 18 '17 16:09 liushuangmms

I used the first 6 columns in ped file and the warnings disappeared. Thanks very much!

liushuangmms avatar Sep 18 '17 21:09 liushuangmms

Hi, I am getting the following warnings when trying to run peddy on exome vcf file (unfiltered): (Python 2.7.6)

2018-09-17 16:01:16 mdrtc3611 peddy.cli[9666] INFO Running Peddy version 0.4.2 2018-09-17 16:01:16 mdrtc3611 peddy.cli[9666] WARNING 12 samples in vcf not in ped: 37675,40604,42667,43147,43146,39001,42666,40887,39002,40888,37676,42668

2018-09-17 16:01:16 mdrtc3611 peddy.cli[9666] WARNING 1 samples in ped not in vcf: nan

2018-09-17 16:01:16 mdrtc3611 peddy.cli[9666] INFO ped_check Traceback (most recent call last): File "/usr/local/bin/peddy", line 11, in load_entry_point('peddy', 'console_scripts', 'peddy')() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in call return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/home/athinat/bin/peddy/peddy/cli.py", line 207, in peddy in ("ped_check", "het_check", "sex_check")]): File "/home/athinat/bin/peddy/peddy/cli.py", line 43, in run prefix=prefix, **kwargs) File "/home/athinat/bin/peddy/peddy/peddy.py", line 966, in ped_check d = cyvcf2.par_relatedness(vcf_str, AttributeError: 'module' object has no attribute 'par_relatedness'

the output for zgrep -m1 CHROM $vcf is: #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 37675 37676 39001 39002 40604 40887 40888 42666 42667 42668 43146 43147

and for cut -f 1 $ped is:

1 39001 0 42666 2 -9 1 39002 0 42666 2 -9 1 42666 0 0 2 -9 2 40887 42668 42667 1 -9 2 40888 42668 42667 1 -9 2 42668 0 0 1 -9 2 42667 0 0 2 -9 3 40604 43147 43146 1 -9 3 43147 0 0 1 -9 3 43146 0 0 2 -9 4 37676 0 0 1 -9 4 37675 0 0 2 -9

Is it by any chance obvious what I am doing wrong? the ped is space separated not tab Thanks Athina

athitheo avatar Sep 17 '18 13:09 athitheo

you should use tabs. and make sure you don't have any empty lines at the end of the file.

is it possible that you have a really old version of cyvcf2? you could update that as well.

brentp avatar Sep 17 '18 13:09 brentp

Thank you for the immediate reply. I changed spaces for tabs that worked for the initial warnings but when trying to test with setup for cyvcf2 I get the following:

running test Searching for nose Best match: nose 1.3.7 Processing nose-1.3.7-py2.7.egg

Using /home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg running egg_info writing requirements to cyvcf2.egg-info/requires.txt writing cyvcf2.egg-info/PKG-INFO writing top-level names to cyvcf2.egg-info/top_level.txt writing dependency_links to cyvcf2.egg-info/dependency_links.txt writing entry points to cyvcf2.egg-info/entry_points.txt reading manifest file 'cyvcf2.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'cyvcf2.egg-info/SOURCES.txt' running build_ext skipping 'cyvcf2/cyvcf2.c' Cython extension (up-to-date) /home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/config.py:264: RuntimeWarning: Option 'with-coverage' in config file 'setup.cfg' ignored: excluded by runtime environment warn(msg, RuntimeWarning) Failure: ImportError (/home/athinat/bin/cyvcf2-master/cyvcf2/cyvcf2.so: undefined symbol: EVP_sha1) ... ERROR

====================================================================== ERROR: Failure: ImportError (/home/athinat/bin/cyvcf2-master/cyvcf2/cyvcf2.so: undefined symbol: EVP_sha1)

Traceback (most recent call last): File "/home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/home/athinat/bin/cyvcf2-master/cyvcf2/init.py", line 1, in from .cyvcf2 import (VCF, Variant, Writer, r_ as r_unphased, par_relatedness, ImportError: /home/athinat/bin/cyvcf2-master/cyvcf2/cyvcf2.so: undefined symbol: EVP_sha1


Ran 1 test in 0.006s

FAILED (errors=1) root@mdrtc3611:/home/athinat/bin/cyvcf2-master# sudo python setup.py test running test Searching for nose Best match: nose 1.3.7 Processing nose-1.3.7-py2.7.egg

Using /home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg running egg_info writing requirements to cyvcf2.egg-info/requires.txt writing cyvcf2.egg-info/PKG-INFO writing top-level names to cyvcf2.egg-info/top_level.txt writing dependency_links to cyvcf2.egg-info/dependency_links.txt writing entry points to cyvcf2.egg-info/entry_points.txt reading manifest file 'cyvcf2.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'cyvcf2.egg-info/SOURCES.txt' running build_ext skipping 'cyvcf2/cyvcf2.c' Cython extension (up-to-date) /home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/config.py:264: RuntimeWarning: Option 'with-coverage' in config file 'setup.cfg' ignored: excluded by runtime environment warn(msg, RuntimeWarning) Failure: ImportError (/home/athinat/bin/cyvcf2-master/cyvcf2/cyvcf2.so: undefined symbol: EVP_sha1) ... ERROR

====================================================================== ERROR: Failure: ImportError (/home/athinat/bin/cyvcf2-master/cyvcf2/cyvcf2.so: undefined symbol: EVP_sha1)

Traceback (most recent call last): File "/home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/home/athinat/bin/cyvcf2-master/.eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/home/athinat/bin/cyvcf2-master/cyvcf2/init.py", line 1, in from .cyvcf2 import (VCF, Variant, Writer, r_ as r_unphased, par_relatedness, ImportError: /home/athinat/bin/cyvcf2-master/cyvcf2/cyvcf2.so: undefined symbol: EVP_sha1


Ran 1 test in 0.006s

FAILED (errors=1)

Any feedback on that?

athitheo avatar Sep 18 '18 10:09 athitheo

can you install the cyvcf2 from bioconda? otherwise, you'll need libcrypto and libcurl and likely liblzma

brentp avatar Sep 18 '18 12:09 brentp

Bioconda did the job! Thank you Brent

athitheo avatar Sep 19 '18 05:09 athitheo