-
Notifications
You must be signed in to change notification settings - Fork 60
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
Auto-detect file format better when importing BED or TSV bookmarks #4362
Conversation
a236012
to
378640d
Compare
Presently, neither import is working for me on this branch. No errors in the console |
what do you think about the conceptual aspect of the PR? making the user explicitly choose file type? |
Honestly, don't really think it's necessary; you hardly ever see file acceptance like this anymore...if we want more explicit file support we can check the extension on the supplied file and apply the separate functions to a TSV vs BED, and should probably give the user an error message if they give a bad file or if something went wrong. The only difference between the TSV and BED functions is how they handle the assemblies -- I can see a desire to more cleanly handle these for code readability, but this could be done with an if statement. I don't think there's a ton of confusion around the file differences, since they come from our system. |
this is sort of why i proposed the PR, because i think this is something that we can't necessarily handle it with an if statement. the current code automatically imports column 5 as the assembly name, regardless of whether it is tsv or bed. bed is a generic format that exists here https://genome.ucsc.edu/FAQ/FAQformat.html#format1 and if a user imported a bed file not generated by jbrowse, then that column might be score, or some other thing. to me, this means that we should make the user explicitly say they are importing bed, instead of automatically importing column 5 as the assembly name |
Perhaps I am not understanding fully --
|
|
from on call discussion we'll try to keep the process of auto-detecting the file type from contents instead of explicitly asking user |
this is an alternative to #4360 that retains the TSV format, but tries to make it more explicit on import what file type is being imported. this adds extra UI steps for the user, but (hopefully) the explicitness can potentially avoid issues
I came around to the idea of retaining the TSV because it is indeed a 'bulk format' that exports everything to a single file in a way that BED file does not