Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start alignment onclick and wait for pending alignments
- Loading branch information
Showing
2 changed files
with
94 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import * as electron from "electron"; | ||
import { Fastq } from '../../fastq'; | ||
import { Fasta } from '../../fasta'; | ||
import { AtomicOperationIPC } from '../../atomicOperationsIPC'; | ||
const ipc = electron.ipcRenderer; | ||
|
||
export function triggerHisat2Alignment(fasta : Fasta,fastq1 : Fastq,fastq2 : Fastq | undefined) : void | ||
{ | ||
if(!fasta.indexedForHisat2) | ||
{ | ||
ipc.send( | ||
"runOperation", | ||
<AtomicOperationIPC>{ | ||
opName : "indexFastaForHisat2Alignment", | ||
channel : "input", | ||
key : "fastaInputs", | ||
uuid : fasta.uuid | ||
} | ||
); | ||
} | ||
|
||
ipc.send( | ||
"runOperation", | ||
<AtomicOperationIPC>{ | ||
opName : "runHisat2Alignment", | ||
alignParams : { | ||
fasta : fasta, | ||
fastq1 : fastq1, | ||
fastq2 : fastq2 | ||
} | ||
} | ||
); | ||
} | ||
|
||
export function triggerBowtie2Alignment(fasta : Fasta,fastq1 : Fastq,fastq2 : Fastq | undefined) : void | ||
{ | ||
if(!fasta.indexed) | ||
{ | ||
ipc.send( | ||
"runOperation", | ||
<AtomicOperationIPC>{ | ||
opName : "indexFastaForBowtie2Alignment", | ||
channel : "input", | ||
key : "fastaInputs", | ||
uuid : fasta.uuid | ||
} | ||
); | ||
} | ||
|
||
ipc.send( | ||
"runOperation", | ||
<AtomicOperationIPC>{ | ||
opName : "runBowtie2Alignment", | ||
alignParams : { | ||
fasta : fasta, | ||
fastq1 : fastq1, | ||
fastq2 : fastq2 | ||
} | ||
} | ||
); | ||
} |