Display a more intelligent error message if the user runs a locus traversal across an unmapped reads file.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1238 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2009-07-14 18:36:09 +00:00
parent 99ddd8ab15
commit 76b09a879b
1 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,8 @@ public class SAMDataSource implements SimpleDataSource {
* @return an iterator for that region
*/
private StingSAMIterator seekLocus( GenomeLoc location ) throws SimpleDataSourceLoadException {
if( getHeader().getSequenceDictionary().getSequences().size() == 0 )
throw new StingException("Unable to seek to the given locus; reads data source has no alignment information.");
return createIterator( new MappedStreamSegment(location) );
}