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

3 things: iteritems() vs items(); rect to polar; sorting errors #26

Closed
dmcgoldrick opened this issue Nov 14, 2018 · 6 comments
Closed

Comments

@dmcgoldrick
Copy link

dmcgoldrick commented Nov 14, 2018

  1. using python 3.5+ we get an error because python likes the use of ".items()" not the old ".iteritems()" from the 2.7ish syntax? Is this an issue for others using 3+?

LocusEntryFactory.py: for _, value in position2record.iteritems():

  1. These two sort lines are crashing saying they cannot sort string() < int() or some type conflict

2.1)LocusEntryFactory.py: return sorted(result, key=lambda entry: (self._chrom_sort_function(entry.vcf_record.CHROM), entry.vcf_record.POS, entry.vcf_record.REF))
2.2) ReaderTemplateFactory.py: sorted(contigs.items(), key=lambda x: self._chrom_sort_function(x[0])))

e.g.:
Traceback (most recent call last):
if limit >= 0:
TypeError: unorderable types: AttributeError() >= int()

  1. IlluminaBeadArrayFiles.py", line 600
    def rect_to_polar((x,y)):
    this should be def rect_to_polar(x,y):? does the code even use this function ? Anyhow it's a syntax error for me
@KelleyRyanM
Copy link
Contributor

@dmcgoldrick ,
At the moment, this tool is only compatible with python 2.7.x. The three issues you've noted above are caused by Python 2 vs 3 differences. There is an open pull request (#24) with fixes for python 3 compatibility; however, I was still following up on the syntax error for the rect_to_polar call. As currently, this is a function that takes a single argument, which is a tuple.

@dmcgoldrick
Copy link
Author

dmcgoldrick commented Nov 28, 2018 via email

@KelleyRyanM
Copy link
Contributor

If python 3 compatibility is a critical need, it should be possible to support. I created a new branch at https://github.com/Illumina/GTCtoVCF/tree/python3_compatibility and currently all regression and unit tests are passing with an install of python 3.5.6.

It may be worthwhile to see if the changes in that branch address your issues before it is merged back into develop. This tool supports GTC files written by the latest version of AutoConvert. If have some files where that is not the case, I could try to help troubleshoot.

@dmcgoldrick
Copy link
Author

dmcgoldrick commented Nov 29, 2018 via email

@dmcgoldrick
Copy link
Author

dmcgoldrick commented Nov 30, 2018 via email

@KelleyRyanM
Copy link
Contributor

Thank you for your feedback in improving the tool.

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

2 participants