Skip to content

Commit

Permalink
Fix bux name groups \s
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Barrero Rodríguez committed Feb 28, 2022
1 parent bf4b268 commit 1951b1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions ShinyApp/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h1 class="display-6 text-center">Sample Type</h1>
<button type="button" class="btn btn-dark" onclick="addSelected()">Add Group</button>
</div>
</div>
<div class="d-flex justify-content-center container-fluid m-3" id="sampleGroups"></div>
<div class="d-flex justify-content-center container-fluid m-3 flex-wrap align-content-center" id="sampleGroups"></div>
</div>

<div class="container-fluid mt-4" id="testAllContent" style="display: none;">
Expand Down Expand Up @@ -148,15 +148,15 @@ <h1 class="display-6 text-center">Hypothesis Testing</h1>
var obj = createObj();

// Define functions
integrationButtonGenerator = function(id) {
integrationButtonGenerator = function(id, widthLetter) {
let btn = `<button type="button" class="btn btn-outline-danger m-1"
style="width:180px;" onclick="integrationSelect(this)">${id}</button>`;
style="width:${12*widthLetter+100}px;" onclick="integrationSelect(this)">${id}</button>`;
return btn;
}

sampleButtonGenerator = function(id) {
sampleButtonGenerator = function(id, widthLetter) {
let btn = `<button type="button" class="btn btn-outline-primary m-1 sampleButton"
style="width:250px;" onclick="sampleSelect(this)">${id}</button>`;
style="width:${8.5*widthLetter+100}px;" onclick="sampleSelect(this)">${id}</button>`;
return btn;
}

Expand Down Expand Up @@ -197,6 +197,8 @@ <h1 class="display-6 text-center">Hypothesis Testing</h1>

if (groupName == "") return;

groupName = groupName.replace(/\s/g, "_");

if (Object.keys(obj['sampleGroups']).includes(groupName)) return;

if (obj['sample_tmp'].length < 2) {
Expand Down Expand Up @@ -379,12 +381,14 @@ <h1 class="display-6 text-center">Hypothesis Testing</h1>
// buttons
$("#integrationData").show();

let widthLetter = (Math.max(...obj['integrationSet'].map(value => value.length)));
obj['integrationSet'].forEach((value) => {
$("#integrationSet").append(integrationButtonGenerator(value));
$("#integrationSet").append(integrationButtonGenerator(value, widthLetter));
});

widthLetter = (Math.max(...obj['sampleSet'].map(value => value.length)));
obj['sampleSet'].forEach((value) => {
$("#sampleSet").append(sampleButtonGenerator(value));
$("#sampleSet").append(sampleButtonGenerator(value, widthLetter));
});

})
Expand Down
2 changes: 1 addition & 1 deletion release.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
shutil.copytree(os.path.join(home, "R-Portable"), os.path.join(version_dir, "R-Portable"))
shutil.copytree(os.path.join(home, "ShinyApp"), os.path.join(version_dir, "ShinyApp"))
shutil.copytree(os.path.join(home, "Launcher"), os.path.join(version_dir, "Launcher"))
shutil.copyfile(os.path.join(home, "iSanXoT-LIMMA.bat"), os.path.join(version_dir, "iSanXoT-LIMMA.bat"))
shutil.copyfile(os.path.join(home, "ReportStats-iSanXoT.bat"), os.path.join(version_dir, "ReportStats-iSanXoT.bat"))

shutil.make_archive(versionName, "zip", home, versionName)
shutil.rmtree(version_dir)

0 comments on commit 1951b1f

Please sign in to comment.