3131import org .labkey .api .data .TableSelector ;
3232import org .labkey .api .exp .api .ExpData ;
3333import org .labkey .api .exp .api .ExperimentService ;
34- import org .labkey .api .jbrowse .JBrowseService ;
3534import org .labkey .api .module .ModuleLoader ;
3635import org .labkey .api .pipeline .PipelineJob ;
3736import org .labkey .api .pipeline .PipelineJobException ;
5655import org .labkey .api .sequenceanalysis .pipeline .SequenceOutputHandler ;
5756import org .labkey .api .sequenceanalysis .pipeline .ToolParameterDescriptor ;
5857import org .labkey .api .sequenceanalysis .run .GeneToNameTranslator ;
58+ import org .labkey .api .sequenceanalysis .run .LiftoverBcfToolsWrapper ;
5959import org .labkey .api .sequenceanalysis .run .SelectVariantsWrapper ;
6060import org .labkey .api .util .FileType ;
6161import org .labkey .api .util .FileUtil ;
7777import java .util .Arrays ;
7878import java .util .Collection ;
7979import java .util .Collections ;
80- import java .util .Comparator ;
8180import java .util .Date ;
8281import java .util .HashMap ;
8382import java .util .HashSet ;
@@ -1024,7 +1023,7 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
10241023
10251024 File sitesOnlyVcf = getSitesOnlyVcf (ctx , primaryTrackVcf , genome );
10261025
1027- File lifted = liftToHuman (ctx , primaryTrackVcf , sitesOnlyVcf , grch37Genome );
1026+ File lifted = liftToHuman (ctx , primaryTrackVcf , sitesOnlyVcf , genome , grch37Genome );
10281027 SequenceOutputFile output3 = new SequenceOutputFile ();
10291028 output3 .setFile (lifted );
10301029 output3 .setName ("mGAP Release: " + species + " " + releaseVersion + " Lifted to Human" );
@@ -1095,7 +1094,7 @@ private File getSitesOnlyVcf(JobContext ctx, File primaryTrackVcf, ReferenceGeno
10951094 return noGenotypes ;
10961095 }
10971096
1098- private File liftToHuman (JobContext ctx , File primaryTrackVcf , File noGenotypes , ReferenceGenome grch37Genome ) throws PipelineJobException
1097+ private File liftToHuman (JobContext ctx , File primaryTrackVcf , File noGenotypes , ReferenceGenome sourceGenome , ReferenceGenome grch37Genome ) throws PipelineJobException
10991098 {
11001099 //lift to target genome
11011100 Integer chainFileId = ctx .getSequenceSupport ().getCachedObject (AnnotationStep .CHAIN_FILE , Integer .class );
@@ -1108,8 +1107,8 @@ private File liftToHuman(JobContext ctx, File primaryTrackVcf, File noGenotypes,
11081107 File liftoverRejects = new File (ctx .getOutputDir (), SequenceAnalysisService .get ().getUnzippedBaseName (primaryTrackVcf .getName ()) + ".liftoverRejectGRCh37.vcf.gz" );
11091108 if (!indexExists (liftoverRejects ))
11101109 {
1111- LiftoverVcfRunner liftoverVcfRunner = new LiftoverVcfRunner (ctx .getLogger ());
1112- liftoverVcfRunner .doLiftover (noGenotypes , chainFile , grch37Genome .getWorkingFastaFile (), liftoverRejects , liftedToGRCh37 , 0.95 );
1110+ LiftoverBcfToolsWrapper liftoverVcfRunner = new LiftoverBcfToolsWrapper (ctx .getLogger ());
1111+ liftoverVcfRunner .doLiftover (noGenotypes , chainFile , sourceGenome . getWorkingFastaFile (), grch37Genome .getWorkingFastaFile (), liftoverRejects , liftedToGRCh37 );
11131112 }
11141113 else
11151114 {
0 commit comments