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

add CreateVariantIngestFiles integration test #7071

Merged
merged 3 commits into from
Feb 8, 2021

Conversation

mmorgantaylor
Copy link
Member

Copy link
Contributor

@kcibul kcibul left a comment

Choose a reason for hiding this comment

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

Looks great!

private static final String sample_map_file = "test_sample_map.tsv";
private static final File outputDir = createTempDir("output_dir");

// TODO why can't I run Collections.sort() here?
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't run anything other than variable definitions here (ie no blocks of code). In Java you can run code here by saying:

static {
   // your code
}

but that's generally bad form since you don't really know when that code will run. The better place to put this would be in the constructor for this class. Although in your case I would just sort the three things by hand since they're literals anyway


public class CreateVariantIngestFilesIntegrationTest extends CommandLineProgramTest {

private static final String input_vcf_file = "NA12878.haplotypeCalls.reblocked.chr20.100k.vcf.gz";
Copy link
Member Author

Choose a reason for hiding this comment

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

@kcibul is it better practice to move all of these inside the test? I'd thought eventually we may have other tests that would use them, but for now there's just the one.
OR if these should stay here, should I also move the "expected" file names out here as well? it's not consistent right now and I don't have any real rationale for their being defined one place or another.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah -- either way seems reasonable to me. FWIW I think I would put them inside the test for now... but that's just personal preference

Copy link
Member Author

Choose a reason for hiding this comment

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

great, moved them inside the test - can always refactor if/when we add more tests if they use the same files

@mmorgantaylor mmorgantaylor merged commit e194d72 into ah_var_store Feb 8, 2021
@mmorgantaylor mmorgantaylor deleted the mmt_variant_injest_tests branch February 8, 2021 18:25
Marianie-Simeon pushed a commit that referenced this pull request Feb 16, 2021
* add CreateVariantIngestFiles integration test

* clean up

* define all needed files inside test
kcibul pushed a commit that referenced this pull request Mar 9, 2021
* add CreateVariantIngestFiles integration test

* clean up

* define all needed files inside test
mmorgantaylor added a commit that referenced this pull request Apr 6, 2021
* add CreateVariantIngestFiles integration test

* clean up

* define all needed files inside test
This was referenced Mar 17, 2023
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.

3 participants