EVA-1665 VCF headers list the contigs in accession order#172
Open
jmmut wants to merge 3 commits intoEBIvariation:masterfrom
Open
EVA-1665 VCF headers list the contigs in accession order#172jmmut wants to merge 3 commits intoEBIvariation:masterfrom
jmmut wants to merge 3 commits intoEBIvariation:masterfrom
Conversation
Of course this is platform dependent, but given that we have some species with lots of contigs (e.g. almost 0.5M for rat or turkey), we can either: - keep the hacky implementation of this commit. - evaluate memory performance of: loading the file into a list, sort the list in memory, write the list. For at least a couple million of 20 bytes strings. If we go for the second option, the changes have to be done in the same place as the current system sort.
jmmut
commented
Oct 1, 2019
|
|
||
| private void sortContigFile() { | ||
| try { | ||
| Process process = Runtime.getRuntime().exec(new String[]{"sort", this.output.getAbsolutePath()}); |
Contributor
Author
There was a problem hiding this comment.
instead of reading sort's standard output, why not using
Suggested change
| Process process = Runtime.getRuntime().exec(new String[]{"sort", this.output.getAbsolutePath()}); | |
| String[] command = {"sort", "-o", this.output.getAbsolutePath(), this.output.getAbsolutePath()}; | |
| Process process = Runtime.getRuntime().exec(command); |
?
it was my bad to use sort without arguments but this is what I had in mind from the beginning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Of course this is platform dependent, but given that we have some
species with lots of contigs (e.g. almost 0.5M for rat or turkey),
we can either:
a list, sort the list in memory, write the list. For at least a
couple million of 20 bytes strings.
If we go for the second option, the changes have to be done in the
same place as the current system sort.