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

EVA-1665 VCF headers list the contigs in accession order #172

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jmmut
Copy link
Contributor

@jmmut jmmut commented Sep 13, 2019

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 and others added 3 commits September 13, 2019 17:04
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.

private void sortContigFile() {
try {
Process process = Runtime.getRuntime().exec(new String[]{"sort", this.output.getAbsolutePath()});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

2 participants