-
Notifications
You must be signed in to change notification settings - Fork 3
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
Empty PAF #7
Comments
Add a test case and skip parsing tags for empty pd.DataFrame.
I've added a branch pip install --upgrade git+https://github.com/alexomics/read-paf@issue7 Let me know if that works 😊 |
There may also be a better way of checking if the DataFrame is empty, see: https://stackoverflow.com/a/24933234. Though it's worth considering what is empty? E.g: no rows and named columns? |
Wow, thanks for such as fast response and fix! I wonder if the columns of the df should be the standard 12 PAF columns (same as if there were alignments), with just no rows as you allude to above? Currently, I'm getting just an empty df with no columns. |
Hi @alexomics , just wondering if you could point me in the easiest way to retain the field headers of the df even if the PAF is empty? Thanks! |
The easiest way is for me to return the DataFrame with the column names already there 😅 If you give v0.0.10a2 a go let me know if that works or has any unexpected behaviour. I'll try to get this on to PyPI ASAP! |
Wow, thanks so much! Gave it a go and it's great! |
Add a test case and skip parsing tags for empty pd.DataFrame.
I've published this as v0.0.10. Thanks for testing it out! |
Hi @alexomics ,
Thanks again for the great tool!
I hit a bug where I had an empty PAF (no read alignments, this seems to be valid output from minimap2?). Tried reading this in with
parse_paf
into a pandas dataframe but fails (I believe because of the tag columns). Is it possible to produce an empty df? Should this be the desired behaviour?To reproduce:
Thanks!
The text was updated successfully, but these errors were encountered: