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

Issue with Write method in Readers #799

Open
Alexander-Sol opened this issue Sep 13, 2024 · 1 comment
Open

Issue with Write method in Readers #799

Alexander-Sol opened this issue Sep 13, 2024 · 1 comment

Comments

@Alexander-Sol
Copy link
Contributor

In Readers, the WriteResults methods calls CanRead to validate a file path.

CanRead checks the intended output path for a given file extension from SupportedFileType. However, these types contain specific text that helps to identify which software generated the file.

If you're trying to write to a file that's named differently from the input file, it will be modified. (e.g., for MsFraggerPeptide, a file path of "FraggerPeptideCopy.tsv" would be modified to "FraggerPeptideCopy.tsvpeptide.tsv")

I don't think this is the intended behaviour. CanRead should probably check the extension by call GetExtension, and modify by stripping the existing extension and replacing it.

@nbollis
Copy link
Member

nbollis commented Sep 13, 2024

This is a great point and should be addressed. The original implementation did not account for us expanding to a dozen or more different files that all end with 'tsv'

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