Repository 'vapper'
hg clone https://toolshed.g2.bx.psu.edu/repos/johnheap/vapper

Changeset 8:e75a85590041 (2019-06-03)
Previous changeset 7:25226d33642e (2019-06-03) Next changeset 9:a0d5e1f5bec0 (2019-06-03)
Commit message:
Uploaded
modified:
Tryp_V.py
b
diff -r 25226d33642e -r e75a85590041 Tryp_V.py
--- a/Tryp_V.py Mon Jun 03 14:06:47 2019 -0400
+++ b/Tryp_V.py Mon Jun 03 14:09:07 2019 -0400
[
b'@@ -1,325 +1,2064 @@\n-"""\r\n- * Copyright 2018 University of Liverpool\r\n- * Author: John Heap, Computational Biology Facility, UoL\r\n- * Based on original scripts of Sara Silva Pereira, Institute of Infection and Global Health, UoL\r\n- *\r\n- * Licensed under the Apache License, Version 2.0 (the "License");\r\n- * you may not use this file except in compliance with the License.\r\n- * You may obtain a copy of the License at\r\n- *\r\n- * http://www.apache.org/licenses/LICENSE-2.0\r\n- *\r\n- * Unless required by applicable law or agreed to in writing, software\r\n- * distributed under the License is distributed on an "AS IS" BASIS,\r\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n- * See the License for the specific language governing permissions and\r\n- * limitations under the License.\r\n- *\r\n- """\r\n-\r\n-import matplotlib as mpl\r\n-mpl.use(\'Agg\')\r\n-\r\n-import subprocess\r\n-import shutil\r\n-import re\r\n-import pandas as pd\r\n-import os\r\n-\r\n-import sys\r\n-\r\n-import matplotlib.pyplot as plt\r\n-from matplotlib.patches import Patch\r\n-import seaborn as sns\r\n-\r\n-def assembleWithVelvet(name, kmers, inslen, covcut, fastq1name,fastq2name):\r\n-    #argString = "velveth " + name + "_k65 65 -shortPaired -fastq " + name + "_R1.fastq " + name + "_R2.fastq"\r\n-    argString = "velveth " + name + "_k"+ kmers+" "+ kmers + " -shortPaired -fastq " + fastq1name+" "+fastq2name\r\n-    print(argString)\r\n-    returncode = subprocess.call(argString, shell=True)\r\n-    if returncode != 0:\r\n-        return "Error in velveth"\r\n-    argString = "velvetg " + name + "_k"+kmers+" -exp_cov auto -ins_length "+inslen+" -clean yes -ins_length_sd 50 -min_pair_count 20"\r\n-    #argString = "velvetg " + name + "_k"+kmers+" -exp_cov auto -ins_length "+inslen+" -cov_cutoff "+covcut+" -clean yes -ins_length_sd 50 -min_pair_count 20"\r\n-    #argString = "velvetg " + name + "_k65 -exp_cov auto -ins_length 400 -cov_cutoff 5 -clean yes -ins_length_sd 50 -min_pair_count 20"+quietString\r\n-    print(argString)\r\n-    returncode = subprocess.call(argString, shell = True)\r\n-    if returncode != 0:\r\n-        return "Error in velvetg"\r\n-    shutil.copyfile(name + "_k"+kmers+"//contigs.fa",name + ".fa")  # my $namechange = "mv ".$input."_k65/contigs.fa ".$input.".fa";\r\n-    return "ok"\r\n-\r\n-\r\n-def blastContigs(test_name,database):\r\n-    print(test_name)\r\n-    print(database)\r\n-    #db_path = os.path.dirname(os.path.realpath(__file__))+database\r\n-    db_path = database\r\n-    argString = "blastn -db "+db_path+" -query "+test_name+".fa -outfmt 10 -out "+test_name+"_blast.txt"\r\n-    print (argString)\r\n-    returncode = subprocess.call(argString, shell = True)\r\n-    if returncode != 0:\r\n-        return "Error in blastall"\r\n-    blast_df = pd.read_csv(""+test_name+"_blast.txt")\r\n-    #print (blast_df)\r\n-    #if ($temp[2] >= 98 & & $temp[3] > 100 & & $temp[10] < 0.001){\r\n-    #\'qaccver saccver pident length mismatch gapopen qstart qend sstart send evalue bitscore\'\r\n-    blast_df.columns = [\'qaccver\', \'saccver\', \'pident\', \'length\', \'mismatch\', \'gapopen\', \'qstart\', \'qend\', \'sstart\', \'send\', \'evalue\',\'bitscore\']\r\n-    blastResult_df = blast_df[(blast_df[\'pident\']>=98) & (blast_df[\'length\'] > 100) & (blast_df[\'evalue\']<0.001) ]\r\n-    blastResult_df = blastResult_df[[\'qaccver\', \'saccver\', \'pident\']]   #query accession.version, subject accession.version, Percentage of identical matches\r\n-\r\n-    return blastResult_df\r\n-\r\n-\r\n-\r\n-def getCogsPresent(blastResult_df,strain,cogOrBinList):\r\n-    blastResult_df.sort_values(\'pident\',axis = 0, ascending=False, inplace=True)\r\n-    nodeList = blastResult_df[\'qaccver\'].tolist()\r\n-    cogList = blastResult_df[\'saccver\'].tolist()\r\n-    cogSet = set(cogList)   #get unique values\r\n-    cogList = sorted(cogSet)    #sort them\r\n-\r\n-    #print (cogList)\r\n-    #print (len(cogList))\r\n-\r\n-    thereList = []\r\n-    dataList = []\r\n-    #dir_path = os.path.dirname(os.path.realpath(__file__))\r\n-    fname = cogOrBinList\r\n-    cnt = 0\r\n-    with open (fname) as f:\r\n-        for l'..b'a-click="Footer, go to about, text:about" href="https://github.com/about">About</a></li>\n+\n+    </ul>\n+  </div>\n+  <div class="d-flex flex-justify-center pb-6">\n+    <span class="f6 text-gray-light"></span>\n+  </div>\n+</div>\n+\n+\n+\n+  <div id="ajax-error-message" class="ajax-error-message flash flash-error">\n+    <svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg>\n+    <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">\n+      <svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>\n+    </button>\n+    You can\xe2\x80\x99t perform that action at this time.\n+  </div>\n+\n+\n+    <script crossorigin="anonymous" integrity="sha512-EPrD+nddbyhpiLL8l3M8VfJpZr4J2EWQLaPXZ+6A3VDJKzS5HeZ3dkMVieHSdvIPHsMbWPyVlY42SWKoS4XTfA==" type="application/javascript" src="https://github.githubassets.com/assets/compat-bootstrap-831f12d4.js"></script>\n+    <script crossorigin="anonymous" integrity="sha512-oFBEYscCdWEyvUQehaYyaCSiKtIN4UvpfFHNpIXLUTSQ35JcacPNj86R8fgJfI1e7BOjbLZPTv1nJg3TECiMLw==" type="application/javascript" src="https://github.githubassets.com/assets/frameworks-7af24171.js"></script>\n+    \n+    <script crossorigin="anonymous" async="async" integrity="sha512-b9BDH7EZq1yaR2fUH08I378zVkToScLiQ//L0gdyPviliuwpWiVFkB8uW0K8zZszdeLeBpib7wGBLkPiIFgyHg==" type="application/javascript" src="https://github.githubassets.com/assets/github-bootstrap-2a8c2b54.js"></script>\n+    \n+    \n+    \n+  <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner" hidden\n+    >\n+    <svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg>\n+    <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>\n+    <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>\n+  </div>\n+  <template id="site-details-dialog">\n+  <details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark hx_rsm" open>\n+    <summary role="button" aria-label="Close dialog"></summary>\n+    <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal">\n+      <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog>\n+        <svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg>\n+      </button>\n+      <div class="octocat-spinner my-6 js-details-dialog-spinner"></div>\n+    </details-dialog>\n+  </details>\n+</template>\n+\n+  <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0">\n+  <div class="Popover-message Popover-message--bottom-left Popover-message--large Box box-shadow-large" style="width:360px;">\n+  </div>\n+</div>\n+\n+  <div aria-live="polite" class="js-global-screen-reader-notice sr-only"></div>\n+\n+  </body>\n+</html>\n+\n'