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

Fix corrupt dedup output for inputs with quotes #194

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

hkariti
Copy link

@hkariti hkariti commented Dec 7, 2023

When running dedup on a pairsum files that includes quotes in the QUAL field, the result would be a corrupt file. The to_csv method would quote the entire column, and would also escape the quote with a second quote. This results in a file that has QUAL and SEQ of different lengths. To fix this, we ask DataFrame.to_csv to never quote the output.

Hagai Kariti and others added 3 commits December 7, 2023 15:54
When running dedup on a pairsum files that includes quotes in the QUAL field, the result would be a corrupt file. The to_csv method would quote the entire column, and would also escape the quote with a second quote. This results in a file that has QUAL and SEQ of different lengths. To fix this, we ask DataFrame.to_csv to never quote the output.
@Phlya
Copy link
Member

Phlya commented Jan 3, 2024

Looks good, thank you for the fix!
I am curious - where do you encounter such files though?

@Phlya Phlya merged commit 3a155ce into open2c:master Jan 3, 2024
5 checks passed
@hkariti
Copy link
Author

hkariti commented Jan 4, 2024

Heh. It was a regular sequencing output, nothing fancy. It was done by an external company and I think they're using some new machine. Maybe it decided to utilize the full range of QUAL values for this one :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants