@@ -86,19 +86,25 @@ else if (inputFile.isDirectory())
8686
8787 public static FileType GVCF = new FileType (Arrays .asList (".g.vcf" , ".gvcf" ), ".g.vcf" , FileType .gzSupportLevel .SUPPORT_GZ );
8888
89+ private static File convertInput (File f )
90+ {
91+ return AbstractGenomicsDBImportHandler .TILE_DB_FILETYPE .isType (f ) ? f .getParentFile () : f ;
92+ }
93+
8994 public static List <File > copyVcfsLocally (SequenceOutputHandler .JobContext ctx , Collection <File > inputGVCFs , Collection <File > toDelete , boolean isResume ) throws PipelineJobException
9095 {
9196 try
9297 {
9398 //Note: because we cannot be certain names are unique, inspect:
9499 HashMap <File , String > inputToDest = new LinkedHashMap <>();
95- Set <String > uniqueDistNames = new CaseInsensitiveHashSet ();
100+ Set <String > uniqueDestNames = new CaseInsensitiveHashSet ();
96101
97102 inputGVCFs .forEach (x -> {
103+ x = convertInput (x );
98104 String fn = x .getName ();
99105
100106 int i = 1 ;
101- while (uniqueDistNames .contains (fn ))
107+ while (uniqueDestNames .contains (fn ))
102108 {
103109 String basename = SequenceAnalysisService .get ().getUnzippedBaseName (x .getName ());
104110 String ext = x .getName ().replaceAll (SequenceAnalysisService .get ().getUnzippedBaseName (x .getName ()), "" );
@@ -112,7 +118,7 @@ public static List<File> copyVcfsLocally(SequenceOutputHandler.JobContext ctx, C
112118 ctx .getLogger ().info ("Renaming cached file from: " + x .getName () + " to " + fn );
113119 }
114120
115- uniqueDistNames .add (fn );
121+ uniqueDestNames .add (fn );
116122 inputToDest .put (x , fn );
117123 });
118124
@@ -138,6 +144,7 @@ public static List<File> copyVcfsLocally(SequenceOutputHandler.JobContext ctx, C
138144 List <File > vcfsToProcess = new ArrayList <>();
139145 for (File f : inputGVCFs )
140146 {
147+ f = convertInput (f );
141148 File destFile = new File (inputToDest .get (f ));
142149
143150 File origIdx = null ;
0 commit comments