|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
});
|
|
|
};
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
+exports.clusterSam = void 0;
|
|
|
const child_process_1 = require("child_process");
|
|
|
/* (c) Thomas Steimlé 2022
|
|
|
* cat bwa_mem_splitters_on_HG38_Viral.sam | awk '$0~/^@/{next}{lxa=split($0,xa,"XA:Z:"); print $1"\t"$3"\t"$4; if(lxa>1){split(xa[2],xap,","); print $1"\t"xap[1]"\t"substr(xap[2],2)"\tXA"}}' | more
|
|
|
@@ -89,6 +90,7 @@ const clusterSam = (input_sam, threshold, minReads) => {
|
|
|
resolve((Object.keys(byClusters).map(clusterName => ({ clusterName, rname: byClusters[clusterName] })).sort((a, b) => b.rname.length - a.rname.length)));
|
|
|
}));
|
|
|
};
|
|
|
+exports.clusterSam = clusterSam;
|
|
|
/*
|
|
|
(async () => {
|
|
|
console.log(await clusterSam('/home/thomas/Documents/Programmes/ttest/bwa_mem_splitters_on_HG38_Viral.sam', 333, 55));
|