Skip to content

Hsp class is not typesafe #354

@sbliven

Description

@sbliven

The Hsp class and classes that use it (e.g. BlastXMLParserTest) give lots of 'Raw type' warnings. In this case these are not benign warnings, but flag a real possibility for some type errors. The problem is that we're trying to instantiate a sequence from a string without knowing what type of sequence that is. For instance, if you built an Hsp<ProteinSequence, AminoAcidCompound> with a string like "ACTG" then it would actually create a DNASequence, potentially causing errors.

I'm not sure what the best pattern to avoid this is. Maybe the constructor to Hsp needs to take a pair of SequenceReader objects, which can be supplied by the calling code (e.g. BlastHspBuilder).

Original author: @paolopavan

Metadata

Metadata

Assignees

Labels

bugBugs and bugfixeswontfixHard or unrealistic to fix

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions