File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
jbrowse/src/org/labkey/jbrowse/model Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11package org .labkey .jbrowse .model ;
22
3+ import htsjdk .samtools .util .FileExtensions ;
34import htsjdk .tribble .bed .BEDCodec ;
45import htsjdk .tribble .gff .Gff3Codec ;
56import htsjdk .tribble .index .Index ;
@@ -1098,8 +1099,17 @@ else if (TRACK_TYPES.gff.getFileType().isType(finalLocation) || TRACK_TYPES.gtf.
10981099 SequenceAnalysisService .get ().sortGxf (log , finalLocation , null );
10991100 }
11001101
1101- TabixRunner tabix = new TabixRunner (log );
1102- tabix .execute (finalLocation );
1102+ // If JBrowse is using an unaltered input file, trust that index:
1103+ File expectedIdx = new File (finalLocation .getPath () + FileExtensions .TABIX_INDEX );
1104+ if (expectedIdx .exists () && getExpData ().getFile ().equals (finalLocation ))
1105+ {
1106+ log .debug ("Existing index found, will not re-create: " + expectedIdx .getPath ());
1107+ }
1108+ else
1109+ {
1110+ TabixRunner tabix = new TabixRunner (log );
1111+ tabix .execute (finalLocation );
1112+ }
11031113 }
11041114 }
11051115 }
You can’t perform that action at this time.
0 commit comments