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

extract raises an error if optional sites vcf input is not passed #50

Open
jethror1 opened this issue May 16, 2023 · 0 comments
Open

extract raises an error if optional sites vcf input is not passed #50

jethror1 opened this issue May 16, 2023 · 0 comments

Comments

@jethror1
Copy link

  • biometrics version: 0.2.13
  • Python version: 3.8
  • Operating System: Ubuntu 20

Description

When running biometrics extract without --vcf specified, it results in the following error being raised:
image

This looks to stem from the fact that the vcf input is optional, and if not given the self.sites attribute remains an empty list from here:

def _parse_vcf(self):

If the self.sites is then an empty list, the self.pileup attribute is left as None instead of being a DataFrame from here:

def _extract_sites(self, sample):

When extract is then run, and save_to_file() is called, the above error is raised as self.pileup is None and not a dataframe:

pileup_data = self.pileup.to_dict("records")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant