Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadVariants Header Format #1815

Georgehe4 opened this issue Dec 3, 2017 · 1 comment

LoadVariants Header Format #1815

Georgehe4 opened this issue Dec 3, 2017 · 1 comment


Copy link

@Georgehe4 Georgehe4 commented Dec 3, 2017

I am trying to load a variant file but have been having issues with the header format -- any suggestions?

IllegalArgumentExceptionTraceback (most recent call last)
<ipython-input-14-f4a5abfe2012> in <module>()
      1 # Variants
----> 2 variants = ac.loadVariants(variantFile)

/opt/cgl-docker-lib/mango/mango-python/adam/adam-python/bdgenomics/adam/adamContext.pyc in loadVariants(self, filePath, stringency)
    213         adamRdd = self.__jac.loadVariants(filePath,
--> 214                                           _toJava(stringency, self._jvm))
    216         return VariantRDD(adamRdd, self._sc)

/usr/lib/spark/python/lib/ in __call__(self, *args)
   1131         answer = self.gateway_client.send_command(command)
   1132         return_value = get_return_value(
-> 1133             answer, self.gateway_client, self.target_id,
   1135         for temp_arg in temp_args:

/usr/lib/spark/python/pyspark/sql/utils.pyc in deco(*a, **kw)
     77                 raise QueryExecutionException(s.split(': ', 1)[1], stackTrace)
     78             if s.startswith('java.lang.IllegalArgumentException: '):
---> 79                 raise IllegalArgumentException(s.split(': ', 1)[1], stackTrace)
     80             raise
     81     return deco

IllegalArgumentException: u'Field type for provided header line (FORMAT=<ID=MQ,Number=1,Type=Integer,Description="RMS Mapping Quality">) does not match supported line (FORMAT=<ID=MQ,Number=1,Type=Float,Description="Root mean square (RMS) mapping quality">)'
@Georgehe4 Georgehe4 changed the title LoadVariant Header Format LoadVariants Header Format Dec 3, 2017
Copy link

@fnothaft fnothaft commented Dec 3, 2017

You should be able to bypass any validation errors with:

from bdgenomics.adam.adamContext import ADAMContext
from bdgenomics.adam.stringency import LENIENT

ac = ADAMContext(sc)
variants = ac.loadVariants(variantFile, stringency=LENIENT)
@Georgehe4 Georgehe4 closed this Dec 4, 2017
@heuermh heuermh added this to the 0.23.0 milestone Dec 7, 2017
@heuermh heuermh added this to Completed in Release 0.23.0 Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.