|
@@ -124,12 +124,15 @@ runName, libName, outputDir, onData, options) {
|
|
|
'-e', // Exclude reads marked as duplicates from discordant, splitter, and/or unmapped
|
|
'-e', // Exclude reads marked as duplicates from discordant, splitter, and/or unmapped
|
|
|
];
|
|
];
|
|
|
if (options === null || options === void 0 ? void 0 : options.output_discordant) {
|
|
if (options === null || options === void 0 ? void 0 : options.output_discordant) {
|
|
|
- if (!isPairedEnd)
|
|
|
|
|
- throw 'Error discordant reads can be found only in paired reads';
|
|
|
|
|
- var discordantFile = path_1.default.join(outputDir, "bwa_mem_discordants_on_".concat(refName, ".sam"));
|
|
|
|
|
- console.log('Discordant reads file path: ', discordantFile);
|
|
|
|
|
- samblasterCmd = __spreadArray(__spreadArray([], samblasterCmd, true), ['-d', discordantFile], false);
|
|
|
|
|
- retObj = __assign(__assign({}, retObj), { discordantFile: discordantFile });
|
|
|
|
|
|
|
+ if (!isPairedEnd) {
|
|
|
|
|
+ console.log('Discordant reads can be found only in paired reads, skipping');
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ var discordantFile = path_1.default.join(outputDir, "bwa_mem_discordants_on_".concat(refName, ".sam"));
|
|
|
|
|
+ console.log('Discordant reads file path: ', discordantFile);
|
|
|
|
|
+ samblasterCmd = __spreadArray(__spreadArray([], samblasterCmd, true), ['-d', discordantFile], false);
|
|
|
|
|
+ retObj = __assign(__assign({}, retObj), { discordantFile: discordantFile });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (!isPairedEnd) {
|
|
if (!isPairedEnd) {
|
|
|
samblasterCmd = __spreadArray(__spreadArray([], samblasterCmd, true), ['--ignoreUnmated'], false);
|
|
samblasterCmd = __spreadArray(__spreadArray([], samblasterCmd, true), ['--ignoreUnmated'], false);
|