cslarsen / arv Goto Github PK
View Code? Open in Web Editor NEWA fast 23andMe DNA parser and inferrer for Python
License: GNU General Public License v3.0
A fast 23andMe DNA parser and inferrer for Python
License: GNU General Public License v3.0
I suspect something has changed recently - can't even run example:
>>> genome.get_snp("rs123")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: '_arv.Genome' object has no attribute 'get_snp'
On Win10 x64, Python 3.6.3 I get an error during installation ( RuntimeError: Error configuring Google hash map)
pipenv install arv
Installing arv…
Looking in indexes: https://pypi.python.org/simple
Collecting arv
Downloading https://files.pythonhosted.org/packages/c2/6a/7198d7adcb9e5f90080c5f2e0bd9dced045f174dd809267b626278995b67/arv-0.9.2.tar.gz (264kB)
Collecting cython>=0.25
Using cached https://files.pythonhosted.org/packages/94/44/6e5aee9916a53f56d32da0770962c9571f8267cd2327b9e58db656d61efe/Cython-0.29.14-cp36-cp36m-win32.whl
Building wheels for collected packages: arv
Building wheel for arv (setup.py): started
Building wheel for arv (setup.py): finished with status 'error'
Running setup.py clean for arv
Failed to build arv
Installing collected packages: cython, arv
Running setup.py install for arv: started
Running setup.py install for arv: finished with status 'error'
Error: An error occurred while installing arv!
ERROR: Command errored out with exit status 1:
command: 'c:\users\jack.virtualenvs\test2-dj1oiwoc\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\jack\AppData\Local\Temp\pip-install-rj7yah2s\arv\setup.py'"'"'; file='"'"'C:\Users\jack\AppData\Local\Temp\pip-install-rj7yah2s\arv\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\jack\AppData\Local\Temp\pip-wheel-rpv4lk08' --python-tag cp36
cwd: C:\Users\jack\AppData\Local\Temp\pip-install-rj7yah2s\arv
Complete output (46 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\arv
copying arv\match.py -> build\lib.win32-3.6\arv
copying arv\traits.py -> build\lib.win32-3.6\arv
copying arv\util.py -> build\lib.win32-3.6\arv
copying arv_init_.py -> build\lib.win32-3.6\arv
copying arv_main_.py -> build\lib.win32-3.6\arv
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Configuring Google hash map
'3rd-party\sparsehash\configure' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\jack\AppData\Local\Temp\pip-install-rj7yah2s\arv\setup.py", line 165, in
"Programming Language :: Python :: 3.6",
File "c:\users\jack.virtualenvs\test2-dj1oiwoc\lib\site-packages\setuptools_init_.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\python36-32\Lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python36-32\Lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python36-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\jack.virtualenvs\test2-dj1oiwoc\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "c:\python36-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python36-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python36-32\Lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python36-32\Lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python36-32\Lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\jack\AppData\Local\Temp\pip-install-rj7yah2s\arv\setup.py", line 86, in run
configure_google_hashmap()
File "C:\Users\jack\AppData\Local\Temp\pip-install-rj7yah2s\arv\setup.py", line 82, in configure_google_hashmap
raise RuntimeError("Error configuring Google hash map")
RuntimeError: Error configuring Google hash map
This is my first ever issue posted on Github. I hope I'm not wasting someone's time. I saw one contributor's comment that any problems users run into should get logged as an issue, so, I'm following suggestions :-)
Regardless, I'm sorry if I misread something or am making a rookie error.
I'm trying to install using pip and am getting same failure with 2 different Python 3 setups. One is Anaconda3 the other Python34.
I invoked this command that has worked with other package installations:
Python -m pip install arv
This is a dump from that session:
C:\Python34>python -m pip install arv
Collecting arv
Using cached arv-0.9.2.tar.gz
Complete output from command python setup.py egg_info:
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Plex\Scanners.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Plex\Actions.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Pythran.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Lexicon.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Scanning.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Parsing.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Visitor.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\FlowControl.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Code.py because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Runtime\refnanny.pyx because it changed.
Compiling C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Tempita_tempita.py because it changed.
[ 1/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Code.py
[ 2/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\FlowControl.py
[ 3/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Lexicon.py
[ 4/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Parsing.py
[ 5/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Pythran.py
[ 6/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Scanning.py
[ 7/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Compiler\Visitor.py
[ 8/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Plex\Actions.py
[ 9/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Plex\Scanners.py
[10/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Runtime\refnanny.pyx
[11/11] Cythonizing C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\Cython\Tempita_tempita.py
Unable to find pgen, not compiling formal grammar.
warning: no files found matching '2to3-fixers.txt'
warning: no files found matching 'Doc*'
warning: no files found matching '.pyx' under directory 'Cython\Debugger\Tests'
warning: no files found matching '.pxd' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Utility'
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
return unpatched['query_vcvarsall'](version, *args, **kwargs)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 259, in query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\bdist_egg.py", line 160, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "C:\Python34\lib\site-packages\setuptools\command\bdist_egg.py", line 146, in call_command
self.run_command(cmdname)
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\install_lib.py", line 10, in run
self.build()
File "C:\Python34\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
_build_ext.run(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\site-packages\setuptools\msvc9_support.py", line 62, in query_vcvarsall
raise distutils.errors.DistutilsPlatformError(message)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 152, in save_modules
yield saved
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 193, in setup_context
yield
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 237, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 267, in run
return func()
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 236, in runner
_execfile(setup_script, ns)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\setup.py", line 278, in <module>
File "C:\Python34\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py", line 1056, in run_setup
run_setup(setup_script, args)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 240, in run_setup
raise
File "C:\Python34\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 193, in setup_context
yield
File "C:\Python34\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 164, in save_modules
saved_exc.resume()
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 139, in resume
compat.reraise(type, exc, self._tb)
File "C:\Python34\lib\site-packages\setuptools\compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 152, in save_modules
yield saved
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 193, in setup_context
yield
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 237, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 267, in run
return func()
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 236, in runner
_execfile(setup_script, ns)
File "C:\Python34\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "C:\Users\mike\AppData\Local\Temp\easy_install-ilunbc5p\Cython-0.27.1\setup.py", line 278, in <module>
File "C:\Python34\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\mike\AppData\Local\Temp\pip-build-s90q0wka\arv\setup.py", line 165, in <module>
"Programming Language :: Python :: 3.6",
File "C:\Python34\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 268, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 836, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 1081, in best_match
return self.obtain(req, installer)
File "C:\Python34\lib\site-packages\pkg_resources\__init__.py", line 1093, in obtain
return installer(requirement)
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py", line 629, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py", line 659, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py", line 842, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py", line 1070, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py", line 1058, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\mike\AppData\Local\Temp\pip-build-s90q0wka\arv\
C:\Python34>
When I try to run DataCrawler.py
on my recently downloaded 23andme genome, I get this error.
Traceback (most recent call last):
File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 168, in <module>
dfCrawl = SNPCrawl(rsids=rsid)
File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 35, in __init__
self.initcrawl(rsids)
File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 43, in initcrawl
self.grabTable(rsid)
File "/home/danielmcnally/github/OSGenome/SNPedia/DataCrawler.py", line 63, in grabTable
bs = BeautifulSoup(html, "html.parser")
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 228, in __init__
self._feed()
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 289, in _feed
self.builder.feed(self.markup)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 167, in feed
parser.feed(markup)
File "/usr/lib/python3.10/html/parser.py", line 110, in feed
self.goahead(0)
File "/usr/lib/python3.10/html/parser.py", line 178, in goahead
k = self.parse_html_declaration(i)
File "/usr/lib/python3.10/html/parser.py", line 269, in parse_html_declaration
self.handle_decl(rawdata[i+2:gtpos])
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/builder/_htmlparser.py", line 112, in handle_decl
self.soup.endData(Doctype)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 365, in endData
self.object_was_parsed(o)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/__init__.py", line 370, in object_was_parsed
previous_element = most_recent_element or self._most_recent_element
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1040, in __getattr__
return self.find(tag)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1278, in find
l = self.find_all(name, attrs, recursive, text, 1, **kwargs)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1299, in find_all
return self._find_all(name, attrs, text, limit, generator, **kwargs)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 528, in _find_all
strainer = SoupStrainer(name, attrs, text, **kwargs)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1596, in __init__
self.text = self._normalize_search_value(text)
File "/home/danielmcnally/github/OSGenome/venv/lib/python3.10/site-packages/bs4/element.py", line 1601, in _normalize_search_value
if (isinstance(value, str) or isinstance(value, collections.Callable) or hasattr(value, 'match')
AttributeError: module 'collections' has no attribute 'Callable'
Hi, I'm getting a RuntimeError: Error configuring Google hash map
while trying to install on Windows 10, python 3.5. My g++ version is 7.2.0. Additionally, I get the two following messages in the trace-back:
'3rd-party\sparsehash\configure' is not recognized as an internal or external commandget
Command "C:\Users\mohit\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\mohit\\AppData\\Local\\Temp\\pip-build-moqo7k4i\\arv\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\mohit\AppData\Local\Temp\pip-wgyn71nf-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\mohit\AppData\Local\Temp\pip-build-moqo7k4i\arv\
This is what is written in usage section.
genome["rs123"]
snp
<SNP: chromosome=7 position=24966446 genotype='AA'>
snp.chromosome
7
snp.position
24966446
snp.genotype
<Genotype 'AA'>
I think you mean to put the first two statements together
genome["rs123"]
snp
becomes
snp = genome["rs123"]
If user inputs a file that can't be parsed, the whole thing fails, and the entire program fails without ability to try/catch the error. Is there a way around this or would it be possible to modify this to do that. Thanks!
Hi,
would it be possible to provide similar functionality for raw data downloaded from familytreedna and ancestrydna websites?
ancestrydna file has the following structure (cols are separated by tabs like for 23andme but ancestry provides two alleles instead of one genotype):
#rsid chromosome position allele1 allele2
rs369202065 1 569388 G G
...
familytreedna .csv file looks like this (cols are separated by commas and put in double quotes):
#RSID,CHROMOSOME,POSITION,RESULT
"rs4477212","1","82154","AA"
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.