Skip to content

No alignment available after filtering by "display_species"

Marek Szuba requested to merge github/fork/muffato/no_align into release/95

Created by: muffato

Description

When an alignment block doesn't match the required $display_species, the Compara API returns undef. This causes the REST to fail over undefined values.

Use case

http://rest.ensembl.org/alignment/region/taeniopygia_guttata/2:106040000-106040050:1?content-type=application/json;species_set_group=amniotes;method=PECAN;display_species_set=cat;display_species_set=sheep;display_species_set=mus_musculus_casteij

Benefits

The alignment block will now be discarded. If all blocks are discarded, the REST API will show the usual error message (as JSON) e.g. http://rest.ensembl.org/alignment/region/mus_musculus/1:50-52:1?species_set_group=murinae;content-type=application/json;method=CACTUS_HAL

Possible Drawbacks

If applicable, describe any possible undesirable consequence of the changes.

Testing

Have you added/modified unit tests to test the changes?

Yes

If so, do the tests pass/fail?

Yes

Have you run the entire test suite and no regression was detected?

Yes

Changelog

Are you changing the functionality of an endpoint? If so, please give a one line summary for the public facing changelog.

No

Merge request reports