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

Identifierv2 #118

Merged
merged 14 commits into from
Jul 17, 2019
Merged

Identifierv2 #118

merged 14 commits into from
Jul 17, 2019

Conversation

junaidnz97
Copy link
Contributor

No description provided.

@junaidnz97 junaidnz97 closed this Jul 1, 2019
@junaidnz97 junaidnz97 reopened this Jul 1, 2019
@Autowired
private VariantWithSamplesAndAnnotationsService service;

@GetMapping(value = "/{identifierId}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would leave this as "identifier". Id is a shorthand of identifier anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

new ParameterizedTypeReference<List<Variant>>() {
});
assertEquals(HttpStatus.OK, response.getStatusCode());
assertTrue(response.getBody().size() > 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

checking at least the important fields like chromosome and position and alleles would be nice. just in case we are returning an object will all fields as null.

Applies to the other test class too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 😃

new ParameterizedTypeReference<List<Variant>>() {
});
assertEquals(HttpStatus.OK, response.getStatusCode());
assertEquals("20", response.getBody().get(0).getChromosome());
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you could assign response.getBody().get(0) to a variable, to make the next statements more meaningful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

junaidnz97 and others added 2 commits July 15, 2019 21:25
Co-Authored-By: Cristina Yenyxe Gonzalez Garcia <cyenyxe@ebi.ac.uk>
@jmmut
Copy link
Contributor

jmmut commented Jul 16, 2019

I tried deploying this locally, and it looks fine. My only comment would be to improve the description of the parameters, like adding an example, explaining that the species and assembly can be looked up in /v1/meta/species/list/, etc

assertEquals("A", variantList.get(0).getReference());
assertEquals(60100L, variantList.get(0).getStart());
assertEquals(60100L, variantList.get(0).getEnd());
assertTrue(variantList.size() > 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

This assert should be executed before trying to access the first element in the list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

assertEquals("1", variantList.get(0).getChromosome());
assertEquals("T", variantList.get(0).getAlternate());
assertEquals("A", variantList.get(0).getReference());
assertTrue(variantList.size() > 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

This assert should be executed before trying to access the first element in the list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 👍

public ResponseEntity getVariants(
@ApiParam(value = "RS or SS identifier of a variant, e.g.: rs55880202", required = true) @PathVariable
String identifier,
@ApiParam(value = "Allowed values can be looked up in /v1/meta/species/list/ in the field named "
Copy link
Contributor

Choose a reason for hiding this comment

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

First letter of the genus, followed by the full species name, e.g. hsapiens. Allowed values can be looked up in /v1/meta/species/list/ in the field named 'taxonomyCode'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

String identifier,
@ApiParam(value = "Allowed values can be looked up in /v1/meta/species/list/ in the field named "
+ "taxonomyCode, e.g.: hsapiens", required = true) @RequestParam String species,
@ApiParam(value = "Allowed values can be looked up in /v1/meta/species/list/ in the field named "
Copy link
Contributor

Choose a reason for hiding this comment

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

Encoded assembly name, e.g. grch37. Allowed values can be looked up in /v1/meta/species/list/ in the field named 'assemblyCode'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed :)

@cyenyxe cyenyxe merged commit 7a83bdc into EBIvariation:master Jul 17, 2019
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