AdamaJava / adamajava

Other
14 stars 5 forks source link

refactor(q3tiled_aligner): allow user to pass in cached ref index map #316

Closed holmeso closed 2 years ago

holmeso commented 2 years ago

Description

Allow user to pass in cached ref index map. This will greatly reduce I/O.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Existing tests pass. New test introduced.

Are WDL Updates Required?

n/a

Checklist:

ChristinaXu2017 commented 2 years ago

It is good to move the method loadReferenceIndexMap(String refFile, String refIndexFile) from the sub-method to the top-level method. So reduced the frequency to load the index file. It seems "String refFile" is no longer used in new method getBlatRecordsSWAll(...)

I suggest to change List getBlatRecordsSWAll(String refFile, String refIndexFile, TIntObjectMap<int[]> cache, String sequence, final String name, int tileLength, String originatingMethod, boolean log, boolean recordsMustComeFromChrInName)
to public static List getBlatRecordsSWAll( Map<ChrPosition, LongRange> refIndexMap, TIntObjectMap<int[]> cache, String sequence, final String name, int tileLength, String originatingMethod, boolean log, boolean recordsMustComeFromChrInName)