Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster #4

Open
wants to merge 120 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
d83bc55
Corrected links for IslandPath-DIMOB citation
cbertell Dec 11, 2015
a37db59
Update README.md
glwinsor Dec 15, 2015
d310038
Removed wrongly copied text
cbertell Dec 15, 2015
b0c9e29
Merge pull request #1 from cbertell/master
cbertell Dec 15, 2015
39e27d8
Show search genes on results page by default
adrianclim Jan 13, 2016
316fe5f
modified reference to IslandPath-DIMOB
cbertell Jan 16, 2016
69ce9d3
added ref to latest pub
cbertell Jan 16, 2016
e8e3ac4
added ref to latest pub
cbertell Jan 16, 2016
02a3a46
Merge branch 'master' of https://github.com/brinkmanlab/islandviewer-ui
cbertell Jan 16, 2016
578a198
added box with ref for citation
cbertell Jan 19, 2016
ddd2131
added link to brinkman lab website and fixed small typos
cbertell Jan 19, 2016
f49097e
added box with ref for citation and cosmetic changes
cbertell Jan 19, 2016
95968f2
moved comment on incomplete genomes from side bar to main page
cbertell Jan 19, 2016
0b4c3fb
added box with ref for citation
cbertell Jan 19, 2016
affa511
fixed SIGI-HMM link, removed IslandViewer link to same page
cbertell Jan 19, 2016
9dc867c
removed typos
cbertell Jan 19, 2016
452116b
added box with ref for citation
cbertell Jan 19, 2016
c97ebb2
changed font
cbertell Jan 19, 2016
43c26e8
changed font
cbertell Jan 19, 2016
4dc709a
added box with ref for citation
cbertell Jan 19, 2016
677974a
Made linearchart default size to equal size of browser
adrianclim Jan 21, 2016
98edabe
Made container of second genome default width to screen size
adrianclim Jan 21, 2016
c8f789a
Removed some commented out code
adrianclim Jan 21, 2016
79bccec
Fixed overlapping spans (genome titles)
adrianclim Jan 21, 2016
49fc014
added news
cbertell Jan 21, 2016
b18599f
changed text on side bar
cbertell Jan 21, 2016
12f41b2
changed text in cite IslandViewer box
cbertell Jan 21, 2016
cea74da
changed legend and toolbox to smalltext
cbertell Jan 21, 2016
c645d33
use smalltext in legend
cbertell Jan 21, 2016
6539cf2
Initial Commit of comparison svg object
adrianclim Jan 22, 2016
dcf16a4
Comparison Visualization added.
adrianclim Jan 22, 2016
cf16177
Added a getMauve url to retrieve mauve files
adrianclim Jan 22, 2016
21ec9d4
Hide comparison chart unless there are 2 genomes
adrianclim Jan 22, 2016
33e2acb
Initial commit of Mauve python wrapper
adrianclim Jan 22, 2016
710d9a4
Fixed file paths
adrianclim Jan 23, 2016
071ea83
Turn tests off
adrianclim Jan 23, 2016
98c1659
commit of Mauve 'test' code
adrianclim Jan 27, 2016
689ca11
Wrote mauve file function, testing code in place, production code com…
adrianclim Jan 27, 2016
e5169ac
return mauve file instead of in place testing code
adrianclim Jan 27, 2016
c79863d
Update of circularplot js to read appropriate mauve file
adrianclim Jan 27, 2016
57dd701
Merge pull request #2 from brinkmanlab/dual-genome-comparison
adrianclim Jan 27, 2016
525f297
Fix reference error
adrianclim Jan 27, 2016
f74510e
Merge pull request #3 from brinkmanlab/dual-genome-comparison
adrianclim Jan 27, 2016
f051b15
fix
adrianclim Jan 27, 2016
8fa39bd
Merge remote-tracking branch 'origin/master'
adrianclim Jan 27, 2016
814d382
Missing . fixed
adrianclim Jan 27, 2016
7d87602
Fix finding correct genebank file
adrianclim Jan 27, 2016
5072d85
remove hyphen from python class name
adrianclim Jan 27, 2016
1c1b37d
update reference
adrianclim Jan 27, 2016
8c8b808
Testing Stuff
adrianclim Jan 27, 2016
1114d7e
Fix file path
adrianclim Jan 27, 2016
aaaf4eb
Fix Reference
adrianclim Jan 27, 2016
92525e1
Remove testing coments
adrianclim Jan 27, 2016
76a0dbc
Merge pull request #4 from brinkmanlab/master
adrianclim Jan 27, 2016
2f4fa3f
Revert to before dual genome code was pulled
adrianclim Jan 28, 2016
458391b
Change path references
adrianclim Jan 28, 2016
6d65311
Test earlier version of Mauve
adrianclim Jan 28, 2016
0bcdd90
minor text edits
cbertell Jan 28, 2016
dc3b2f8
Merge branch 'master' of https://github.com/brinkmanlab/islandviewer-ui
cbertell Jan 28, 2016
535087c
remove empty line
cbertell Jan 28, 2016
3406487
Remove commented out code
adrianclim Jan 28, 2016
f69a022
Merge Dual-genome with msater
adrianclim Jan 28, 2016
f586234
Merge Attempt
adrianclim Jan 28, 2016
60c23e0
Merge pull request #6 from brinkmanlab/dual-genome-comparison
adrianclim Jan 28, 2016
4236e77
Hide comparison chart unless there are 2 genomes
adrianclim Jan 28, 2016
ca096ed
Merge pull request #7 from brinkmanlab/dual-genome-comparison
adrianclim Jan 28, 2016
11b2a51
Fix absolute url
adrianclim Jan 28, 2016
3bde958
Merge pull request #8 from brinkmanlab/dual-genome-comparison
adrianclim Jan 28, 2016
3e33cfb
Add visualization example file
adrianclim Jan 28, 2016
57efa21
Hide comparison chart unless there are 2 genomes
adrianclim Jan 28, 2016
1d61b4d
Merge remote-tracking branch 'origin/master'
adrianclim Jan 28, 2016
de5eb0b
Modify getMauveFile for testing
adrianclim Jan 28, 2016
e594aa9
Fix spelling error
adrianclim Jan 28, 2016
08fd1c7
Fix mauve wrapper dependency
adrianclim Jan 28, 2016
4126f35
Fix typing errors
adrianclim Jan 28, 2016
1c7d9b4
Add visualization example file
adrianclim Jan 28, 2016
a25d5a4
Hide comparison chart unless there are 2 genomes
adrianclim Jan 28, 2016
76829c6
Modify getMauveFile for testing
adrianclim Jan 28, 2016
d299fb2
Fix spelling error
adrianclim Jan 28, 2016
4361d19
Fix mauve wrapper dependency
adrianclim Jan 28, 2016
5207e43
Fix typing errors
adrianclim Jan 28, 2016
18057f2
Update visualization for testing
adrianclim Jan 28, 2016
29ea1ba
Copy files before running mauve, fixes permissions bug on server envi…
adrianclim Jan 29, 2016
aec2537
Fix missing /, this keyboard makes me mistype like crazy
adrianclim Jan 29, 2016
64ff0fb
Fix missing file extension
adrianclim Jan 29, 2016
5e0e2bd
Remove test comments
adrianclim Jan 29, 2016
823ea37
Merge remote-tracking branch 'origin/master' into dualgenome
adrianclim Jan 29, 2016
bf96ef2
Merge pull request #9 from brinkmanlab/dualgenome
adrianclim Jan 29, 2016
84bf0e8
change getMauve link reference
adrianclim Jan 29, 2016
2f31259
Merge pull request #10 from brinkmanlab/dualgenome
adrianclim Jan 29, 2016
8317ccd
Fix missing reference
adrianclim Jan 29, 2016
9c75543
fixed link to draft genome example
cbertell Feb 2, 2016
b66f8e5
Fix genome title when overflow to other div.
adrianclim Feb 2, 2016
18286ae
Merge pull request #11 from brinkmanlab/dualgenome
adrianclim Feb 2, 2016
d07109f
Removed commented out code from views.py
adrianclim Feb 2, 2016
c080a21
Remove commented out code
adrianclim Feb 2, 2016
30ba421
Merge pull request #12 from brinkmanlab/dualgenome
adrianclim Feb 2, 2016
6399e6e
Update url parameters for retrieving Mauve file
adrianclim Feb 2, 2016
e06ab5d
Attempt to fix bug with filter since it appears im getting more than …
adrianclim Feb 2, 2016
9818917
Integrate mauvewrap with microbedbv2
adrianclim Feb 2, 2016
d80bd99
Merge remote-tracking branch 'origin/master' into master3
adrianclim Feb 2, 2016
b3a0bed
messed up a character
adrianclim Feb 2, 2016
06b7881
make search more general....this may not be accurate
adrianclim Feb 2, 2016
f7395a4
Fix, should be HttpResponse not HttpRedirect
adrianclim Feb 2, 2016
fca628c
Make SVGs the same width
adrianclim Feb 2, 2016
8541989
Make genome name textwrap
adrianclim Feb 3, 2016
4e292f1
Fix spacing of genome title
adrianclim Feb 3, 2016
c79a405
Fix Failed Merge Attempt
adrianclim Feb 3, 2016
f9dd4e3
Fix Failed Merge Attempt
adrianclim Feb 3, 2016
c81c0ff
Add citation, fix select genome
adrianclim Feb 3, 2016
7492bd9
Fixed failed merge attempt and ref to citation
cbertell Feb 4, 2016
9526fbd
fixed text
cbertell Feb 4, 2016
6546f87
Replace absolute link with relative one
adrianclim Feb 4, 2016
445a268
Merge remote-tracking branch 'origin/master' into master3
adrianclim Feb 4, 2016
42c8add
Replace output_path to one used in prod
adrianclim Feb 4, 2016
0300729
Commit of cluster code to test on dev server
adrianclim Feb 4, 2016
40b4f37
Debugging of cluster code
adrianclim Feb 4, 2016
712e119
I thought it was milliseconds!
adrianclim Feb 4, 2016
e4869d2
Debug Job due to comparison of 2 strings. Fix was to create a variabl…
adrianclim Feb 4, 2016
48a53eb
Remove unneeded path from mauvewrap
adrianclim Feb 5, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
islandviewer-ui
===============

Web UI for Islandviewer
Web UI for Islandviewer.
Empty file added scripts/__init__.py
Empty file.
4 changes: 4 additions & 0 deletions scripts/mauve-wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
#PBS -S /bin/bash

/progressiveMauve --output=$1.xmfa --backbone-output=$2.backbone $3 $4
85 changes: 85 additions & 0 deletions scripts/mauvewrap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import subprocess
import time
import shutil
import os
import xml.etree.ElementTree as ET

#This can file can be moved to lib after testing
#These paths can be moved to the settings file after testing
MAUVE_PATH = "/data/Modules/iv-backend/islandviewer_dev/utils/mauve_2.4.0/linux-x64/progressiveMauve"
MAUVE_OUTPUT_PATH = "/data/Modules/iv-backend/islandviewer/pairwise_mauve"

#Parameters = path to 2 genebank files
#Returns None
#Creates an output file at path outputfile and backbone file at path backbonefile
def runMauve(gbk1,gbk2,outputfile=None,outputbackbonefile=None, async=False):
if outputfile is None:
outputfile = MAUVE_OUTPUT_PATH+"/"+os.path.splitext(os.path.basename(gbk1))[0]+"-"+os.path.splitext(os.path.basename(gbk2))[0]
if outputbackbonefile is None:
outputbackbonefile = MAUVE_OUTPUT_PATH+"/"+os.path.splitext(os.path.basename(gbk1))[0]+"-"+os.path.splitext(os.path.basename(gbk2))[0]

gbk1temppath = MAUVE_OUTPUT_PATH+"/"+os.path.basename(gbk1)
gbk2temppath = MAUVE_OUTPUT_PATH+"/"+os.path.basename(gbk2)

shutil.copyfile(gbk1,gbk1temppath)
shutil.copyfile(gbk2,gbk2temppath)

jobFile = outputfile+".pbs"
pbsFile = open(jobFile,"w+")
pbsFile.write("#!/bin/bash")
pbsFile.write("#PBS -S /bin/bash")
pbsFile.write(MAUVE_PATH+" --output="+outputfile+".xmfa --backbone-output="
+outputbackbonefile+".backbone "+gbk1temppath+" "+gbk2temppath)
pbsFile.close()
sp = subprocess.Popen(["qsub", jobFile], cwd=MAUVE_PATH)

# waits for job when using torque if async = False
if not async:
completeFlag = False
while not completeFlag:
qstatOutput = subprocess.Popen(["qstat", "-x"],stdout=subprocess.PIPE, cwd=MAUVE_PATH)
output = qstatOutput.communicate()[0]
tree = ET.fromstring(output)
matchfile = os.path.basename(jobFile)
for index in range(0,len(tree)):
currentFile = tree[index][1].text
if currentFile == matchfile:
status = tree[index][4].text
if status == 'C':
completeFlag = True
else:
if status != 'R':
completeFlag = True
print "Error has occured to submitted job (cluster)"
if not completeFlag:
time.sleep(60)

#Given the paths of 2 genebank files, returns path of backbone file if it exists or None if it doesnt
def retrieveBackboneFile(gbk1,gbk2):
backbonepath = MAUVE_OUTPUT_PATH+"/"+os.path.splitext(os.path.basename(gbk1))[0]+"-"+os.path.splitext(os.path.basename(gbk2))[0]+".backbone"
if os.path.isfile(backbonepath):
return backbonepath
else:
return None

#Wrapper for retrieving a backbone file. If it doesnt exist, this will call runMauve to create it.
def getMauveResults(gbk1,gbk2):
if retrieveBackboneFile(gbk1,gbk2) is None:
runMauve(gbk1,gbk2)
return retrieveBackboneFile(gbk1,gbk2)


##################### TESTS

def testRunMauve():
runMauve("/vagrant/islandviewer-ui/scripts/testFiles/AE009952.gbk","/vagrant/islandviewer-ui/scripts/testFiles/BX936398.gbk")

def testRetrieveBackboneFiles():
print(retrieveBackboneFile("/vagrant/islandviewer-ui/scripts/testFiles/AE009952.gbk","/vagrant/islandviewer-ui/scripts/testFiles/BX936398.gbk"))

def testList():
#testRunMauve()
#testRetrieveBackboneFiles()
print getMauveResults("/vagrant/islandviewer-ui/scripts/testFiles/AE009952.gbk","/vagrant/islandviewer-ui/scripts/testFiles/BX936398.gbk")

#testList()
16 changes: 16 additions & 0 deletions static/css/islandviewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ body {
padding: 10px;
}

input#gene_search_input{
width:100%;
}

.chkLabel input { float: left; margin-top:0.5em;}
.chkLabel span { display: block; margin-left: 1.5em;}

Expand Down Expand Up @@ -209,6 +213,9 @@ div.outline {
color: #1F1A80;
letter-spacing:0.1em;
line-height:26px;
display: inline-block;
white-space: normal;
width: 500px;
}

.linearLabel {
Expand Down Expand Up @@ -347,6 +354,10 @@ input[type=file] {
border: 1px solid #808080;
}

#outer_circular{
white-space: nowrap;
}

/* Section for GI tables */
.gitable_fullwidth {
max-width: 100%;
Expand Down Expand Up @@ -636,4 +647,9 @@ input[type=file] {
transform: rotate(360deg);
}
}

.linearchart {
width: 100%;
}

/* END Spinner for loading ranking page*/
Loading