Skip to content

Commit 100b0eb

Browse files
committed
Bugfix to GTF/GFF and jbrowse
1 parent b08bce7 commit 100b0eb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

jbrowse/src/org/labkey/jbrowse/model/JsonFile.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,20 @@ public File prepareResource(User u, Logger log, boolean throwIfNotPrepared, bool
917917
createIndex(targetFile, log, idx, throwIfNotPrepared);
918918
}
919919

920+
if (TRACK_TYPES.bam.getFileType().isType(targetFile) || TRACK_TYPES.cram.getFileType().isType(targetFile))
921+
{
922+
File fileIdx = SequenceAnalysisService.get().getExpectedBamOrCramIndex(targetFile);
923+
if (!fileIdx.exists())
924+
{
925+
if (throwIfNotPrepared)
926+
{
927+
throw new IllegalStateException("This track should have been previously indexed: " + targetFile.getName());
928+
}
929+
930+
SequenceAnalysisService.get().ensureBamOrCramIdx(targetFile, log, false);
931+
}
932+
}
933+
920934
if (doIndex())
921935
{
922936
if (processedTrackDir == null)

0 commit comments

Comments
 (0)