Skip to content

Commit 5694b2e

Browse files
committed
Include FASTA reference in specHLA/samtools
1 parent c3c0782 commit 5694b2e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/SpecHlaAnalysis.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,20 @@ public Output performAnalysisPerSampleRemote(Readset rs, File inputBam, Referenc
5454
{
5555
AnalysisOutputImpl output = new AnalysisOutputImpl();
5656

57+
File gzippedFasta = referenceGenome.getWorkingFastaFileGzipped();
58+
if (!gzippedFasta.exists())
59+
{
60+
throw new PipelineJobException("Missing file: " + gzippedFasta.getPath());
61+
}
62+
5763
File subsetBam = FileUtil.appendName(outputDir, FileUtil.getBaseName(inputBam) + ".subset.bam");
5864
SamtoolsRunner sr = new SamtoolsRunner(getWrapper().getLogger());
5965
sr.execute(Arrays.asList(
6066
sr.getSamtoolsPath().getPath(),
6167
"view",
6268
"-h",
6369
"-F", "12", //This selects pairs where either mate is mapped
70+
"-T", gzippedFasta.getPath(),
6471
"-o", subsetBam.getPath(),
6572
inputBam.getPath()
6673
));

0 commit comments

Comments
 (0)