Repository 'gap_all_glycan_tools'
hg clone https://toolshed.g2.bx.psu.edu/repos/chrisb/gap_all_glycan_tools

Changeset 0:89592faa2875 (2016-03-23)
Next changeset 1:0a5e0df17054 (2016-05-06)
Commit message:
Uploaded
added:
convert_detect_formats/msa_to_linearcode/.idea/.name
convert_detect_formats/msa_to_linearcode/.idea/encodings.xml
convert_detect_formats/msa_to_linearcode/.idea/misc.xml
convert_detect_formats/msa_to_linearcode/.idea/modules.xml
convert_detect_formats/msa_to_linearcode/.idea/scru_msa_to_lc.iml
convert_detect_formats/msa_to_linearcode/.idea/workspace.xml
convert_detect_formats/msa_to_linearcode/README_convertmsa.md
convert_detect_formats/msa_to_linearcode/msa
convert_detect_formats/msa_to_linearcode/munge_msa.py
convert_detect_formats/msa_to_linearcode/munge_msa.pyc
convert_detect_formats/msa_to_linearcode/munge_msa.xml
convert_detect_formats/msa_to_linearcode/out
convert_detect_formats/msa_to_linearcode/out2
convert_detect_formats/msa_to_linearcode/test_msa_to_lc.py
convert_detect_formats/rings_convert_format/README_convert.md
convert_detect_formats/rings_convert_format/allowed_formats
convert_detect_formats/rings_convert_format/check_glycan_convert.sh
convert_detect_formats/rings_convert_format/check_post_glycan_convert.sh
convert_detect_formats/rings_convert_format/glycan_convert.py
convert_detect_formats/rings_convert_format/glycan_convert.xml
convert_detect_formats/rings_convert_format/post_glycan_convert.py
convert_detect_formats/rings_convert_format/post_glycan_convert.xml
convert_detect_formats/rings_convert_format/test_rings_convert_format.py
convert_detect_formats/rings_convert_format/test_rings_convert_via_post.py
convert_detect_formats/rings_detect_format/README_detect.md
convert_detect_formats/rings_detect_format/glycan_sniff.py
convert_detect_formats/rings_detect_format/glycan_sniff.xml
convert_detect_formats/rings_detect_format/test_rings_detect_format.py
convert_detect_formats/rings_kcf_to_image/README_convertKCF.md
convert_detect_formats/rings_kcf_to_image/post_kcf_to_image.py
convert_detect_formats/rings_kcf_to_image/post_kcf_to_image.xml
convert_detect_formats/rings_kcf_to_image/test_rings_kcf_to_image.py
convert_detect_formats/rings_lc_to_kcf/README_convertlinearcode.md
convert_detect_formats/rings_lc_to_kcf/post_linear_to_kcf.py
convert_detect_formats/rings_lc_to_kcf/post_linear_to_kcf.xml
convert_detect_formats/rings_lc_to_kcf/test_rings_lc_to_kcf.py
extract_display_features/dashboard/README_dash.md
extract_display_features/dashboard/html_js.py
extract_display_features/dashboard/html_js.xml
extract_display_features/draw_fingerprinter_dendrogram/.README.md.swp
extract_display_features/draw_fingerprinter_dendrogram/README_drawgram.md
extract_display_features/draw_fingerprinter_dendrogram/draw_gram.py
extract_display_features/draw_fingerprinter_dendrogram/draw_gram.pyc
extract_display_features/draw_fingerprinter_dendrogram/draw_gram.xml
extract_display_features/draw_fingerprinter_dendrogram/output.png
extract_display_features/draw_fingerprinter_dendrogram/output.svg
extract_display_features/draw_fingerprinter_dendrogram/output2.png
extract_display_features/draw_fingerprinter_dendrogram/output3.png
extract_display_features/draw_fingerprinter_dendrogram/test_draw_gram.py
extract_display_features/rings_fingerprinter/README_fingerprinter.md
extract_display_features/rings_fingerprinter/post_fingerprinter.py
extract_display_features/rings_fingerprinter/post_fingerprinter.xml
extract_display_features/rings_fingerprinter/test_fingerprinter.py
extract_display_features/rings_mcaw/README_mcaw.md
extract_display_features/rings_mcaw/post_mcaw.py
extract_display_features/rings_mcaw/post_mcaw.xml
extract_display_features/rings_mcaw/test_post_mcaw.py
extract_display_features/rings_miner/README_miner.md
extract_display_features/rings_miner/post_miner.py
extract_display_features/rings_miner/post_miner.xml
extract_display_features/rings_miner/test_post_miner.py
get_data/cfg/NOTES
get_data/cfg/README.md
get_data/cfg/README_CFG.md
get_data/cfg/cfg_get_glycan_from_cells.py
get_data/cfg/getcfgcells.xml
get_data/cfg/htmlfortesting.html
get_data/cfg/short-htmlfortesting.html
get_data/cfg/templates/base.html
get_data/cfg_array/NOTES
get_data/cfg_array/README_CFG_array.md
get_data/cfg_array/cfg_get_glycan_array_data.py
get_data/cfg_array/getcfgarray.xml
get_data/cfg_array/info/NOTES
get_data/cfg_array/info/Primary Screen.html
get_data/cfg_array/info/Primary Screen_files/AnchorPosition.js
get_data/cfg_array/info/Primary Screen_files/CalendarPopup.js
get_data/cfg_array/info/Primary Screen_files/PopupWindow.js
get_data/cfg_array/info/Primary Screen_files/css_sidemenu.js
get_data/cfg_array/info/Primary Screen_files/date.js
get_data/cfg_array/info/Primary Screen_files/details3.js
get_data/cfg_array/info/Primary Screen_files/ga.js
get_data/cfg_array/info/Primary Screen_files/journal_header.gif
get_data/cfg_array/info/Primary Screen_files/jquery-1.js
get_data/cfg_array/info/Primary Screen_files/jquery.js
get_data/cfg_array/info/Primary Screen_files/openWindow.js
get_data/cfg_array/info/Primary Screen_files/popupWin.js
get_data/cfg_array/info/Primary Screen_files/webtrends.js
get_data/cfg_array/info/Selected Primary Screens.html
get_data/cfg_array/info/Selected Primary Screens_files/AnchorPosition.js
get_data/cfg_array/info/Selected Primary Screens_files/CalendarPopup.js
get_data/cfg_array/info/Selected Primary Screens_files/PopupWindow.js
get_data/cfg_array/info/Selected Primary Screens_files/array_inactive.jpg
get_data/cfg_array/info/Selected Primary Screens_files/arrowDown.jpg
get_data/cfg_array/info/Selected Primary Screens_files/arrowUp.jpg
get_data/cfg_array/info/Selected Primary Screens_files/css_sidemenu.js
get_data/cfg_array/info/Selected Primary Screens_files/data_inactive.jpg
get_data/cfg_array/info/Selected Primary Screens_files/date.js
get_data/cfg_array/info/Selected Primary Screens_files/details3.js
get_data/cfg_array/info/Selected Primary Screens_files/ga.js
get_data/cfg_array/info/Selected Primary Screens_files/journal_header.gif
get_data/cfg_array/info/Selected Primary Screens_files/jquery-1.js
get_data/cfg_array/info/Selected Primary Screens_files/jquery-1_002.js
get_data/cfg_array/info/Selected Primary Screens_files/jquery.js
get_data/cfg_array/info/Selected Primary Screens_files/jquery_002.js
get_data/cfg_array/info/Selected Primary Screens_files/jquery_003.js
get_data/cfg_array/info/Selected Primary Screens_files/openWindow.js
get_data/cfg_array/info/Selected Primary Screens_files/openWindow_002.js
get_data/cfg_array/info/Selected Primary Screens_files/popupWin.js
get_data/cfg_array/info/Selected Primary Screens_files/summary_inactive.jpg
get_data/cfg_array/info/Selected Primary Screens_files/switchImg.js
get_data/cfg_array/info/Selected Primary Screens_files/switcher.html
get_data/cfg_array/info/Selected Primary Screens_files/webtrends.js
get_data/cfg_array/templates/base.html
get_data/cfg_array/templates/base_array.html
get_data/glycogenedb/getglycogene_entry.py
get_data/kegg_glycan/.swp
get_data/kegg_glycan/README_KEGG.md
get_data/kegg_glycan/findKEGG.py
get_data/kegg_glycan/findKEGG.xml
get_data/kegg_glycan/getkcfKEGG.py
get_data/kegg_glycan/getkcfKEGG.xml
get_data/kegg_glycan/linkKEGG.py
get_data/kegg_glycan/linkKEGG.xml
get_data/kegg_glycan/test-data/find_test1.txt
get_data/kegg_glycan/test-data/link_test1.txt
get_data/kegg_glycan/test_findKEGG.py
get_data/kegg_glycan/test_getkcfKEGG.py
get_data/kegg_glycan/test_linkKEGG.py
join_subtract_group/glycan_set_operations/README_set.md
join_subtract_group/glycan_set_operations/glycan.py
join_subtract_group/glycan_set_operations/glycan_sets.py
join_subtract_group/glycan_set_operations/glycan_sets.xml
join_subtract_group/glycan_set_operations/nodes.py
join_subtract_group/glycan_set_operations/test_sets.py
join_subtract_group/join_html/README_html.md
join_subtract_group/join_html/html_combiner.py
join_subtract_group/join_html/html_combiner.xml
manipulate/extend_linearcode/README_extend.md
manipulate/extend_linearcode/lc_extend.py
manipulate/extend_linearcode/lc_extend.xml
manipulate/extend_linearcode/test_linearcode_extend.py
manipulate/minimal_kcf/README_minimal.md
manipulate/minimal_kcf/minimal_kcf.py
manipulate/minimal_kcf/minimal_kcf.xml
manipulate/minimal_kcf/test_minimal_kcf.py
manipulate/rename_kcf/README_rename.md
manipulate/rename_kcf/rename_kcf.py
manipulate/rename_kcf/rename_kcf.xml
manipulate/rename_kcf/test_rename_kcf.py
tool_dependencies.xml
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/.idea/.name
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/.idea/.name Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,1 @@
+scru_msa_to_lc
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/.idea/encodings.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/.idea/encodings.xml Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="PROJECT" charset="UTF-8" />
+  </component>
+</project>
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/.idea/misc.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/.idea/misc.xml Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+    <OptionsSetting value="true" id="Add" />
+    <OptionsSetting value="true" id="Remove" />
+    <OptionsSetting value="true" id="Checkout" />
+    <OptionsSetting value="true" id="Update" />
+    <OptionsSetting value="true" id="Status" />
+    <OptionsSetting value="true" id="Edit" />
+    <ConfirmationsSetting value="0" id="Add" />
+    <ConfirmationsSetting value="0" id="Remove" />
+  </component>
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.5 virtualenv at ~/Code/glycantools/get_data/cfg/data_validity_testing/flask (1)" project-jdk-type="Python SDK" />
+</project>
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/.idea/modules.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/.idea/modules.xml Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/scru_msa_to_lc.iml" filepath="$PROJECT_DIR$/.idea/scru_msa_to_lc.iml" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/.idea/scru_msa_to_lc.iml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/.idea/scru_msa_to_lc.iml Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+  <component name="TestRunnerService">
+    <option name="PROJECT_TEST_RUNNER" value="Unittests" />
+  </component>
+</module>
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/.idea/workspace.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/.idea/workspace.xml Wed Mar 23 14:35:56 2016 -0400
b
b'@@ -0,0 +1,380 @@\n+<?xml version="1.0" encoding="UTF-8"?>\n+<project version="4">\n+  <component name="ChangeListManager">\n+    <list default="true" id="da528d67-ffd5-461f-b88c-6699e188f36a" name="Default" comment="" />\n+    <ignored path="scru_msa_to_lc.iws" />\n+    <ignored path=".idea/workspace.xml" />\n+    <ignored path=".idea/dataSources.local.xml" />\n+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />\n+    <option name="TRACKING_ENABLED" value="true" />\n+    <option name="SHOW_DIALOG" value="false" />\n+    <option name="HIGHLIGHT_CONFLICTS" value="true" />\n+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />\n+    <option name="LAST_RESOLUTION" value="IGNORE" />\n+  </component>\n+  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />\n+  <component name="CreatePatchCommitExecutor">\n+    <option name="PATCH_PATH" value="" />\n+  </component>\n+  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />\n+  <component name="FavoritesManager">\n+    <favorites_list name="scru_msa_to_lc" />\n+  </component>\n+  <component name="FileEditorManager">\n+    <leaf>\n+      <file leaf-file-name="munge_msa.py" pinned="false" current-in-tab="true">\n+        <entry file="file://$PROJECT_DIR$/munge_msa.py">\n+          <provider selected="true" editor-type-id="text-editor">\n+            <state vertical-scroll-proportion="0.0">\n+              <caret line="0" column="17" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />\n+              <folding />\n+            </state>\n+          </provider>\n+        </entry>\n+      </file>\n+      <file leaf-file-name="test_scru_msa_to_lc.py" pinned="false" current-in-tab="false">\n+        <entry file="file://$PROJECT_DIR$/test_scru_msa_to_lc.py">\n+          <provider selected="true" editor-type-id="text-editor">\n+            <state vertical-scroll-proportion="-0.0">\n+              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />\n+              <folding />\n+            </state>\n+          </provider>\n+        </entry>\n+      </file>\n+    </leaf>\n+  </component>\n+  <component name="IdeDocumentHistory">\n+    <option name="CHANGED_PATHS">\n+      <list>\n+        <option value="$PROJECT_DIR$/test_scru_msa_to_lc.py" />\n+        <option value="$PROJECT_DIR$/munge_msa.py" />\n+      </list>\n+    </option>\n+  </component>\n+  <component name="JsBuildToolGruntFileManager" detection-done="true" />\n+  <component name="JsBuildToolPackageJson" detection-done="true" />\n+  <component name="JsGulpfileManager">\n+    <detection-done>true</detection-done>\n+  </component>\n+  <component name="ProjectFrameBounds">\n+    <option name="y" value="28" />\n+    <option name="width" value="1920" />\n+    <option name="height" value="1018" />\n+  </component>\n+  <component name="ProjectLevelVcsManager" settingsEditedManually="false">\n+    <OptionsSetting value="true" id="Add" />\n+    <OptionsSetting value="true" id="Remove" />\n+    <OptionsSetting value="true" id="Checkout" />\n+    <OptionsSetting value="true" id="Update" />\n+    <OptionsSetting value="true" id="Status" />\n+    <OptionsSetting value="true" id="Edit" />\n+    <ConfirmationsSetting value="0" id="Add" />\n+    <ConfirmationsSetting value="0" id="Remove" />\n+  </component>\n+  <component name="ProjectView">\n+    <navigator currentView="ProjectPane" proportions="" version="1">\n+      <flattenPackages />\n+      <showMembers />\n+      <showModules />\n+      <showLibraryContents />\n+      <hideEmptyPackages />\n+      <abbreviatePackageNames />\n+      <autoscrollToSource />\n+      <autoscrollFromSource />\n+      <sortByType />\n+      <manualOrder />\n+      <foldersAlwaysOnTop value="true" />\n+    </navigator>\n+    <panes>\n+      <pane id="ProjectPane">\n+        <subPane>\n+          <PATH>\n+            <PATH_ELEMENT>\n+              <option name="myItemId" value="scru_msa_to_lc" />\n+     '..b'Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />\n+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />\n+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />\n+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />\n+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />\n+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />\n+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />\n+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />\n+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />\n+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />\n+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />\n+    </layout>\n+  </component>\n+  <component name="Vcs.Log.UiProperties">\n+    <option name="RECENTLY_FILTERED_USER_GROUPS">\n+      <collection />\n+    </option>\n+    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">\n+      <collection />\n+    </option>\n+  </component>\n+  <component name="VcsContentAnnotationSettings">\n+    <option name="myLimit" value="2678400000" />\n+  </component>\n+  <component name="XDebuggerManager">\n+    <breakpoint-manager />\n+    <watches-manager />\n+  </component>\n+  <component name="editorHistoryManager">\n+    <entry file="file://$PROJECT_DIR$/test_scru_msa_to_lc.py">\n+      <provider selected="true" editor-type-id="text-editor">\n+        <state vertical-scroll-proportion="-0.0">\n+          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />\n+          <folding />\n+        </state>\n+      </provider>\n+    </entry>\n+    <entry file="file://$PROJECT_DIR$/munge_msa.py">\n+      <provider selected="true" editor-type-id="text-editor">\n+        <state vertical-scroll-proportion="0.0">\n+          <caret line="0" column="17" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />\n+          <folding />\n+        </state>\n+      </provider>\n+    </entry>\n+  </component>\n+</project>\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/README_convertmsa.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/README_convertmsa.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,24 @@
+[TOC]
+
+# 1. munge_msa.py
+
+Read msa and strip out glycan data in LinearCode format.
+
+
+## Works with Galaxy?
+Yes. see [munge_msa.xml](munge_msa.xml)
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python munge_msa.py $input $output
+```
+
+
+## Unit Testing?
+Yes.
+
+```
+../../virtualpy/bin/activate
+python  test_msa_to_lc.py
+```
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/msa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/msa Wed Mar 23 14:35:56 2016 -0400
b
b'@@ -0,0 +1,588 @@\n+# .msa version 002\n+# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good\n+1579.78 1579.34 0  100 0.0  0.0  0.0  2 5 0 0 0 .10 10 C (Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN) (0) (carbNlink_35518_A)\n+1783.88 1784.34 0  100 0.0  0.0  0.0  2 6 0 0 0 .10 10 C (Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN) (0) (carbNlink_35521_A)\n+1824.91 1825.37 0  100 0.0  0.0  0.0  3 5 0 0 0 .10 10 C (GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN) (0) (carbNlink_35522_A)\n+1865.94 1866.38 0  100 0.0  0.0  0.0  4 4 0 0 0 .10 10 C (A??GN??Ma3(GN??Ma6)Mb4GNb4GN) (0) (carbNlink_35552_A)\n+1987.98 1988.36 0  100 0.0  0.0  0.0  2 7 0 0 0 .10 10 C (Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M) (0) (carbNlink_35062_A)\n+2029.01 2029.37 0  100 0.0  0.0  0.0  3 6 0 0 0 .10 10 C (A??GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN) (0) (carbNlink_35523_A)\n+2040.02 2040.39 0  100 0.0  0.0  0.0  4 4 1 0 0 .10 10 C (A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35428_A)\n+2070.03 2070.38 0  100 0.0  0.0  0.0  4 5 0 0 0 .10 10 C (A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN) (0) (carbNlink_35563_A)\n+2192.08 2192.37 0  100 0.0  0.0  0.0  2 8 0 0 0 .10 10 C (Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M) (0) (carbNlink_35061_A)\n+2244.12 2244.39 0  100 0.0  0.0  0.0  4 5 1 0 0 .10 10 C (A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35470_A)\n+2396.18 2396.38 0  100 0.0  0.0  0.0  2 9 0 0 0 .10 10 C (Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN) (0) (carbNlink_35527_A)\n+2418.21 2418.41 0  100 0.0  0.0  0.0  4 5 2 0 0 .10 10 C (A??(Fa3)GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35468_A)\n+2431.21 2431.39 0  100 0.0  0.0  0.0  4 5 0 1 0 .10 10 C (NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN) (0) (carbNlink_35566_A)\n+2459.24 2459.46 0  100 0.0  0.0  0.0  5 4 2 0 0 .10 10 C (GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35419_A)\n+2489.25 2489.39 0  100 0.0  0.0  0.0  5 5 1 0 0 .10 10 C (GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35456_A)\n+2519.26 2519.51 0  100 0.0  0.0  0.0  5 6 0 0 0 .10 10 C (A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN) (0) (carbNlink_35559_A)\n+2592.30 2592.38 0  100 0.0  0.0  0.0  4 5 3 0 0 .10 10 C (A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35442_A)\n+2605.30 2605.41 0  100 0.0  0.0  0.0  4 5 1 1 0 .10 10 C (NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35474_A)\n+2635.31 2635.39 0  100 0.0  0.0  0.0  4 6 0 1 0 .10 10 C (GNb4(NN??A??GN??Ma3)(Ma3(Ma6)Ma6)Mb4GNb4GN) (0) (carbNlink_35517_A)\n+2693.35 2693.40 0  100 0.0  0.0  0.0  5 6 1 0 0 .10 10 C (A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35461_A)\n+2779.39 2779.41 0  100 0.0  0.0  0.0  4 5 2 1 0 .10 10 C (NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F) (0) (carbNlink_35058_A)\n+2792.38 2792.43 0  100 0.0  0.0  0.0  4 5 0 2 0 .10 10 C (NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN) (0) (carbNlink_35577_A)\n+2809.40 2809.43 0  100 0.0  0.0  0.0  4 6 1 1 0 .10 10 C (GNb4(NN??A??GN??Ma3)(Ma3(Ma6)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35293_A)\n+2850.42 2850.33 0  100 0.0  0.0  0.0  5 5 1 1 0 .10 10 C (GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35457_A)\n+2880.43 2880.39 0  100 0.0  0.0  0.0  5 6 0 1 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN) (0) (carbNlink_35560_A)\n+2966.47 2966.41 0  100 0.0  0.0  0.0  4 5 1 2 0 .10 10 C (NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35513_A)\n+3054.52 3054.42 0  100 0.0  0.0  0.0  5 6 1 1 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35463_A)\n+3211.60 3211.56 0  100 0.0  0.0  0.0  5 5 1 2 0 .10 10 C (GNb4(NN??A??GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35505_A)\n+3299.65 3299.42 0  100 0.0  0.0  0.0  6 6 1 1 0 .10 10 C (GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35452_A)\n+3415.70 3415.74 0  100 0.0  0.0  0.0  5 6 1 2 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35467_A)\n+3503.75 3503.41 0  100 0.0  0.0  0.0  6 7 1 1 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35357_A)\n+'..b'GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35357_A)\n+3589.79 3589.53 0  100 0.0  0.0  0.0  5 6 2 2 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F) (0) (carbNlink_35057_A)\n+3602.78 3603.47 0  100 0.0  0.0  0.0  5 6 0 3 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4GN) (0) (carbNlink_35576_A)\n+3677.84 3677.89 0  100 0.0  0.0  0.0  6 7 2 1 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F) (0) (carbNlink_35044_A)\n+3690.83 3690.85 0  100 0.0  0.0  0.0  6 7 0 2 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN) (0) (carbNlink_35535_A)\n+3851.93 3851.73 0  100 0.0  0.0  0.0  6 7 3 1 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F) (0) (carbNlink_35032_A)\n+3864.92 3864.89 0  100 0.0  0.0  0.0  6 7 1 2 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35359_A)\n+3950.96 3950.89 0  100 0.0  0.0  0.0  5 6 2 3 0 .10 10 C (NN??A??(Fa3)GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35508_A)\n+4026.02 4025.76 0  100 0.0  0.0  0.0  6 7 4 1 0 .10 10 C (NN??A??(Fa3)GN??(A??(Fa3)GN??)Ma3(A??(Fa3)GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35635_A)\n+4039.01 4039.32 0  100 0.0  0.0  0.0  6 7 2 2 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F) (0) (carbNlink_35045_A)\n+4125.05 4124.80 0  100 0.0  0.0  0.0  5 6 3 3 0 .10 10 C (NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35506_A)\n+4140.06 4139.91 0  100 0.0  0.0  0.0  7 8 0 2 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4GN,NN) (0) (carbNlink_35066_A)\n+4213.10 4213.44 0  100 0.0  0.0  0.0  6 7 3 2 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F) (0) (carbNlink_35033_A)\n+4226.10 4226.26 0  100 0.0  0.0  0.0  6 7 1 3 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35363_A)\n+4299.14 4299.24 0  100 0.0  0.0  0.0  5 6 4 3 0 .10 10 C (NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35636_A)\n+4314.15 4314.25 0  100 0.0  0.0  0.0  7 8 1 2 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN) (0) (carbNlink_35064_A)\n+4387.19 4387.74 0  100 0.0  0.0  0.0  6 7 4 2 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F,F) (0) (carbNlink_35266_A)\n+4400.19 4400.65 0  100 0.0  0.0  0.0  6 7 2 3 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F) (0) (carbNlink_35047_A)\n+4488.24 4488.67 0  100 0.0  0.0  0.0  7 8 2 2 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F) (0) (carbNlink_35261_A)\n+4574.27 4575.09 0  100 0.0  0.0  0.0  6 7 3 3 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F) (0) (carbNlink_35035_A)\n+4587.27 4587.73 0  100 0.0  0.0  0.0  6 7 1 4 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35405_A)\n+4662.33 4662.49 0  100 0.0  0.0  0.0  7 8 3 2 0 .10 10 C (NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F,F) (0) (carbNlink_35262_A)\n+4675.32 4675.58 0  100 0.0  0.0  0.0  7 8 1 3 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN) (0) (carbNlink_35065_A)\n+4748.36 4748.24 0  100 0.0  0.0  0.0  6 7 4 3 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F,F) (0) (carbNlink_35029_A)\n+4761.36 4760.08 0  100 0.0  0.0  0.0  6 7 2 4 0 .10 10 C (NN??A??(Fa3)GN??(NN??A??GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35403_A)\n+4849.41 4849.38 0  100 0.0  0.0  0.0  7 8 2 3 0 .10 10 C (NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F) (0) (carbNlink_35268_A)\n+4935.45 4936.23 0  100 0.0  0.0  0.0  6 7 3 4 0 .10 10 C (NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbNlink_35402_A)\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/munge_msa.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/munge_msa.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,80 @@
+__author__ = "Chris Barnett"
+__version__ = "0.4"
+__license__ = "MIT"
+
+
+def check_count(linearcode,left="(",right=")",diff=False):
+    countleft=linearcode.count(left)
+    countright=linearcode.count(right)
+    if diff:
+        return countleft-countright
+    if countleft==countright:
+        return True
+    else:
+        return False
+
+def munge_linearcode_from_msa(inputstream):
+    """
+    will read the input msa file and strip out linearcode. Also attempts to clean damaged linearcode
+    :param inputstream (a file object):
+    :return: list_of_linearcode
+    """
+    if inputstream is None or inputstream == []:
+        return []
+    linearcode_list = []
+    for line in inputstream:
+        if line[0] == "#":
+            if "version" in line:
+                if "002" in line:
+                    version = "002"
+                elif "003" in line:
+                    version = "003"
+                else:
+                    raise ValueError("unknown version of msa file", line)
+            pass
+        else:
+            split = line.split()
+            splitindices = {"002": (15, 16), "003": (17, 18)}
+            linearcode = split[splitindices[version][0]]
+
+            # first check if missed out some of the linearcode
+            # Example where this is useful #(A??AN ; A??AN,NN)
+            import re
+            missing = split[splitindices[version][1]].lstrip()
+            if re.search('[a-zA-Z]', missing) is not None:
+                linearcode=','.join((linearcode,missing))
+
+            if check_count(linearcode): # equal number of brackets,append linearcode
+                linearcode_list.append(linearcode)
+            elif check_count(linearcode,diff=True) == 1 or check_count(linearcode,diff=True) == -1: # one bracket too many
+                if linearcode[0]=="(" and linearcode[-1]!=")": # check is there is a left bracket in position 1 and no right bracket in final position
+                    linearcode_list.append(linearcode+")")
+                elif linearcode[0]!="(" and linearcode[-1]==")": # check is there is no left bracket in position 1 and a right bracket in final position
+                    linearcode_list.append("("+linearcode)
+                else:
+                    raise ValueError("missing brackets in linearcode entry", linearcode,check_count(linearcode,diff=True))
+
+            else: # "("+x = ")" x>1 or x < -1
+                raise ValueError("missing brackets in linearcode entry", linearcode,check_count(linearcode,diff=True))
+
+    return linearcode_list
+
+
+if __name__ == "__main__":
+    import sys
+
+    try:
+        inputname = sys.argv[1]
+        outputname = sys.argv[2]
+    except Exception as e:
+        raise Exception(e, "Please pass an input and output filename as arguments")
+    instream = file(inputname, 'r')
+    outstream = file(outputname, "w")
+    try:
+        for item in munge_linearcode_from_msa(instream):
+            outstream.write(item + "\r\n")
+    except Exception as e:
+        raise
+    finally:
+        instream.close()
+        outstream.close()
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/munge_msa.pyc
b
Binary file convert_detect_formats/msa_to_linearcode/munge_msa.pyc has changed
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/munge_msa.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/munge_msa.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,28 @@
+<tool id="glytools_convertmsa" name="GAP convert msa to LinearCode " version="0.4">
+    <description>Extracts LinearCode format from an msa formatted file</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[munge_msa.py $input $output ]]></command>
+    <inputs>
+        <param format="msa" name="input" type="data" label="mass spec companion annotation file"/>
+    </inputs>
+    <outputs>
+        <data format="linearcode" name="output" label="Linear Code of $input.name"/>
+    </outputs>
+
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+        This tool reads an msa file then strips out and returns LinearCode.
+
+.. class:: infomark
+
+**Inputs**
+ this tools reads *msa* files. These are companion annotation files for raw mass spec data (.msd) files 
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/out Wed Mar 23 14:35:56 2016 -0400
b
b'@@ -0,0 +1,551 @@\n+(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)\r\n+(A??GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??Ma3)(Ma3(Ma6)Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??AN,NN)\r\n+(A??(A??GN??)AN)\r\n+(NN??A??(NN??)AN)\r\n+(A??(A??GN??)AN,NN)\r\n+(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)\r\n+(A??GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??(GN??)Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??(A??GN??)Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??(Fa3)GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(NN??A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)M'..b'GNb4GN,M)\r\n+(A??GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(Ga3Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4((Fa3)A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+((Fa3)A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??(Fa3)GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??(Fa3)GN??(A??(Fa3)GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??(Fa3)GN??(A??(Fa3)GN??)Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??Ma3(NN??A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??(Fa3)GN??(A??(Fa3)GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??(A??(Fa3)GN??)Ma3(A??(Fa3)GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4GN,NN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F,F)\r\n+(NN??A??(Fa3)GN??(NN??A??GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F)\r\n+(NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/out2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/out2 Wed Mar 23 14:35:56 2016 -0400
b
b'@@ -0,0 +1,551 @@\n+(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)\r\n+(A??GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??Ma3)(Ma3(Ma6)Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??AN,NN)\r\n+(A??(A??GN??)AN)\r\n+(NN??A??(NN??)AN)\r\n+(A??(A??GN??)AN\r\n+(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)\r\n+(A??GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??(GN??)Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??(A??GN??)Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??(Fa3)GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(NN??A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GN'..b'GNb4GN,M)\r\n+(A??GN??Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4GN)\r\n+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M)\r\n+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(Ga3Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4((Fa3)A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+((Fa3)A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??(Fa3)GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??Ma3(A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??(Fa3)GN??(A??(Fa3)GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(A??(Fa3)GN??(A??(Fa3)GN??)Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(GNb4(NN??A??GN??Ma3)(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)\r\n+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??Ma3(NN??A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(A??(Fa3)GN??(A??(Fa3)GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??(A??(Fa3)GN??)Ma3(A??(Fa3)GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4GN,NN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??(Fa3)GN??Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F,F)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F,F)\r\n+(NN??A??(Fa3)GN??(NN??A??GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,F)\r\n+(NN??A??(Fa3)GN??(NN??A??(Fa3)GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)\r\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/msa_to_linearcode/test_msa_to_lc.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/msa_to_linearcode/test_msa_to_lc.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,119 @@
+__license__ = "MIT"
+
+import unittest
+import munge_msa as munge
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_empty_stream(self):
+        m = munge.munge_linearcode_from_msa(None)
+        self.assertEqual(m, [])
+        m = munge.munge_linearcode_from_msa([])
+        self.assertEqual(m, [])
+
+
+    def test_msa_version2(self):
+        import StringIO
+
+        v2input = ["# .msa version 002",
+                   "# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good",
+                   "1579.78 1579.85 0  100 0.0  0.0  0.0  2 5 0 0 0 .10 10 C (Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN) (0) (carbNlink_35518_A)"]
+        v2handle = StringIO.StringIO('\n'.join(v2input))
+        m = munge.munge_linearcode_from_msa(v2handle)
+        self.assertEqual(m, ['(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)'])
+
+
+    def test_msa_version3(self):
+        import StringIO
+
+        v3input = ["# .msa version 003", "# O-glycans",
+                   "# pred  observ off chg rank intens dif %dif sd nac hex fuc na ng S dom good",
+                   " 534.29  534.39 0 Na+    6 2984.0 0.0  0.0  0.0   1  1  0  0  0  0.0 0.0 0 ((A??)AN) (0) ()",
+                   " 779.41  779.54 0 Na+  142  463.8 0.0  0.0  0.0   2  1  0  0  0  0.0 0.0 0 ((A??)AN,GN) (0) ()"]
+        v3handle = StringIO.StringIO('\n'.join(v3input))
+        m = munge.munge_linearcode_from_msa(v3handle)
+        self.assertEqual(m, ['((A??)AN)', '((A??)AN,GN)'])
+
+    def test_msa_versionunknown(self):
+        import StringIO
+
+        vinput = ["# .msa version xyz"]
+        vhandle = StringIO.StringIO('\n'.join(vinput))
+        with self.assertRaisesRegexp(ValueError, "version"):
+            m = munge.munge_linearcode_from_msa(vhandle)
+
+    def test_space_in_linear(self):
+        import StringIO
+
+        v2input = ["# .msa version 002", "# O-glycans",
+                   "# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good",
+                   " 895.46  895.37 0  100 0.0  0.0  0.0  1 1 0 1 0 .10 10 C (A??AN NN) (0) (carbOlink_35827_A)"]
+        v2handle = StringIO.StringIO('\n'.join(v2input))
+        m = munge.munge_linearcode_from_msa(v2handle)
+        self.assertEqual(m, ['(A??AN,NN)'])
+
+    def test_first_missing_bracket(self):
+        import StringIO
+
+        v2input = ["# .msa version 002", "# O-glycans",
+                   "# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good",
+                   " 895.46  895.37 0  100 0.0  0.0  0.0  1 1 0 1 0 .10 10 C A??AN NN) (0) (carbOlink_35827_A)"]
+        v2handle = StringIO.StringIO('\n'.join(v2input))
+        m = munge.munge_linearcode_from_msa(v2handle)
+        self.assertEqual(m, ['(A??AN,NN)'])
+
+    def test_final_missing_bracket(self):
+        import StringIO
+
+        v2input = ["# .msa version 002", "# O-glycans",
+                   "# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good",
+                   " 895.46  895.37 0  100 0.0  0.0  0.0  1 1 0 1 0 .10 10 C (A??AN NN (0) (carbOlink_35827_A)"]
+        v2handle = StringIO.StringIO('\n'.join(v2input))
+        m = munge.munge_linearcode_from_msa(v2handle)
+        self.assertEqual(m, ['(A??AN,NN)'])
+
+    def test_final_missing_bracket_and_incorrect_extension_region(self):
+        import StringIO
+
+        v2input = ["# .msa version 002", "# O-glycans",
+                   "# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good",
+                   " 895.46  895.37 0  100 0.0  0.0  0.0  1 1 0 1 0 .10 10 C (A??AN (0) (carbOlink_35827_A)"]
+        v2handle = StringIO.StringIO('\n'.join(v2input))
+        m = munge.munge_linearcode_from_msa(v2handle)
+        self.assertEqual(m, ['(A??AN)'])
+
+    def test_missing_bracket1(self):
+        import StringIO
+
+        v2input = ["# .msa version 002", "# O-glycans",
+                   "# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good",
+                   " 895.46  895.37 0  100 0.0  0.0  0.0  1 1 0 1 0 .10 10 C (NN??A??(Fa3)GN??(NN??A??(Fa3GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6) GN) (0) (carbOlink_35827_A)"]
+        v2handle = StringIO.StringIO('\n'.join(v2input))
+        with self.assertRaises(ValueError):
+            m = munge.munge_linearcode_from_msa(v2handle)
+
+    def test_missing_bracket2(self):
+        import StringIO
+
+        v2input = ["# .msa version 002", "# O-glycans",
+                   "# pred m   observ m  off rank   dif     %dif  sd nac hex fuc neuac neugc  S good",
+                   " 895.46  895.37 0  100 0.0  0.0  0.0  1 1 0 1 0 .10 10 C (NN??A??(Fa3)GN??(NN??A??(((Fa3)GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN) (0) (carbOlink_35827_A)"]
+        v2handle = StringIO.StringIO('\n'.join(v2input))
+        with self.assertRaises(ValueError):
+            m = munge.munge_linearcode_from_msa(v2handle)
+
+def run_tests():
+    unittest.main()
+
+
+if __name__ == '__main__':
+    run_tests()
+
+
+# handle = StringIO.StringIO(''.join(item))
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/README_convert.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/README_convert.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,84 @@
+
+[TOC]
+
+# 1. post_glycan_convert.py
+
+**RECOMMENDED**
+
+**Use the NEW glycan convert tools from RINGS**
+
+## Works with Galaxy?
+Yes. see [post_glycan_convert.xml](post_glycan_convert.xml)
+
+## Formats supported
+Can only convert to KCF, GlycoCT {condensed}, LinearCode, Wurcs, IUPAC and MDL MOl. (last checked 5/10/2015, last checked 25/02/2015)
+JSON output is requested by default. This returns a JSON output and the glycan in its new format.
+
+| File Format (Down) , Converts to (Across) | WURCS | KCF  | LinearCode | IUPAC | GlydeII | GlycoCT XML | GlycoCT (condensed) | MDLMol | LINUCS |
+|:-----------------------------------------:|-------|------|------------|-------|---------|-------------|---------------------|--------|--------|
+|                   WURCS                   | -     | -    | -          | -     | -       | -           | -                   | -      | -      |
+|                    KCF                    | X     | -    | X,U        | X     | -       | -           | X                   | X,U    | U      |
+|                 LinearCode                | X     | X,U  | -          | X     | -       | -           | X                   | X      | -      |
+|                   IUPAC                   | X     | X,U  | X          | -     | -       | -           | X                   | X      | -      |
+|                  Glyde II                 | -     | X, U | X          | X     | -       | -           | X                   | X      | -      |
+|                GlycoCT XML                | -     | X, U | X          | X     | -       | -           | X                   | X      | -      |
+|            GlycoCT (condensed)            | X     | X, U | X          | X     | -       | -           | -                   | X      | -      |
+|                   MDLMol                  | -     | -    | -          | -     | -       | -           | -                   | -      | -      |
+|                   LINUCS                  | -     | U    | -          | -     | -       | -           | -                   | -      | -      |
+
+
+- does not convert
+C - converts using NEW Ring convert tool
+U - converts using specific utility on RINGS mainpage
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python post_glycan_convert.py -i $input -f $changeformat -t $outputformat -o $output -j $jsonoutput
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python post_glycan_convert.py -h
+```
+
+## Unit Testing?
+Yes. Use test_rings_convert_via_post.py
+
+```
+../../virtualpy/bin/activate
+python test_rings_convert_via_post.py
+```
+
+# 2. glycan_convert.py
+**Convert between multiple glycan formats using the RINGS SOAP service**
+
+Rather use the other tool from RINGS.
+
+
+## Works with Galaxy?
+Yes. see [glycan_convert.xml](glycan_convert.xml)
+
+## Command line usage
+
+```
+../../virtualpy/bin/activate
+python glycan_convert.py -i $input -f $changeformat -o $output
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python glycan_convert.py -h
+```
+
+## Unit Testing?
+Yes. Use test_rings_convert_format.py
+
+```
+../../virtualpy/bin/activate
+python test_rings_convert_format.py
+```
+
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/allowed_formats
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/allowed_formats Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,31 @@
+Glycoct_condensed  - input glycan can only be converted to the following formats: ', ['Kcf', 'Wurcs', 'Iupac', 'Linearcode', 'Mol'])
+Glycoct_xml input glycan can only be converted to the following formats: ', ['Kcf', 'Glycoct', 'Iupac', 'Linearcode', 'Mol', 'Glycoct'])
+GLYDE2 input glycan can only be converted to the following formats: ', ['Kcf', 'Glycoct', 'Iupac', 'Linearcode', 'Mol', 'Glycoct'])
+IUPAC  input glycan can only be converted to the following formats: ', ['Glycoct', 'Kcf', 'Wurcs', 'Linearcode', 'Mol'])
+KCF  input glycan can only be converted to the following formats: ', ['Glycoct', 'Iupac', 'Linearcode', 'Mol', 'Wurcs'])
+Linearcode  input glycan can only be converted to the following formats: ', ['Glycoct', 'Kcf', 'Wurcs', 'Iupac', 'Mol'])
+LINUCS  input glycan can only be converted to the following formats: ', [])
+MDLMOl   input glycan can only be converted to the following formats: ', [])
+WURCS  input glycan can only be converted to the following formats: ', [])
+
+
+Table generated using http://www.tablesgenerator.com/markdown_tables
+Glycan Converter Allowed Formats Matrix
+
+
+| File Format (Down) , Converts to (Across) | WURCS | KCF  | LinearCode | IUPAC | GlydeII | GlycoCT XML | GlycoCT (condensed) | MDLMol | LINUCS |
+|:-----------------------------------------:|-------|------|------------|-------|---------|-------------|---------------------|--------|--------|
+|                   WURCS                   | -     | -    | -          | -     | -       | -           | -                   | -      | -      |
+|                    KCF                    | X     | -    | X,U        | X     | -       | -           | X                   | X,U    | U      |
+|                 LinearCode                | X     | X,U  | -          | X     | -       | -           | X                   | X      | -      |
+|                   IUPAC                   | X     | X,U  | X          | -     | -       | -           | X                   | X      | -      |
+|                  Glyde II                 | -     | X, U | X          | X     | -       | -           | X                   | X      | -      |
+|                GlycoCT XML                | -     | X, U | X          | X     | -       | -           | X                   | X      | -      |
+|            GlycoCT (condensed)            | X     | X, U | X          | X     | -       | -           | -                   | X      | -      |
+|                   MDLMol                  | -     | -    | -          | -     | -       | -           | -                   | -      | -      |
+|                   LINUCS                  | -     | U    | -          | -     | -       | -           | -                   | -      | -      |
+
+
+- does not convert
+C - converts using NEW Ring convert tool
+U - converts using specific utility on RINGS mainpage
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/check_glycan_convert.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/check_glycan_convert.sh Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,13 @@
+#__license__ = "MIT"
+
+for data in Glycoct_condensed  Glycoct_xml  GLYDE2  IUPAC  KCF  KCF2  Linearcode  LINUCS  MDLMOl  WURCS
+#for data in  KCF  
+do
+for i in KCF LinearCode GLYDE2 GlycoCT Iupac LINUCS Wurcs Mol 
+do
+echo $data $i
+rm output
+../../virtualpy/bin/python glycan_convert.py -i ../../example_data/$data -f $i 
+head output
+done
+done
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/check_post_glycan_convert.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/check_post_glycan_convert.sh Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,11 @@
+#__license__ = "MIT"
+
+for data in Glycoct_condensed  Glycoct_xml  GLYDE2  IUPAC  KCF  KCF2  Linearcode  LINUCS  MDLMOl  WURCS
+#for data in  KCF  
+do
+for i in KCF LinearCode GLYDE2 GlycoCT Iupac LINUCS Wurcs Mol 
+do
+echo $data $i
+../../virtualpy/bin/python post_glycan_convert.py -i ../../example_data/$data -f $i  -t text
+done
+done
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/glycan_convert.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/glycan_convert.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,57 @@
+__author__ = "Chris Barnett"
+__version__ = "0.3"
+__license__ = "MIT"
+
+
+def convert_glycan(inputstream, format, text=True):
+    """
+    passes inputstream to RINGS and returns requested glycan format
+    allowed formats are KCF, LinearCode... etc. but not all conversion are supported.
+    Unsupported conversion return None
+
+    :rtype :  ((object,text,None) and  format
+    :param inputstream: inputstream with glycan struct. (not sure for multiple...  in any of LinearCode, KCF etc. (can be mixed))
+    :param format: desired output format
+    :param text: True yields raw text, False yields suds.umx.types object from RINGS
+    """
+    if inputstream is None or inputstream == [] or inputstream == "":
+        raise IOError("empty input stream")
+    if format is None or format == "":
+        return inputstream, None  # <-- should not return format of inputstream. YAGNI. user should use detect_formats tool
+    try:
+        from suds.client import Client
+
+        url = 'http://rings.t.soka.ac.jp/axis2/services/Utilities?wsdl'
+        client = Client(url)
+        if text:
+            response = client.service.ConvertGlycan_Str(inputstream.read(), format, 'glycan')
+        else:
+            response = client.service.ConvertGlycan(inputstream.read(), format, 'glycan')
+        if response is None or str(response.strip()) == '':
+            raise IOError("empty response")
+            #return None, None # response is None then None is returned.
+        return response, format  # Again not checking format
+    except Exception as e:
+        raise IOError(e)
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input",
+                      help="input any glycan file (input)")
+    parser.add_option("-f", action="store", type="string", dest="f", default="KCF",
+                      help="format to convert to (KCF)")
+    parser.add_option("-n", action="store_true", dest="n",default=False,
+                      help="turn off textual output format (not recommended)")
+    parser.add_option("-o", action="store", type="string", dest="o", default="output",
+                      help="output glycan file (output)")
+    (options, args) = parser.parse_args()
+    try:
+        instream = file(options.i, 'r')
+    except Exception as e:
+        raise IOError(e, "the input  file specified does not exist. Use -h flag for help")
+    with open(options.o,'w') as f:
+        f.write( str(convert_glycan(instream, options.f, not options.n)[0]))
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/glycan_convert.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/glycan_convert.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,58 @@
+<tool id="glytools_converter_soap" name="GAP convert format (SOAP)" version="0.3">
+    <description> Convert between multiple glycan formats using the RINGS SOAP service</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[glycan_convert.py -i $input -f $changeformat -o $output]]></command>
+    <inputs>
+        <param format="kcf,glycoct_xml,linucs,linearcode,iupac,glydeii,txt" name="input" type="data" label="Source file"/>
+        <param name="changeformat" type="select" label="Format to convert to">
+          <option value="KCF" selected="true"> KCF </option>
+          <option value="LinearCode" selected="false"> LinearCode </option>
+          <option value="LINUCS" selected="false"> LINUCS </option>
+          <option value="GlycoCT" selected="false"> Glycoct </option>
+          <option value="IUPAC" selected="false"> IUPAC </option>
+        </param>
+    </inputs>
+    <outputs>
+
+        <data format="input" name="output" metadata_source="input">
+            <change_format>
+                <when input="changeformat" value="KCF" format="kcf"/>
+                <when input="changeformat" value="GlycoCT" format="glycoct"/>
+                <when input="changeformat" value="LinearCode" format="linearcode"/>
+                <when input="changeformat" value="IUPAC" format="iupac"/>
+                <when input="changeformat" value="LINUCS" format="linucs"/>
+            </change_format>
+        </data>
+    </outputs>
+
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool converts between glycan formats using the RINGS SOAP convert service.
+
+.. class:: infomark
+
+**Input**
+
+Any glycan dataset *except* for GlycoCT{condensed}, WURCS, MDL Mol and LINUCS (LINUCS only converts to LINUCS with this tools and the other formats do not convert)
+
+
+.. class:: infomark
+
+**Output**
+
+Can only convert to KCF, GlycoCT (xml), LinearCode, LINUCS, IUPAC  (last checked 25/02/2015).
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/post_glycan_convert.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/post_glycan_convert.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,284 @@\n+__author__ = "Chris Barnett"\n+__version__ = "0.5.2"\n+__license__ = "MIT"\n+\n+from BeautifulSoup import BeautifulSoup\n+import mechanize\n+\n+class PrettifyHandler(mechanize.BaseHandler):\n+    def http_response(self, request, response):\n+        if not hasattr(response, "seek"):\n+            response = mechanize.response_seek_wrapper(response)\n+        # only use BeautifulSoup if response is html\n+        if response.info().dict.has_key(\'content-type\') and (\'html\' in response.info().dict[\'content-type\']):\n+            soup = BeautifulSoup(response.get_data())\n+            response.set_data(soup.prettify())\n+        return response\n+\n+\n+def mechanise_glycan_convert(inputstream, format, textformat="json", debug=False):\n+    """\n+    Use mechanise to submit input glycan and formats to the new converter tool at RINGS\n+    :param inputstream: input glycan file stream that is read and then passed to the textarea in web form\n+    :param format: format to convert to. Options change dependent on input type. [\'Glycoct\', \'Linearcode\', \'Mol\', \'Wurcs\'])\n+    :param textformat: output returned in text, json or html. default is text.\n+    :param debug: print debug info from mechanise\n+    Can convert to WURCS, mol, Glycoct, Glycoct{condensed}, LinearCode, KCF.\n+    Does not yet support Linucs as input format. Cannot convert to GLYDE2, IUPAC, Linucs,\n+    Converts to image when kcf html is returned.\n+\n+    http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/convert/index.pl\n+    http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/convert/convert_index2.pl\n+    which then directs to http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/convert/convert_index2.pl\n+    http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/convert/convert.pl\n+    """\n+    import mechanize\n+    import cookielib\n+\n+    if inputstream is None or inputstream == []:\n+        raise IOError("empty input stream")\n+        #return None\n+\n+    if format is None or format == "":\n+        return inputstream  #\n+\n+    # create a Browser\n+    br = mechanize.Browser()\n+    br.add_handler(PrettifyHandler())\n+\n+    #  handle cookies - Cookie Jar\n+    cj = cookielib.LWPCookieJar()\n+    br.set_cookiejar(cj)\n+\n+    # Browser options\n+    br.set_handle_equiv(True)\n+    br.set_handle_gzip(True)\n+    br.set_handle_redirect(True)\n+    br.set_handle_referer(True)\n+    br.set_handle_robots(False)\n+\n+    # Follows refresh 0 but not hangs on refresh > 0\n+    br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)\n+\n+    # Want debugging messages?\n+    br.set_debug_http(debug)\n+    br.set_debug_redirects(debug)\n+    br.set_debug_responses(debug)\n+\n+    br.addheaders = [(\'User-agent\',\n+                      \'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1\')]\n+\n+    # Open site\n+    page = \'http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/convert/index.pl\'\n+    br.open(page)\n+\n+    # Show the response headers\n+    response_info = br.response().info()\n+\n+    # select the input form\n+    br.select_form(nr=0)\n+    # read user glycan and submit\n+    glycandata = inputstream.read() # read into a variable as I need it later\n+    br.form["in_data"] = glycandata\n+    br.submit()\n+\n+    # the submit redirects to another page which is generated based on the input glycan\n+    # now submit second form\n+    br.select_form(nr=0)\n+\n+    #. bugfix - reinsert data as 7 spaces get prepended to it during the post ?!\n+    br.form["in_data"] = glycandata\n+    # look at the convert_to control. These are the options allowed for the particular input as determined by rings\n+    control = br.form.find_control("convert_to", type="select")\n+    available_formats =  [item.attrs[\'value\'] for item in control.items]  # should match user selected format .\n+\n+    # check that the user entered format is in the available formats, if not raise error\n+    if format not in available_formats:\n+        raise IOError ("Requested ", format,"  but input glycan ca'..b't(30)\n+    base_url = "http://rings.t.soka.ac.jp/"\n+    verificationErrors = []\n+    accept_next_alert = True\n+    driver.get(base_url + "/cgi-bin/tools/utilities/convert/index.pl")\n+    driver.find_element_by_name("datasetname").clear()\n+    driver.find_element_by_name("datasetname").send_keys("default1")\n+    driver.find_element_by_name("in_data").clear()\n+    driver.find_element_by_name("in_data").send_keys(\n+        "ENTRY      12345     Glycan\\nNODE        2\\n            1     galnac     0     0\\n            2     gal     -8     0\\nEDGE        1\\n            1     2:1     1\\n///")\n+    driver.find_element_by_css_selector("input[type=\\"submit\\"]").click()\n+    Select(driver.find_element_by_name("convert_to")).select_by_visible_text("WURCS")\n+    # ERROR: Caught exception [Error: Dom locators are not implemented yet!]\n+    driver.find_element_by_css_selector("input[type=\\"submit\\"]").click()\n+\n+\n+def defunct_driver_glycan_convert(inputstream):\n+    """\n+    seems cool but starts a browser there is no strictly headless solution with selenium\n+    """\n+    from contextlib import closing\n+    from selenium.webdriver import Firefox  # pip install selenium\n+    from selenium.webdriver.support.ui import WebDriverWait\n+    from selenium.webdriver.support.ui import Select\n+\n+    base_url = "http://rings.t.soka.ac.jp/"\n+    url = base_url + "/cgi-bin/tools/utilities/convert/index.pl"\n+    # use firefox to get page with javascript generated content\n+    with closing(Firefox()) as browser:\n+        browser.get(url)\n+        browser.find_element_by_name("datasetname").clear()\n+        browser.find_element_by_name("datasetname").send_keys("default1")\n+        browser.find_element_by_name("in_data").clear()\n+        browser.find_element_by_name("in_data").send_keys(\n+            "ENTRY      12345     Glycan\\nNODE        2\\n            1     galnac     0     0\\n            2     gal     -8     0\\nEDGE        1\\n            1     2:1     1\\n///")\n+        browser.find_element_by_css_selector("input[type=\\"submit\\"]").click()\n+        # wait for the page to load\n+        WebDriverWait(browser, timeout=10).until(\n+            lambda x: x.find_element_by_id(\'convert_to\'))\n+        Select(browser.find_element_by_name("convert_to")).select_by_visible_text("WURCS")\n+        browser.find_element_by_css_selector("input[type=\\"submit\\"]").click()\n+\n+        # store it to string variable\n+        page_source = browser.page_source\n+        print(page_source)\n+\n+if __name__ == "__main__":\n+    from optparse import OptionParser\n+\n+    usage = "usage: python %prog [options]\\n"\n+    parser = OptionParser(usage=usage)\n+    parser.add_option("-i", action="store", type="string", dest="i", default="input",\n+                      help="input any glycan file (input)")\n+    parser.add_option("-f", action="store", type="string", dest="f", default="Kcf",\n+                      help="format to convert to (Kcf)")\n+    parser.add_option("-t", action="store", type="string", dest="t", default="text",\n+                      help="format style, text, html or json")\n+    parser.add_option("-o", action="store", type="string", dest="o", default="output",\n+                      help="output glycan file (output)")\n+    parser.add_option("-j", action="store", type="string", dest="j", default="jsonoutput",\n+                      help="output json output, only if json format is selected (output.json)")\n+    (options, args) = parser.parse_args()\n+    try:\n+        instream = file(options.i, \'r\')\n+    except Exception as e:\n+        raise IOError(e, "the input file specified does not exist. Use -h flag for help")\n+    m = mechanise_glycan_convert(instream, options.f, options.t)\n+    if options.t =="text" or options.t=="html":\n+        with open(options.o,\'w\') as f:\n+            f.write(m)\n+    elif options.t == "json":\n+        with open(options.j,\'w\') as f1:\n+            f1.write(m)\n+        with open(options.o,\'w\') as f:\n+            f.write("\\n".join(clean_json_response(m)))\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/post_glycan_convert.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/post_glycan_convert.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,115 @@
+<tool id="glytools_converter" name="GAP convert glycan format" version="0.5.2">
+    <description> using the new converter at RINGS</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+<stdio>
+    <regex match="IOError" 
+           source="both" 
+           level="fatal" 
+           description="IOError" />
+    <regex match="UserWarning: gzip transfer encoding is experimental" 
+           source="both" 
+           level="warning" 
+           description="Warning re use of gzip encoding" />
+    <regex match="br.set_handle_gzip(True)" 
+           source="both" 
+           level="warning" 
+           description="Warning re use of gzip encoding" />
+    <regex match="IOError" 
+           source="both" 
+           level="fatal" 
+           description="IOError" />
+</stdio>
+
+    <command interpreter="python"><![CDATA[post_glycan_convert.py -i $input -f $changeformat -t $outputformat -o $output -j $jsonoutput]]></command>
+    <inputs>
+        <param format="kcf,glycoct,glycoct_xml,linucs,linearcode,iupac,wurcs,glydeii,txt" name="input" type="data" label="Source file"/>
+        <param name="changeformat" type="select" label="Format to convert to ">
+          <option value="Kcf" selected="true"> KCF </option>
+          <option value="Glycoct" selected="false"> Glycoct {condensed}</option>
+          <option value="Linearcode" selected="false"> LinearCode </option>
+          <option value="Wurcs" selected="false"> WURCS </option>
+          <option value="Mol" selected="false"> MDL Mol </option>
+          <option value="Iupac" selected="false"> IUPAC </option>
+        </param>
+        <param name="outputformat" type="select" label="Output format ">
+          <option value="html" selected="false"> html </option>
+          <option value="text" selected="false"> text </option>
+          <option value="json" selected="true"> json </option>
+        </param>
+    </inputs>
+    <outputs>
+        <data format="txt" name="jsonoutput" label="json output" />
+
+        <data format="input" name="output" metadata_source="input">
+            <change_format>
+                <when input="changeformat" value="Kcf" format="kcf"/>
+                <when input="changeformat" value="Glycoct" format="glycoct"/>
+                <when input="changeformat" value="Linearcode" format="linearcode"/>
+                <when input="changeformat" value="Wurcs" format="wurcs"/>
+                <when input="changeformat" value="Mol" format="mdlmol"/>
+                <when input="changeformat" value="Iupac" format="iupac"/>
+            </change_format>
+        </data>
+    </outputs>
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool converts between glycan formats using the RINGS *new* convert tool.
+
+.. class:: infomark
+
+**Input**
+
+Any glycan dataset *except* for WURCS, MDL Mol and LINUCS.
+
+
+.. class:: infomark
+
+**Output**
+
+Can only convert to KCF, GlycoCT {condensed}, LinearCode, Wurcs, IUPAC and MDL MOl. (last checked 5/10/2015, last checked 25/02/2015)
+JSON output is requested by default. This returns a JSON output and the glycan in its new format. 
+
+
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| File format (Down), Converts to (Across) | WURCS | KCF  | LinearCode | IUPAC | GlydeII | GlycoCT XML | GlycoCT (condensed) | MDLMol | LINUCS |
++==========================================+=======+======+============+=======+=========+=============+=====================+========+========+
+| WURCS                                    | -     | -    | -          | -     | -       | -           | -                   | -      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| KCF                                      | X     | -    | X, U       | X     | -       | -           | X                   | X, U   | U      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| LinearCode                               | X     | X, U | -          | X     | -       | -           | X                   | X      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| IUPAC                                    | X     | X, U | X          | -     | -       | -           | X                   | X      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| GlydeII                                  | -     | X, U | X          | X     | -       | -           | X                   | X      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| GlycoCT XML                              | -     | X, U | X          | X     | -       | -           | X                   | X      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| GlycoCT (condensed)                      | X     | X, U | X          | X     | -       | -           | -                   | X      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| MDLMol                                   | -     | -    | -          | -     | -       | -           | -                   | -      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+| LINUCS                                   | -     | U    | -          | -     | -       | -           | -                   | -      | -      |
++------------------------------------------+-------+------+------------+-------+---------+-------------+---------------------+--------+--------+
+
+
+- \- does not convert
+
+C - converts using NEW Ring convert tool
+
+U - converts using specific utility on RINGS mainpage
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/test_rings_convert_format.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/test_rings_convert_format.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,257 @@\n+__license__ = "MIT"\n+\n+import unittest\n+import glycan_convert as gc\n+\n+\n+class SimpleUnitTest(unittest.TestCase):\n+    def setUp(self):\n+        import os\n+\n+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:\n+        # dictionary of example glycan formats\n+        self.types = {"KCF": """\n+ENTRY      12345     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+""", "LINEARCODE": """((A??)AN)""", "LinearCode": """GNb2(Ab4GNb4)Ma3(Ab4GNb2(Fa3(Ab4)GNb6)Ma6)Mb4GNb4GN""",\n+                      "LINUCS": """[][D-GLC]{[(6+1)][B-D-GLCP]{[(3+1)][B-D-GLCP]{}[(6+1)][B-D-GLCP]{[(6+1)][B-D-GLCP]{[(3+1)][B-D-GLCP]{}[(6+1)][B-D-GLCP]{}}}}}""",\n+                      "IUPAC": """GlcNAc(b1-2)Man(a1-6)[Gal(b1-4)GlcNAc(b1-2)""", "GLYDE2": """\n+<?xml version="1.0" encoding="UTF-8" ?>\n+<GlydeII>\n+<molecule subtype="glycan" id="From_GlycoCT_Translation">\n+<residue subtype="base_type" partid="1" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=b-dglc-HEX-1:5" />\n+<residue subtype="substituent" partid="2" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=n-acetyl" />\n+<residue subtype="base_type" partid="3" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=a-lgal-HEX-1:5|6:d" />\n+<residue subtype="base_type" partid="4" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=b-dgal-HEX-1:5" />\n+<residue subtype="base_type" partid="5" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=a-dgro-dgal-NON-2:6|1:a|2:keto|3:d" />\n+<residue subtype="substituent" partid="6" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=n-acetyl" />\n+<residue_link from="2" to="1">\n+<atom_link from="N1H" to="C2" to_replace="O2" bond_order="1" />\n+</residue_link>\n+<residue_link from="3" to="1">\n+<atom_link from="C1" to="O3" from_replace="O1" bond_order="1" />\n+</residue_link>\n+<residue_link from="4" to="1">\n+<atom_link from="C1" to="O4" from_replace="O1" bond_order="1" />\n+</residue_link>\n+<residue_link from="5" to="4">\n+<atom_link from="C2" to="O3" from_replace="O2" bond_order="1" />\n+</residue_link>\n+<residue_link from="6" to="5">\n+<atom_link from="N1H" to="C5" to_replace="O5" bond_order="1" />\n+</residue_link>\n+</molecule>\n+</GlydeII>\n+""", "glycoct": """\n+<?xml version="1.0" encoding="UTF-8"?>\n+<sugar version="1.0">\n+  <residues>\n+    <basetype id="1" anomer="x" superclass="hex" ringStart="-1" ringEnd="-1" name="x-dman-HEX-x:x">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="2" anomer="a" superclass="hex" ringStart="1" ringEnd="5" name="a-dman-HEX-1:5">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="3" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dglc-HEX-1:5">\n+      <stemtype id="1" type="dglc" />\n+    </basetype>\n+    <substituent id="4" name="n-acetyl" />\n+    <basetype id="5" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dgal-HEX-1:5">\n+      <stemtype id="1" type="dgal" />\n+   </basetype>\n+    <basetype id="6" anomer="a" superclass="hex" ringStart="1" ringEnd="5" name="a-dman-HEX-1:5">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="7" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dglc-HEX-1:5">\n+      <stemtype id="1" type="dglc" />\n+    </basetype>\n+    <substituent id="8" name="n-acetyl" />\n+    <basetype id="9" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dgal-HEX-1:5">\n+      <stemtype id="1" type="dgal" />\n+    </basetype>\n+  </residues>\n+  <linkages>\n+    <connection id="1" parent="1" child="2">\n+      <linkage id="1" parentType="o" childType="d">\n+        <parent pos="3" />\n+        <child pos="1" />\n+      </linkage>\n+    </connection>\n+    <connection id="2" parent="2" child="3">\n+      <linkage id="2" parentType="o" childType="d">\n+        <parent pos="2" />\n+        <child pos="1" />\n+      </linkage>\n+    </connection>\n+    <connec'..b'cetyl\\n", "LIN\\n", "1:1o(-1+1)2d\\n", "2:2o(-1+1)3d\\n", "3:3o(-1+1)4d\\n", "4:3o(-1+1)5d\\n", "5:5o(-1+1)6d\\n", "6:5o(-1+1)7d\\n", "7:2d(2+1)8n\\n", "8:1d(2+1)9n\\n", "\\n"]}\n+""", "sometext": """\n+        ab1234 fkk\n+""", "somedigraph": """\n+digraph HumanGly {\n+A\n+B\n+C\n+D\n+E\n+F\n+G\n+H\n+I\n+J\n+K\n+A -> B\n+A -> C\n+C -> D\n+D -> E\n+D -> F\n+E -> G\n+E -> H\n+G -> I\n+F -> J\n+J -> K\n+}\n+\n+        """}\n+\n+        pass\n+\n+    def tearDown(self):\n+        pass\n+\n+    def test_empty_stream(self):\n+        """ if empty stream then should return None"""\n+        format = "KCF"\n+        with self.assertRaises(IOError):\n+            gc.convert_glycan(None, format)\n+        with self.assertRaises(IOError):\n+            gc.convert_glycan([], format)\n+        with self.assertRaises(IOError):\n+            gc.convert_glycan("", format)\n+\n+    def test_empty_format(self):\n+        """if empty format then should return the input stream"""\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.types["KCF"]))\n+        m = gc.convert_glycan(kchandle, None)\n+        self.assertEqual(m, (kchandle, None))\n+        m = gc.convert_glycan(kchandle, "")\n+        self.assertEqual(m, (kchandle, None))\n+\n+    def test_type_kcf_kcf(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.types["KCF"]))\n+        m = gc.convert_glycan(kchandle, "KCF")\n+        self.assertIsNotNone(m[0])  # <-- improve by comparing KCF?\n+        self.assertEqual(m[1], "KCF")\n+\n+    def test_type_kcf_lc(self):\n+        import StringIO\n+\n+        expectedoutput = "A??AN;"\n+        kchandle = StringIO.StringIO(\'\'.join(self.types["KCF"]))\n+        m = gc.convert_glycan(kchandle, "LinearCode")\n+        self.assertIsNotNone(m[0])  # <-- improve by comparing KCF?\n+        self.assertEqual(m[0].strip(), expectedoutput)\n+        self.assertEqual(m[1].strip(), "LinearCode")\n+\n+    def test_type_kcf_iupac(self):\n+        import StringIO\n+\n+        expectedoutput = "A??AN;"\n+        kchandle = StringIO.StringIO(\'\'.join(self.types["KCF"]))\n+        with self.assertRaisesRegexp(IOError,"empty response"):\n+            gc.convert_glycan(kchandle, "IUPAC")\n+\n+    def test_type_lc_kcf(self):\n+        import StringIO\n+\n+        expectedoutput = """ENTRY      ((A??)AN)     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+\n+"""  # note additional enter is necessary for matching. should clean this up, but the test is good enough\n+        handle = StringIO.StringIO(\'\'.join(self.types["LINEARCODE"]))\n+        m = gc.convert_glycan(handle, "KCF")\n+        self.assertEqual(str(m[0]), expectedoutput)\n+        self.assertEqual(m[1], "KCF")\n+\n+    def test_type_glyde2_kcf(self):\n+        import StringIO\n+\n+        expectedoutput = """ENTRY                      Glycan\\nNODE  4\\n     1  GlcpNAc   0   0\\n     2  Fucp   -8   -2\\n     3  Galp   -8   2\\n     4  Neup5Ac   -16   2\\nEDGE  3\\n     1  2:a1  1:3\\n     2  3:b1  1:4\\n     3  4:a2  3:3\\n///\\n\\n\\n\\n\\n"""\n+        handle = StringIO.StringIO(\'\'.join(self.types["GLYDE2"]))\n+        m = gc.convert_glycan(handle, "KCF")\n+        self.assertEqual(str(m[0]), expectedoutput)\n+        self.assertEqual(m[1], "KCF")\n+\n+    def test_type_glycoct_kcf(self):\n+        import StringIO\n+\n+        expectedoutput = """ENTRY               Glycan\\nNODE  7\\n      1  man 0 0\\n      2  man -8 1\\n      3  glcnac -16 1\\n      4  gal -24 1\\n      5  man -8 -1\\n      6  glcnac -16 -1\\n      7  gal -24 -1\\nEDGE  6\\n      1  2:1a    1:3\\n      2  3:1b    2:2\\n      3  4:1b    3:4\\n      4  5:1a    1:6\\n      5  6:1b    5:2\\n      6  7:1b    6:4\\n///\\n\\n"""\n+        handle = StringIO.StringIO(\'\'.join(self.types["glycoct"]))\n+        m = gc.convert_glycan(handle, "KCF")\n+        self.assertEqual(str(m[0]), expectedoutput)\n+        self.assertEqual(m[1], "KCF")\n+\n+\n+def run_tests():\n+    unittest.main()\n+\n+\n+if __name__ == \'__main__\':\n+    run_tests()\n+\n+\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_convert_format/test_rings_convert_via_post.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_convert_format/test_rings_convert_via_post.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,289 @@\n+__license__ = "MIT"\n+\n+import unittest\n+import post_glycan_convert as pgc\n+\n+\n+class SimpleUnitTest(unittest.TestCase):\n+    def setUp(self):\n+        import os\n+\n+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:\n+        # dictionary of example glycan formats\n+        self.types = {"KCF": """\n+ENTRY      12345     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+""", "LINEARCODE": """((A??)AN)""", "LinearCode": """GNb2(Ab4GNb4)Ma3(Ab4GNb2(Fa3(Ab4)GNb6)Ma6)Mb4GNb4GN""",\n+\n+                      "LINUCS": """[][D-GLC]{[(6+1)][B-D-GLCP]{[(3+1)][B-D-GLCP]{}[(6+1)][B-D-GLCP]{[(6+1)][B-D-GLCP]{[(3+1)][B-D-GLCP]{}[(6+1)][B-D-GLCP]{}}}}}""",\n+                      "IUPAC": """GlcNAc(b1-2)Man(a1-6)[Gal(b1-4)GlcNAc(b1-2)""", "GLYDE2": """\n+<?xml version="1.0" encoding="UTF-8" ?>\n+<GlydeII>\n+<molecule subtype="glycan" id="From_GlycoCT_Translation">\n+<residue subtype="base_type" partid="1" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=b-dglc-HEX-1:5" />\n+<residue subtype="substituent" partid="2" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=n-acetyl" />\n+<residue subtype="base_type" partid="3" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=a-lgal-HEX-1:5|6:d" />\n+<residue subtype="base_type" partid="4" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=b-dgal-HEX-1:5" />\n+<residue subtype="base_type" partid="5" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=a-dgro-dgal-NON-2:6|1:a|2:keto|3:d" />\n+<residue subtype="substituent" partid="6" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=n-acetyl" />\n+<residue_link from="2" to="1">\n+<atom_link from="N1H" to="C2" to_replace="O2" bond_order="1" />\n+</residue_link>\n+<residue_link from="3" to="1">\n+<atom_link from="C1" to="O3" from_replace="O1" bond_order="1" />\n+</residue_link>\n+<residue_link from="4" to="1">\n+<atom_link from="C1" to="O4" from_replace="O1" bond_order="1" />\n+</residue_link>\n+<residue_link from="5" to="4">\n+<atom_link from="C2" to="O3" from_replace="O2" bond_order="1" />\n+</residue_link>\n+<residue_link from="6" to="5">\n+<atom_link from="N1H" to="C5" to_replace="O5" bond_order="1" />\n+</residue_link>\n+</molecule>\n+</GlydeII>\n+""", "glycoct": """\n+<?xml version="1.0" encoding="UTF-8"?>\n+<sugar version="1.0">\n+  <residues>\n+    <basetype id="1" anomer="x" superclass="hex" ringStart="-1" ringEnd="-1" name="x-dman-HEX-x:x">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="2" anomer="a" superclass="hex" ringStart="1" ringEnd="5" name="a-dman-HEX-1:5">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="3" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dglc-HEX-1:5">\n+      <stemtype id="1" type="dglc" />\n+    </basetype>\n+    <substituent id="4" name="n-acetyl" />\n+    <basetype id="5" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dgal-HEX-1:5">\n+      <stemtype id="1" type="dgal" />\n+   </basetype>\n+    <basetype id="6" anomer="a" superclass="hex" ringStart="1" ringEnd="5" name="a-dman-HEX-1:5">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="7" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dglc-HEX-1:5">\n+      <stemtype id="1" type="dglc" />\n+    </basetype>\n+    <substituent id="8" name="n-acetyl" />\n+    <basetype id="9" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dgal-HEX-1:5">\n+      <stemtype id="1" type="dgal" />\n+    </basetype>\n+  </residues>\n+  <linkages>\n+    <connection id="1" parent="1" child="2">\n+      <linkage id="1" parentType="o" childType="d">\n+        <parent pos="3" />\n+        <child pos="1" />\n+      </linkage>\n+    </connection>\n+    <connection id="2" parent="2" child="3">\n+      <linkage id="2" parentType="o" childType="d">\n+        <parent pos="2" />\n+        <child pos="1" />\n+      </linkage>\n+    </connection>\n+   '..b'with self.assertRaises(IOError):\n+            m = pgc.mechanise_glycan_convert([], format)\n+            # self.assertEqual(m, None)\n+\n+    def test_empty_format(self):\n+        """if empty format then should return the input stream"""\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.types["KCF"]))\n+        m = pgc.mechanise_glycan_convert(kchandle, None)\n+        self.assertEqual(m, kchandle)\n+        m = pgc.mechanise_glycan_convert(kchandle, "")\n+        self.assertEqual(m, kchandle)\n+\n+    def test_type_kcf(self):\n+        import StringIO\n+\n+        for convert_to in self.legal_conversions["KCF"]:\n+            for textformat in ["text"]:  # not testing html or json\n+                kchandle = StringIO.StringIO(\'\'.join(self.types["KCF"]))\n+                kchandle2 = StringIO.StringIO(\'\'.join(self.types["KCF2"]))\n+                if convert_to is "Mol":\n+                    with self.assertRaises(IOError):\n+                        m = pgc.mechanise_glycan_convert(kchandle, convert_to, textformat)\n+                        # self.assertIsNone(m)  # KNOWN ERROR FOR THIS PARTICULAR STRUCTURE\n+                else:\n+                    m = pgc.mechanise_glycan_convert(kchandle, convert_to, textformat)\n+                    self.assertIsNotNone(m)\n+                m2 = pgc.mechanise_glycan_convert(kchandle2, convert_to, textformat)\n+                self.assertIsNotNone(m2)\n+\n+    def test_type_lc(self):\n+        import StringIO\n+\n+        for convert_to in self.legal_conversions["LinearCode"]:\n+            for textformat in ["json"]:  # only test json\n+                kchandle = StringIO.StringIO(\'\'.join(self.types["LINEARCODE"]))\n+                kchandle2 = StringIO.StringIO(\'\'.join(self.types["LinearCode"]))\n+                if convert_to is "Glyde2":\n+                    with self.assertRaises(IOError):\n+                        m = pgc.mechanise_glycan_convert(kchandle, convert_to, textformat)\n+                else:\n+                    m = pgc.mechanise_glycan_convert(kchandle, convert_to, textformat)\n+                    # print textformat, m\n+                    self.assertIsNotNone(m)\n+                    m2 = pgc.mechanise_glycan_convert(kchandle2, convert_to, "json")\n+                    converted = ""\n+                    try:\n+                        converted = pgc.clean_json_response(m2)\n+                    except ValueError:  # occurs for invalid JSON, usually occurs when the remote server causes an\n+                        # exception and there are non escaped or mismatched "...\n+                        pass  # just ignore it for now\n+                    converted_appended = "".join(converted)\n+                    if len(converted) == 0:\n+                        print "There is a probably a remote server error...."\n+                        print m2\n+                    else:\n+                        self.assertNotEqual(converted_appended, "")\n+\n+    def test_known_bug_text_empty_response(self):\n+        #import StringIO\n+        #. this bug was as a result of the 7 space indent bug\n+        pass\n+        #kchandle2 = StringIO.StringIO(\'\'.join(self.types["LinearCode"]))\n+        #with self.assertRaisesRegexp(IOError, "empty response, I recommend using the json format"):\n+        #    pgc.mechanise_glycan_convert(kchandle2, "Kcf", "text")\n+\n+    def test_known_example_error(self):\n+        import StringIO\n+\n+        illegalkcf="""\n+ENTRY         Glycan\n+NODE  5\n+     1  Man   -24   -2\n+     2  Man   -24   2\n+     3  Man   -16   0\n+     4  GlcNAc   -8   0\n+     5  GlcNAca?dol   0   0\n+EDGE  4\n+     1  1:a1  3:3\n+     2  2:a1  3:6\n+     3  3:b1  4:4\n+     4  4:b1  5:4\n+///\n+"""\n+        kchandle2 = StringIO.StringIO(illegalkcf)\n+        #with self.assertRaisesRegexp(IOError, "empty response, I recommend using the json format"):\n+        with self.assertRaises(IOError):\n+            resp=pgc.mechanise_glycan_convert(kchandle2, "Glycoct", "json")\n+            pgc.clean_json_response(resp)\n+\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_detect_format/README_detect.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_detect_format/README_detect.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,36 @@
+
+[TOC]
+
+# 1. glycan_sniff.py
+
+
+**Guesses the glycan file format using the tools from RINGS**
+
+The tool can be used to guess the format and return the result as text. (returns format)
+Given a format, the tool can be used to confirm whether a sequence is in the given format. (returns True/False)
+
+
+## Works with Galaxy?
+Yes. see [glycan_sniff.xml](glycan_sniff.xml)
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python glycan_sniff.py -i $input $format
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python glycan_sniff.py -h
+```
+
+## Unit Testing?
+Yes. Use test_rings_detect_format.py
+
+```
+../../virtualpy/bin/activate
+python test_rings_detect_format.py
+```
+
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_detect_format/glycan_sniff.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_detect_format/glycan_sniff.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,47 @@
+__author__ = "Chris Barnett"
+__version__ = "0.3"
+__license__ = "MIT"
+
+
+def sniff_glycan(inputstream, is_a=None):
+    """
+    Passes input glycan format to RINGS and returns format.
+    If is_a is specified then return boolean
+    :rtype : text, or Boolean if is_a is specified or None if broken (maybe should be False)
+    :param inputstream: inputstream with glycan struct. (not sure for multiple...  in any of LinearCode, KCF etc. (can be mixed))
+    :param is_a: If not None then test for the file type specified.
+    """
+    if inputstream is None or inputstream == [] or inputstream == "":
+        return ""
+    try:
+        from suds.client import Client
+
+        url = 'http://rings.t.soka.ac.jp/axis2/services/Utilities?wsdl'
+        client = Client(url)
+        response = client.service.DeterminingForm(inputstream.read())
+        if response is None:
+            return ""
+        fmt = response.array[0]  # response is an object,just access the attributes
+        if is_a is not None and "" != is_a:
+            if is_a.upper() == fmt.upper():  # compare fmt names and avoid case issues
+                return True
+            else:
+                return False
+        else:
+            return fmt
+    except Exception as e:
+        raise IOError(e)
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input",
+                      help="input any glycan file (input)")
+    parser.add_option("-f", action="store", type="string", dest="f", default=None,
+                      help="return true if is the specified format KCF)")
+    (options, args) = parser.parse_args()
+    instream = file(options.i, 'r')
+    print sniff_glycan(instream, options.f)
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_detect_format/glycan_sniff.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_detect_format/glycan_sniff.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,47 @@
+<tool id="glytools_format_detector" name="GAP detect format"  version="0.3">
+    <description>Detects glycan file format</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[glycan_sniff.py -i $input $format ]]></command>
+    <inputs>
+        <param format="kcf,glycoct,glycoct_xml,linucs,linearcode,iupac,wurcs,glydeii,txt" name="input" type="data" label="glycan source file"/>
+        <param name="format" type="select" label="From">
+          <option value="" selected="true"> no format specified (default)</option>
+          <option value="-f kcf" selected="false"> KCF </option>
+          <option value="-f glycoct" selected="false"> Glycoct </option>
+          <option value="-f glycoct_xml" selected="false"> Glycoct XML</option>
+          <option value="-f linucs" selected="false"> linucs </option>
+          <option value="-f linearcode" selected="false"> LinearCode </option>
+          <option value="-f iupac" selected="false"> IUPAC </option>
+          <option value="-f wurcs" selected="false"> WURCS </option>
+          <option value="-f glydeii" selected="false"> Glydeii </option>
+        </param>
+    </inputs>
+    <outputs>
+        <data format="txt" name="output" label="Format of $input.name"/>
+    </outputs>
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+The tool can be used to guess the format and return the result as text. (returns format)
+Given a format, the tool can be used to confirm whether a sequence is in the given format. (returns True/False)
+
+.. class:: infomark
+
+**Input**
+
+Any glycan.
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_detect_format/test_rings_detect_format.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_detect_format/test_rings_detect_format.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,288 @@\n+__license__ = "MIT"\n+\n+import unittest\n+import glycan_sniff as gs\n+\n+\n+class SimpleUnitTest(unittest.TestCase):\n+    def setUp(self):\n+        import os\n+\n+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:\n+        # dictionary of example glycan formats\n+        self.types = {"KCF": """\n+ENTRY      12345     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+""", "LINEARCODE": """((A??)AN)""", "LinearCode": """GNb2(Ab4GNb4)Ma3(Ab4GNb2(Fa3(Ab4)GNb6)Ma6)Mb4GNb4GN""",\n+                      "LINUCS": """[][D-GLC]{[(6+1)][B-D-GLCP]{[(3+1)][B-D-GLCP]{}[(6+1)][B-D-GLCP]{[(6+1)][B-D-GLCP]{[(3+1)][B-D-GLCP]{}[(6+1)][B-D-GLCP]{}}}}}""",\n+                      "IUPAC": """GlcNAc(b1-2)Man(a1-6)[Gal(b1-4)GlcNAc(b1-2)""", "GLYDE2": """\n+<?xml version="1.0" encoding="UTF-8" ?>\n+<GlydeII>\n+<molecule subtype="glycan" id="From_GlycoCT_Translation">\n+<residue subtype="base_type" partid="1" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=b-dglc-HEX-1:5" />\n+<residue subtype="substituent" partid="2" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=n-acetyl" />\n+<residue subtype="base_type" partid="3" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=a-lgal-HEX-1:5|6:d" />\n+<residue subtype="base_type" partid="4" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=b-dgal-HEX-1:5" />\n+<residue subtype="base_type" partid="5" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=a-dgro-dgal-NON-2:6|1:a|2:keto|3:d" />\n+<residue subtype="substituent" partid="6" ref="http://www.monosaccharideDB.org/GLYDE-II.jsp?G=n-acetyl" />\n+<residue_link from="2" to="1">\n+<atom_link from="N1H" to="C2" to_replace="O2" bond_order="1" />\n+</residue_link>\n+<residue_link from="3" to="1">\n+<atom_link from="C1" to="O3" from_replace="O1" bond_order="1" />\n+</residue_link>\n+<residue_link from="4" to="1">\n+<atom_link from="C1" to="O4" from_replace="O1" bond_order="1" />\n+</residue_link>\n+<residue_link from="5" to="4">\n+<atom_link from="C2" to="O3" from_replace="O2" bond_order="1" />\n+</residue_link>\n+<residue_link from="6" to="5">\n+<atom_link from="N1H" to="C5" to_replace="O5" bond_order="1" />\n+</residue_link>\n+</molecule>\n+</GlydeII>\n+""", "glycoct": """\n+<?xml version="1.0" encoding="UTF-8"?>\n+<sugar version="1.0">\n+  <residues>\n+    <basetype id="1" anomer="x" superclass="hex" ringStart="-1" ringEnd="-1" name="x-dman-HEX-x:x">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="2" anomer="a" superclass="hex" ringStart="1" ringEnd="5" name="a-dman-HEX-1:5">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="3" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dglc-HEX-1:5">\n+      <stemtype id="1" type="dglc" />\n+    </basetype>\n+    <substituent id="4" name="n-acetyl" />\n+    <basetype id="5" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dgal-HEX-1:5">\n+      <stemtype id="1" type="dgal" />\n+   </basetype>\n+    <basetype id="6" anomer="a" superclass="hex" ringStart="1" ringEnd="5" name="a-dman-HEX-1:5">\n+      <stemtype id="1" type="dman" />\n+    </basetype>\n+    <basetype id="7" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dglc-HEX-1:5">\n+      <stemtype id="1" type="dglc" />\n+    </basetype>\n+    <substituent id="8" name="n-acetyl" />\n+    <basetype id="9" anomer="b" superclass="hex" ringStart="1" ringEnd="5" name="b-dgal-HEX-1:5">\n+      <stemtype id="1" type="dgal" />\n+    </basetype>\n+  </residues>\n+  <linkages>\n+    <connection id="1" parent="1" child="2">\n+      <linkage id="1" parentType="o" childType="d">\n+        <parent pos="3" />\n+        <child pos="1" />\n+      </linkage>\n+    </connection>\n+    <connection id="2" parent="2" child="3">\n+      <linkage id="2" parentType="o" childType="d">\n+        <parent pos="2" />\n+        <child pos="1" />\n+      </linkage>\n+    </connection>\n+    <connecti'..b'\n+        <child pos="1" />\n+      </linkage>\n+    </connection>\n+  </linkages>\n+</sugar>\n+"""}\n+\n+        # dictionary of example unknown / not applicable formats\n+        self.unknown_types = {"somejson": """{"numlinkages": 8, "userglycome": "user_glycome21_11_2013-breastcancer", "format": "glycoct_condensed", "notes": "serum from stage I breast cancer patient", "numnodes": 9, "commonname": "", "source": "clinchem", "date": "09:56 21/11/2013", "data": ["RES\\n", "1b:x-dglc-HEX-1:5\\n", "2b:x-dglc-HEX-1:5\\n", "3b:x-dman-HEX-1:5\\n", "4b:x-dman-HEX-1:5\\n", "5b:x-dman-HEX-1:5\\n", "6b:x-dman-HEX-1:5\\n", "7b:x-dman-HEX-1:5\\n", "8s:n-acetyl\\n", "9s:n-acetyl\\n", "LIN\\n", "1:1o(-1+1)2d\\n", "2:2o(-1+1)3d\\n", "3:3o(-1+1)4d\\n", "4:3o(-1+1)5d\\n", "5:5o(-1+1)6d\\n", "6:5o(-1+1)7d\\n", "7:2d(2+1)8n\\n", "8:1d(2+1)9n\\n", "\\n"]}\n+""", "sometext": """\n+        ab1234 fkk\n+""", "somedigraph": """\n+digraph HumanGly {\n+A\n+B\n+C\n+D\n+E\n+F\n+G\n+H\n+I\n+J\n+K\n+A -> B\n+A -> C\n+C -> D\n+D -> E\n+D -> F\n+E -> G\n+E -> H\n+G -> I\n+F -> J\n+J -> K\n+}\n+\n+        """}\n+\n+        pass\n+\n+    def tearDown(self):\n+        pass\n+\n+    def test_empty_stream(self):\n+        m = gs.sniff_glycan(None)\n+        self.assertEqual(m, "")\n+        m = gs.sniff_glycan([])\n+        self.assertEqual(m, "")\n+        m = gs.sniff_glycan("")\n+        self.assertEqual(m, "")\n+\n+    def test_type_unknown(self):\n+        import StringIO\n+        #\n+        for item in self.unknown_types.items():\n+            kchandle = StringIO.StringIO(\'\'.join(item))\n+            self.assertEqual(gs.sniff_glycan(kchandle), "")\n+\n+\n+    def test_type_kcf(self):\n+        import StringIO\n+        #\n+        kcinput = """\n+ENTRY      12345     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+"""\n+        kchandle = StringIO.StringIO(\'\'.join(kcinput))\n+        m = gs.sniff_glycan(kchandle)\n+        self.assertEqual(m, "KCF")\n+\n+    def test_type_known_bug_kcf(self):\n+        import StringIO\n+        #\n+        kcinput = """\n+ENTRY      ((A??)AN)     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+"""\n+        kchandle = StringIO.StringIO(\'\'.join(kcinput))\n+        m = gs.sniff_glycan(kchandle)\n+        self.assertEqual(m, "LinearCode")  # this is a bug in RINGS!\n+\n+\n+    def test_is_a_kcf(self):\n+        import StringIO\n+\n+        kcinput = """\n+ENTRY      12345     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+"""\n+        kchandle = StringIO.StringIO(\'\'.join(kcinput))\n+        self.assertEqual(gs.sniff_glycan(kchandle, is_a="KCF"), True)\n+\n+\n+    def test_type(self):\n+        import StringIO\n+\n+        for keys in self.types.keys():\n+            kchandle = StringIO.StringIO(\'\'.join(self.types[keys]))\n+            self.assertEqual(gs.sniff_glycan(kchandle).upper(), keys.upper())\n+\n+    def test_is_a_(self):\n+        import StringIO\n+\n+        for keys in self.types.keys():\n+            kchandle = StringIO.StringIO(\'\'.join(self.types[keys]))\n+            self.assertEqual(gs.sniff_glycan(kchandle, is_a=keys), True)\n+\n+    def test_type_known_bug_glycoct_condensed_is_not_recognised(self):\n+        import StringIO\n+        #\n+        kcinput = """\n+RES\n+1b:b-dglc-HEX-1:5\n+2s:n-acetyl\n+3b:b-dglc-HEX-1:5\n+4s:n-acetyl\n+5b:b-dman-HEX-1:5\n+6b:a-dman-HEX-1:5\n+7b:b-dglc-HEX-1:5\n+8s:n-acetyl\n+9b:a-dman-HEX-1:5\n+10b:b-dglc-HEX-1:5\n+11s:n-acetyl\n+LIN\n+1:1d(2+1)2n\n+2:1o(4+1)3d\n+3:3d(2+1)4n\n+4:3o(4+1)5d\n+5:5o(3+1)6d\n+6:6o(2+1)7d\n+7:7d(2+1)8n\n+8:5o(6+1)9d\n+9:9o(2+1)10d\n+10:10d(2+1)11n\n+\n+"""\n+        kchandle = StringIO.StringIO(\'\'.join(kcinput))\n+        m = gs.sniff_glycan(kchandle)\n+        self.assertEqual(m, "")  # this is a bug in RINGS!\n+\n+\n+def run_tests():\n+    unittest.main()\n+\n+\n+if __name__ == \'__main__\':\n+    run_tests()\n+\n+\n'
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_kcf_to_image/README_convertKCF.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_kcf_to_image/README_convertKCF.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,30 @@
+
+[TOC]
+
+# 1. post_kcf_to_image.py
+
+**This tool reads a kcf file (containing glycans) and returns images in CFG notation using the server at RINGS. Images are presented in html and the first kcf glycan is returned as a png.**
+
+## Works with Galaxy?
+Yes. see [post_kcf_to_image.xml](post_kcf_to_image.xml)
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python post_kcf_to_image.py $input $pngoutput $htmloutput
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python post_kcf_to_image.py -h
+```
+
+## Unit Testing?
+Yes. Use test_rings_kcf_to_image.py
+
+```
+../../virtualpy/bin/activate
+python test_rings_kcf_to_image.py
+```
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_kcf_to_image/post_kcf_to_image.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_kcf_to_image/post_kcf_to_image.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,68 @@
+__author__ = "Chris Barnett"
+__version__ = "0.3"
+__license__ = "MIT"
+
+
+def post_rings_kcf_to_image(inputstream):
+    """
+
+    posts kcf to the image converter at RINGS
+    'http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/KCFtoIMAGE/KCF_to_IMAGE.pl'
+    :param inputstream: read and then passed to the textarea in web form
+    """
+    import urllib
+
+    if inputstream is None or inputstream == []:
+        return []
+    # URL to post to
+    # changed url to action url found in the form source of the linearcodetokcf page
+    url = 'http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/KCFtoIMAGE/KCF_to_IMAGE.pl'
+    kcfdata = inputstream.read()
+    file = ""
+    # values contains all the names of the items in the form and the appropriate data
+    values = dict(KCF=kcfdata, KCFfile=file, submit='SUBMIT')
+    html = urllib.urlopen(url, urllib.urlencode(values)).readlines()
+    return ''.join(html[13:])
+    # note in this example the images are embedded in the html
+
+
+def get_first_image_from_html(html):
+    from BeautifulSoup import BeautifulSoup
+
+    soup = BeautifulSoup(html)
+    tags = soup.findAll(name='img')  # have to use explicit name= , as source html is damaged *by me..
+    imgsrc = (list(tag['src'] for tag in tags))
+    if len(imgsrc) > 1: # rings logo image and at least one glycan image (thus greater than 1 i.e. 2 or more)
+        _, base64img = imgsrc[1].split(",") # get the first glycan image
+    else:
+        raise IOError("Server did not return an image. Error could be remote or your file.")
+
+    # unfortunately only the first img is saved to png
+    # use pillow or just view the html to see everything
+    # cool example http://stackoverflow.com/questions/10647311/how-to-merge-images-using-python-pil-library
+    return base64img.decode("base64")
+
+
+if __name__ == "__main__":
+    import sys
+
+    try:
+        inputname = sys.argv[1]
+        pngoutputname = sys.argv[2]
+        htmloutputname = sys.argv[3]
+    except Exception as e:
+        raise Exception(e, "Please pass an input, pngoutput and htmloutput filename as arguments")
+    instream = file(inputname, 'r')
+    pngoutstream = file(pngoutputname, "wb")
+    htmloutstream = file(htmloutputname, "w")
+    try:
+        html = post_rings_kcf_to_image(instream)
+        img = get_first_image_from_html(html)
+        htmloutstream.write(html)
+        pngoutstream.write(img)
+    except Exception as e:
+        raise
+    finally:
+        instream.close()
+        pngoutstream.close()
+        htmloutstream.close()
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_kcf_to_image/post_kcf_to_image.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_kcf_to_image/post_kcf_to_image.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,36 @@
+<tool id="glytools_convert_kcf_image" name="GAP KCF to image" version="0.3">
+    <description>Converts a KCF formatted glycan to an image</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[post_kcf_to_image.py $input $pngoutput $htmloutput ]]></command>
+    <inputs>
+        <param format="kcf" name="input" type="data" label="KCF source file" />
+    </inputs>
+    <outputs>
+        <data format="png" name="pngoutput" label="Image of $input.name"/>
+        <data format="html" name="htmloutput" label="Images of $input.name"/>
+    </outputs>
+
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool reads a KCF file and returns images in CFG notation using the server at RINGS. Images are presented in html and the first KCF glycan is returned as a png.
+
+.. class:: infomark
+
+**Input**
+
+Glycan in KCF format
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_kcf_to_image/test_rings_kcf_to_image.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_kcf_to_image/test_rings_kcf_to_image.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,133 @@
+__license__ = "MIT"
+
+import unittest
+import post_kcf_to_image as ki
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_empty_stream(self):
+        m = ki.post_rings_kcf_to_image(None)
+        self.assertEqual(m, [])
+        m = ki.post_rings_kcf_to_image([])
+        self.assertEqual(m, [])
+
+    def test_not_a_kcf(self):
+        import StringIO
+
+        kcinput = """
+GNb2(Ab4GNb4)Ma3(Ab4GNb2(Fa3(Ab4)GNb6)Ma6)Mb4GNb4GN
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = ki.post_rings_kcf_to_image(kchandle)
+        self.assertIn("<html>", h)
+        self.assertIn("<img", h)
+        self.assertIn("KCF to image Results", h)
+        with self.assertRaises(IOError):
+            ki.get_first_image_from_html(h)
+
+    def test_broken_kcf(self):
+        import StringIO
+
+        kcinput = """
+///
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = ki.post_rings_kcf_to_image(kchandle)
+        self.assertIn("<html>", h)
+        self.assertIn("<img", h)
+        self.assertIn("KCF to image Results", h)
+        with self.assertRaises(IOError):
+            ki.get_first_image_from_html(h)
+
+
+    def test_one_kcf(self):
+        import StringIO
+
+        kcinput = """
+ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = ki.post_rings_kcf_to_image(kchandle)
+        self.assertIn("<html>", h)
+        self.assertIn("<img", h)
+        self.assertIn("KCF to image Results", h)
+        i = ki.get_first_image_from_html(h)
+        self.assertIsNotNone(i)
+
+    def test_multi_kcf(self):
+        import StringIO
+
+        kcinput = """
+ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+ENTRY       G00005                      Glycan
+NODE        6
+            1   PP-Dol     15     1
+            2   GlcNAc      8     1
+            3   GlcNAc      0     1
+            4   Man        -9     1
+            5   Man       -16     7
+            6   Man       -16    -6
+EDGE        5
+            1     2:a1    1
+            2     3:b1    2:4
+            3     4:b1    3:4
+            4     5:a1    4:6
+            5     6:a1    4:3
+///
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = ki.post_rings_kcf_to_image(kchandle)
+        self.assertIn("<html>", h)
+        self.assertIn("<img", h)
+        self.assertIn("KCF to image Results", h)
+        i = ki.get_first_image_from_html(h)
+        self.assertIsNotNone(i)
+
+        # now assert that the correct number of  multiple images returned
+        from BeautifulSoup import BeautifulSoup
+        soup = BeautifulSoup(h)
+        tags = soup.findAll(name='img')  # have to use explicit name= , as source html is damaged *by me..
+        imgsrc = (list(tag['src'] for tag in tags))
+        # have sent over 3 kcf files, expect 3 images and the rings logo image
+        self.assertEqual(len(imgsrc),int(4))
+
+def run_tests():
+    unittest.main()
+
+
+if __name__ == '__main__':
+    run_tests()
+
+
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_lc_to_kcf/README_convertlinearcode.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_lc_to_kcf/README_convertlinearcode.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,24 @@
+
+[TOC]
+
+# 1. post_linear_to_kcf.py
+
+**This tool reads a linearcode file and returns KCF output.**
+
+## Works with Galaxy?
+Yes. see [post_linear_to_kcf.xml](post_linear_to_kcf.xml)
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python post_linear_to_kcf.py $input $output
+```
+
+## Unit Testing?
+Yes. Use test_rings_lc_to_kcf.py
+
+```
+../../virtualpy/bin/activate
+python test_rings_lc_to_kcf.py
+```
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_lc_to_kcf/post_linear_to_kcf.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_lc_to_kcf/post_linear_to_kcf.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,48 @@
+__author__ = "Chris Barnett"
+__version__ = "0.3"
+__license__ = "MIT"
+
+
+def post_rings_linear_to_kcf(inputstream, outputformat="text"):
+    """
+    posts linearcode to the linearcode converter at RINGS
+    http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/LinearCodetoKCF/linearcode_to_kcf_index.pl
+    'http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/LinearCodetoKCF/LinearCode_to_KCF.pl'
+    :param inputstream: file object which is read and then passed to the textarea
+    :param outputformat: html or text
+    """
+    import urllib
+
+    if inputstream is None or inputstream == []:
+        return []
+
+    # URL to post to
+    # changed url to action url found in the form source of the linearcodetokcf page
+    url = 'http://rings.t.soka.ac.jp/cgi-bin/tools/utilities/LinearCodetoKCF/LinearCode_to_KCF.pl'
+    lcode = inputstream.read()
+    file = ""
+    values = dict(datasetname='default', LinearCode=lcode, LinearCodefile=file, type=outputformat, submit='SUBMIT')
+    try:
+        html = urllib.urlopen(url, urllib.urlencode(values)).readlines()
+    except Exception as e:
+        raise e
+    return ''.join(html[13:])  # slightly hacky way to ignore the first part of the file
+
+
+if __name__ == "__main__":
+    import sys
+
+    try:
+        inputname = sys.argv[1]
+        outputname = sys.argv[2]
+    except Exception as e:
+        raise Exception(e, "Please pass an input and output filename as arguments")
+    instream = file(inputname, 'r')
+    outstream = file(outputname, "w")
+    try:
+        outstream.write(post_rings_linear_to_kcf(instream))
+    except Exception as e:
+        raise
+    finally:
+        instream.close()
+        outstream.close()
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_lc_to_kcf/post_linear_to_kcf.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_lc_to_kcf/post_linear_to_kcf.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,35 @@
+<tool id="glytools_convert_lc_kcf" name="GAP LinearCode to KCF" version="0.3">
+    <description>Converts a LinearCode formatted glycan to a KCF format</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[post_linear_to_kcf.py $input $output ]]></command>
+    <inputs>
+        <param format="linearcode" name="input" type="data" label="Linear Code source file"/>
+    </inputs>
+    <outputs>
+        <data format="kcf" name="output" label="KCF format of $input.name"/>
+    </outputs>
+
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool reads a LinearCode file and implementing the RINGS server to convert it, returns KCF output.
+
+.. class:: infomark
+
+**Input**
+
+LinearCode
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 convert_detect_formats/rings_lc_to_kcf/test_rings_lc_to_kcf.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convert_detect_formats/rings_lc_to_kcf/test_rings_lc_to_kcf.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,81 @@
+__license__ = "MIT"
+
+import unittest
+import post_linear_to_kcf as lc
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_empty_stream(self):
+        m = lc.post_rings_linear_to_kcf(None)
+        self.assertEqual(m, [])
+        m = lc.post_rings_linear_to_kcf([])
+        self.assertEqual(m, [])
+
+    def test_not_linearcode(self):
+        import StringIO
+
+        nonlcinput = ["# .msa version 002", "2323"]
+        nonlchandle = StringIO.StringIO('\n'.join(nonlcinput))
+        m = lc.post_rings_linear_to_kcf(nonlchandle)
+        self.assertIn("NODE        0", m)
+
+    def test_linearcode_basic(self):
+        import StringIO
+
+        lcinput = ["(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.post_rings_linear_to_kcf(lchandle)
+        self.assertIn("NODE        7", m)
+        self.assertIn("glcnac", m)
+        self.assertIn("man", m)
+
+    def test_linearcode_unknownlinkage(self):
+        import StringIO
+
+        lcinput = ["((A??)AN)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.post_rings_linear_to_kcf(lchandle)
+        self.assertIn("NODE        2", m)
+        self.assertIn("galnac", m)
+        self.assertIn("gal", m)
+        self.assertIn("EDGE        1", m)
+
+    def test_linearcode_unknownposition(self):
+        import StringIO
+
+        lcinput = ["(A??AN,NN)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.post_rings_linear_to_kcf(lchandle)
+        self.assertIn("NODE        2", m)  # as unknown are ignored by this code
+        self.assertIn("galnac", m)
+        self.assertIn("gal", m)
+        self.assertIn("EDGE        1", m)
+
+    def test_linearcode_multiple(self):
+        import StringIO
+
+        lcinput = ["(A??AN,NN)", "(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.post_rings_linear_to_kcf(lchandle)
+        self.assertIn("NODE        7", m)  # as unknown are ignored by this code
+        self.assertIn("NODE        2", m)  # as unknown are ignored by this code
+        self.assertIn("///", m)
+
+
+def run_tests():
+    unittest.main()
+
+
+if __name__ == '__main__':
+    run_tests()
+
+
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/dashboard/README_dash.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/dashboard/README_dash.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,10 @@
+
+[TOC]
+
+# html_js.py
+Attempt at incorporating JavaScript and d3 apps into Galaxy.
+**Not functional**
+
+
+## Works with Galaxy?
+NO.
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/dashboard/html_js.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/dashboard/html_js.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,20739 @@\n+__license__ = "MIT"\n+\n+# test if local js dashboard will work\n+\n+if __name__ == "__main__":\n+    import sys\n+\n+    try:\n+        inone = file(sys.argv[1],"read").readlines()\n+        out = file(sys.argv[2],"w")\n+        output="""\n+<!DOCTYPE html>\n+<html lang="en">\n+<head>\n+    <title>dc.js - Number Display Example</title>\n+    <meta charset="UTF-8">\n+</head>\n+<style>\n+div.dc-chart {\n+    float: left;\n+}\n+\n+.dc-chart rect.bar {\n+    stroke: none;\n+    cursor: pointer;\n+}\n+\n+.dc-chart rect.bar:hover {\n+    fill-opacity: .5;\n+}\n+\n+.dc-chart rect.stack1 {\n+    stroke: none;\n+    fill: red;\n+}\n+\n+.dc-chart rect.stack2 {\n+    stroke: none;\n+    fill: green;\n+}\n+\n+.dc-chart rect.deselected {\n+    stroke: none;\n+    fill: #ccc;\n+}\n+\n+.dc-chart .empty-chart .pie-slice path {\n+    fill: #FFEEEE;\n+    cursor: default;\n+}\n+\n+.dc-chart .empty-chart .pie-slice {\n+    cursor: default;\n+}\n+\n+.dc-chart .pie-slice {\n+    fill: white;\n+    font-size: 12px;\n+    cursor: pointer;\n+}\n+\n+.dc-chart .pie-slice.external{\n+    fill: black;\n+}\n+\n+.dc-chart .pie-slice :hover {\n+    fill-opacity: .8;\n+}\n+\n+.dc-chart .pie-slice.highlight {\n+    fill-opacity: .8;\n+}\n+\n+.dc-chart .selected path {\n+    stroke-width: 3;\n+    stroke: #ccc;\n+    fill-opacity: 1;\n+}\n+\n+.dc-chart .deselected path {\n+    stroke: none;\n+    fill-opacity: .5;\n+    fill: #ccc;\n+}\n+\n+.dc-chart .axis path, .axis line {\n+    fill: none;\n+    stroke: #000;\n+    shape-rendering: crispEdges;\n+}\n+\n+.dc-chart .axis text {\n+    font: 10px sans-serif;\n+}\n+\n+.dc-chart .grid-line {\n+    fill: none;\n+    stroke: #ccc;\n+    opacity: .5;\n+    shape-rendering: crispEdges;\n+}\n+\n+.dc-chart .grid-line line {\n+    fill: none;\n+    stroke: #ccc;\n+    opacity: .5;\n+    shape-rendering: crispEdges;\n+}\n+\n+.dc-chart .brush rect.background {\n+    z-index: -999;\n+}\n+\n+.dc-chart .brush rect.extent {\n+    fill: steelblue;\n+    fill-opacity: .125;\n+}\n+\n+.dc-chart .brush .resize path {\n+    fill: #eee;\n+    stroke: #666;\n+}\n+\n+.dc-chart path.line {\n+    fill: none;\n+    stroke-width: 1.5px;\n+}\n+\n+.dc-chart circle.dot {\n+    stroke: none;\n+}\n+\n+.dc-chart g.dc-tooltip path {\n+    fill: none;\n+    stroke: grey;\n+    stroke-opacity: .8;\n+}\n+\n+.dc-chart path.area {\n+    fill-opacity: .3;\n+    stroke: none;\n+}\n+\n+.dc-chart .node {\n+    font-size: 0.7em;\n+    cursor: pointer;\n+}\n+\n+.dc-chart .node :hover {\n+    fill-opacity: .8;\n+}\n+\n+.dc-chart .selected circle {\n+    stroke-width: 3;\n+    stroke: #ccc;\n+    fill-opacity: 1;\n+}\n+\n+.dc-chart .deselected circle {\n+    stroke: none;\n+    fill-opacity: .5;\n+    fill: #ccc;\n+}\n+\n+.dc-chart .bubble {\n+    stroke: none;\n+    fill-opacity: 0.6;\n+}\n+\n+.dc-data-count {\n+    float: right;\n+    margin-top: 15px;\n+    margin-right: 15px;\n+}\n+\n+.dc-data-count .filter-count {\n+    color: #3182bd;\n+    font-weight: bold;\n+}\n+\n+.dc-data-count .total-count {\n+    color: #3182bd;\n+    font-weight: bold;\n+}\n+\n+.dc-data-table {\n+}\n+\n+.dc-chart g.state {\n+    cursor: pointer;\n+}\n+\n+.dc-chart g.state :hover {\n+    fill-opacity: .8;\n+}\n+\n+.dc-chart g.state path {\n+    stroke: white;\n+}\n+\n+.dc-chart g.selected path {\n+}\n+\n+.dc-chart g.deselected path {\n+    fill: grey;\n+}\n+\n+.dc-chart g.selected text {\n+}\n+\n+.dc-chart g.deselected text {\n+    display: none;\n+}\n+\n+.dc-chart g.county path {\n+    stroke: white;\n+    fill: none;\n+}\n+\n+.dc-chart g.debug rect {\n+    fill: blue;\n+    fill-opacity: .2;\n+}\n+\n+.dc-chart g.row rect {\n+    fill-opacity: 0.8;\n+    cursor: pointer;\n+}\n+\n+.dc-chart g.row rect:hover {\n+    fill-opacity: 0.6;\n+}\n+\n+.dc-chart g.row text {\n+    fill: white;\n+    font-size: 12px;\n+    cursor: pointer;\n+}\n+\n+.dc-legend {\n+    font-size: 11px;\n+}\n+\n+.dc-legend-item {\n+    cursor: pointer;\n+}\n+\n+.dc-chart g.axis text {\n+    /* Makes it so the user can\'t accidentally click and select text that is meant as a label only */\n+    -webkit-user-select: none; /* Chrome/Safari */\n+    -moz-user-select: none; /* Firefox */\n+    -ms-user-select: none; /* IE10 */\n+    -o-user'..b'+            "ringorder": [\n+                "C3", \n+                "C4", \n+                "C5", \n+                "O5", \n+                "C1", \n+                "C2"\n+            ]\n+        }, \n+        {\n+            "contextconformer": "C2|H|C3", \n+            "resname": "GLC", \n+            "resid": 693, \n+            "chain": "A", \n+            "pdbid": "1CXF.pdb", \n+            "ringsize": 6, \n+            "origconformer": "4C1", \n+            "puckercoords": [\n+                "-23.21", \n+                "-27.35", \n+                "-45.33"\n+            ], \n+            "conformer": "2H3", \n+            "ringorder": [\n+                "C3", \n+                "C4", \n+                "C5", \n+                "O5", \n+                "C1", \n+                "C2"\n+            ]\n+        }, \n+        {\n+            "contextconformer": "C4|H|C5", \n+            "resname": "GLC", \n+            "resid": 694, \n+            "chain": "A", \n+            "pdbid": "1CXF.pdb", \n+            "ringsize": 6, \n+            "origconformer": "4C1", \n+            "puckercoords": [\n+                "-35.13", \n+                "-19.34", \n+                "-33.50"\n+            ], \n+            "conformer": "4H5", \n+            "ringorder": [\n+                "C3", \n+                "C4", \n+                "C5", \n+                "O5", \n+                "C1", \n+                "C2"\n+            ]\n+        }, \n+        {\n+            "contextconformer": "C4|C|C1", \n+            "resname": "GLC", \n+            "resid": 695, \n+            "chain": "A", \n+            "pdbid": "1CXF.pdb", \n+            "ringsize": 6, \n+            "origconformer": "4C1", \n+            "puckercoords": [\n+                "-35.92", \n+                "-25.59", \n+                "-39.09"\n+            ], \n+            "conformer": "4C1", \n+            "ringorder": [\n+                "C3", \n+                "C4", \n+                "C5", \n+                "O5", \n+                "C1", \n+                "C2"\n+            ]\n+        }\n+]\n+\n+console.log(\'data :\' + data);\n+//  data.forEach(function(d) {\n+//    d.pdbid     =  d.pdbid;\n+//    d.resname  = d.resname;\n+//    d.conformer  =  d.conformer;\n+//    \n+//  });\n+    //### Create Crossfilter Dimensions and Groups\n+    //See the [crossfilter API](https://github.com/square/crossfilter/wiki/API-Reference) for reference.\n+    var ndx = crossfilter(data);\n+    //var all = ndx.groupAll();\n+\n+\n+    // dimension by ring\n+    var ringDim = ndx.dimension(function (d) {\n+        return d.ringsize;\n+    });\n+    // dimension by pdb\n+    var pdbDim = ndx.dimension(function (d) {\n+        return d.pdbid;\n+    });\n+\n+\n+//    countperPDB = pdbDim.group().reduceSum(function(d) {return +d.Spent;}),\n+//    countperRes = resnameDim.group().reduceSum(function(d) {return +d.Spent;}),\n+//    countperPDB = pdbDim.group().reduceSum(function(d) {return d.ringsize;}),\n+//    countperRes = resnameDim.group().reduceSum(function(d) {return d.ringsize;});\n+    countperRing    = ringDim.group().reduceCount(),\n+    countperPDB    = pdbDim.group().reduceCount(),\n+    //countperPDB = pdbDim.group().reduceSum(function(d) {return d.ringsize;});\n+\n+    //### Define Chart Attributes\n+    //Define chart attributes using fluent methods. See the\n+    // [dc API Reference](https://github.com/dc-js/dc.js/blob/master/web/docs/api-latest.md) for more information\n+    //\n+\n+ringCountChart\n+    .width(350).height(200)\n+    .dimension(ringDim)\n+    .group(countperRing)\n+    .x(d3.scale.linear().domain([0,10]))\n+    .elasticY(true);\n+ringCountChart.xAxis().tickFormat(function(d) {return d}); // convert back to base unit\n+ringCountChart.yAxis().ticks(2);\n+\n+\n+pdbCountChart\n+    .width(350).height(200)\n+    .dimension(pdbDim)\n+    .group(countperPDB)\n+    .elasticX(true);\n+\n+\n+\n+\n+dc.renderAll();\n+//}); // END d3 json data load\n+\n+</script>\n+\n+</body>\n+</html>\n+"""\n+        out.write(output)\n+\n+    except Exception as e:\n+        raise e\n+    finally:\n+        out.close()\n+\n'
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/dashboard/html_js.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/dashboard/html_js.xml Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,16 @@
+<tool id="glytools_dashboard" name="GAP dashboard" version="0.1">
+    <description>for analytics</description>
+    <command interpreter="python">html_js.py $input1 $output</command>
+    <inputs>
+        <param format="html" name="input1" type="data" />
+    </inputs>
+    <outputs>
+        <data format="html" name="output"/>
+    </outputs>
+
+
+    <help>
+         Testing javascript inside galaxy with the intention to read glycomes and provide analytics
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/.README.md.swp
b
Binary file extract_display_features/draw_fingerprinter_dendrogram/.README.md.swp has changed
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/README_drawgram.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/draw_fingerprinter_dendrogram/README_drawgram.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,65 @@
+
+[TOC]
+
+# draw_gram.py
+This tool creates a clade-o-gram. It reads trees in newick-like format, converts to newick and then plots with ETE2.
+
+## Works with Galaxy?
+Yes, but has requirements that cannot be installed in a virtual env.
+See [draw_gram.xml](draw_gram.xml)
+
+## Requirements
+
+This tool requires ete2 and ete2 requires PyQt4. PyQt4 is not installable via pip or easy_install at present.
+Without PyQt4, ete2.TreeStyle does not load and images cannot be produced.
+
+### Workaround for PyQt4
+
+#### For RHEL6.5, using python2.7 via puias repo
+
+Install PyQt4 and PyQt4-devel using your distributions install tool.
+
+```
+yum install PyQt427-devel.x86_64 PyQt427.x86_64
+```
+
+this will also install sip.
+
+Confirm that your systemwide python can import PyQt4 (if not confirm your install)
+
+Then copy these from the system libraries to your virtualenv
+
+```
+cp -r  /usr/lib64/python2.7/site-packages/sip* virtualpy2.7/lib64/python2.7/site-packages
+cp -r  /usr/lib64/python2.7/site-packages/PyQt4 virtualpy2.7/lib64/python2.7/site-packages
+```
+
+You should be able to import PyQt4 and TreeStyle with no errors
+
+```
+virtualpy2.7/bin/python
+import PyQt4
+from ete2 import TreeStyle
+```
+
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python draw_gram.py -i $input -o ${pngoutput}.$imagetype
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python draw_gram.py -h
+```
+
+## Unit Testing?
+Yes. Use test_draw_gram.py
+
+```
+../../virtualpy/bin/activate
+python test_draw_gram.py
+```
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/draw_gram.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/draw_fingerprinter_dendrogram/draw_gram.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,148 @@
+__author__ = "Chris Barnett"
+__version__ = "0.2"
+__license__ = "MIT"
+
+def rec_sub(string, count, multichar, char):
+    """
+    recursive substition
+    :param string: original string to be parsed for chars to replace
+    :param count: times to recurse
+    :param multichar: original char
+    :param char: replacement char
+    :return: modified string
+    """
+    import re
+
+    if count == 0:
+        return string
+    repstr = ""  # replacement string pattern
+    for i in range(0, count):
+        repstr = repstr + char
+    repstr = char + repstr + char
+    matchstr = "\\" + char + "("
+    for i in range(0, count):
+        matchstr = matchstr + "\\" + multichar
+    matchstr = matchstr + ")\\" + char
+    newstring = re.sub(matchstr, repstr, string)
+    newstring = rec_sub(newstring, count - 1, multichar, char)
+    return newstring
+
+
+def parse_finger_to_newick(input):
+    """
+    change fingerprint linear tree format to newick format. handrolled may break.
+    :param input: "|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||
+    :return: newick string
+    """
+    import re
+
+    if input is None or input == [] or input == "":
+        raise IOError("empty html stream")
+    # make sure no leading or trailing spaces:
+    input = input.lstrip().rstrip()
+
+    # . the first | is ( and the last | is )
+    if input[0] == "|" and input[-1] == "|":
+        mod0 = "(" + input[1:-1] + ")"
+    else:
+        raise TypeError("input does not start and end with | as expected")
+
+    # check if have an even number of brackets. Else return an error
+    if input.count('|') % 2 != 0:
+        raise TypeError("Invalid input. uneven number of brackets.")
+
+    # . replace |,| with ),(
+    mod1 = re.sub("\|_\|", "),(", mod0)
+
+    # . replace text| with text)
+    mod2 = re.sub("([a-zA-Z0-9])\|", "\\1)", mod1)
+
+    # . replace |text with (text
+    mod3 = re.sub("\|([a-zA-Z0-9])", "(\\1", mod2)
+
+    # . replace )|) with ))) and )|||)  to )))))
+    # .  finding max sequential |||| and then create matches based on this
+    maxsequence = len(max(input.split('_'), key=len))
+    mod4 = rec_sub(mod3, maxsequence, "|", "(")
+    mod5 = rec_sub(mod4, maxsequence, "|", ")")
+    mod5a = re.sub("\|_", ")_", mod5)
+
+    # . now remove any left over _
+    mod6 = re.sub("_", ",", mod5a)
+
+    # .! nope can never do this it is illegal!!
+    # <illegal code>
+    # #. count leftover | and replace the first half with (
+    # print mod6, mod6.count('|')/2
+    # mod7= re.sub("\|","(",mod6,count=mod6.count('|')/2)
+    # print mod7
+    # #. count leftover | and replace the first half with )
+    # mod8= re.sub("\|",")",mod7,count=mod6.count('|')/2)
+    # print mod8
+    # </illegal code>
+
+    # . should be no leftover | .
+    if '|' in mod6:
+        print "leftover |'s in ", mod6
+        raise BaseException
+    return mod6
+
+
+def render_tree(tree, outputname, show_leaves=True, mode="c", arc_start=-180, arc_span=180, width=1000, dpi=600):
+    try:
+        from ete2 import TreeStyle
+    except ImportError:
+        raise ImportError("ete2 TreeStyle module not loaded properly, check dependencies especially PyQt4")
+
+    if ".png" not in outputname:
+        if ".svg" not in outputname:
+            raise TypeError(outputname + "Invalid input. Must be  *.png or *.svg")
+
+    ts = TreeStyle()
+    ts.show_leaf_name = show_leaves
+    ts.mode = mode
+    ts.arc_start = arc_start  # 0 degrees = 3 o'clock
+    ts.arc_span = arc_span
+    tree.render(outputname, w=width, tree_style=ts, dpi=dpi)
+
+
+if __name__ == "__main__":
+    try:
+        from ete2 import Tree
+    except ImportError:
+        raise ImportError("ete2 Tree module not loaded properly, check dependencies")
+    try:
+        from ete2 import TreeStyle
+    except ImportError:
+        raise ImportError("ete2 TreeStyle module not loaded properly, check dependencies especially PyQt4")
+    import os, sys
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input",
+                      help="input file in linear dendrogram format")
+    parser.add_option("-o", action="store", type="string", dest="o", default="output.png",
+                      help="output png or svg file. suffix determines format  (output.png)")
+
+    (options, args) = parser.parse_args()
+
+    try:
+        inputname = options.i
+        outputname = options.o
+    except Exception as e:
+        raise Exception(e, "Please pass an input (kcf), output filename as arguments")
+    instream = file(inputname, 'r')
+
+    try:
+        t = Tree(parse_finger_to_newick(instream.readline()) + ";")
+    except Exception as e:
+        raise e
+
+    render_tree(t, outputname)
+
+    # if called from Galaxy I get a filename like file.dat.png or file.dat.svg
+    # but galaxy thinks it is called filename.dat so must rename
+    if "dat" in outputname:
+        spli = outputname.split('.')
+        os.system("mv " + outputname + " " + ".".join([spli[0], spli[1]]))
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/draw_gram.pyc
b
Binary file extract_display_features/draw_fingerprinter_dendrogram/draw_gram.pyc has changed
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/draw_gram.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/draw_fingerprinter_dendrogram/draw_gram.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,66 @@
+<tool id="glytools_draw_gram" name="GAP Draw Dendrogram" version="0.2">
+    <description> from trees in newick-like format </description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+   <!-- https://wiki.galaxyproject.org/Future/Job%20Failure%20When%20stderr -->
+<stdio>
+    <regex match="MySQLdb module could not be loaded" 
+           source="both" 
+           level="warning" 
+           description="Modules not loaded" />
+    <regex match="No module named MySQLdb" 
+           source="both" 
+           level="warning" 
+           description="Modules not loaded" />
+    <regex match="error"
+           source="stdout"
+           level="fatal"
+           description="Unknown error encountered" />
+</stdio>
+    <command interpreter="python"><![CDATA[draw_gram.py -i $input -o ${pngoutput}.$imagetype ]]></command>
+    <inputs>
+        <param format="txt" name="input" type="data" label="newick-like text source"/>
+
+        <param name="imagetype" type="select" label="PNG or SVG image output">
+          <option value="png" selected="true"> request a png image</option>
+          <option value="svg" selected="false"> request a svg image (galaxy does not support svg fully)</option>
+        </param>
+
+    </inputs>
+    <outputs>
+        <data format="png" name="pngoutput" label="Dendrogram $input.name "/>
+    </outputs>
+
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+This tool need PyQt4 installed or it will fail (this is a manual install by your Galaxy Admin)
+
+.. class:: infomark
+
+**What this tool does**
+
+This tool creates a clade-o-gram. It reads trees in newick-like format, converts to newick and then plots with ETE2.
+
+.. class:: infomark
+
+**Input**
+
+Newick style text 
+
+.. class:: infomark
+
+**Output**
+
+PNG or SVG image
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/output.png
b
Binary file extract_display_features/draw_fingerprinter_dendrogram/output.png has changed
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/output.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/draw_fingerprinter_dendrogram/output.svg Wed Mar 23 14:35:56 2016 -0400
b
b'@@ -0,0 +1,1 @@\n+<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="352.778mm" height="451.556mm"  viewBox="0 0 1000 1280.82"  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  version="1.2" baseProfile="tiny"> <title>Generated with ETE http://etetoolkit.org</title> <desc>Generated with ETE http://etetoolkit.org</desc> <defs> </defs> <g fill="none" stroke="black" stroke-width="1" fill-rule="evenodd" stroke-linecap="square" stroke-linejoin="bevel" >      <g fill="none" stroke="none" transform="matrix(5.61645,0,0,5.61645,0,0)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M0,0 L178.048,0 L178.048,228.048 L0,228.048 L0,0"/> </g>      <g fill="none" stroke="none" transform="matrix(5.61645,0,0,5.61645,500,500)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M-88.0241,-88.0241 L88.0241,-88.0241 L88.0241,88.0241 L-88.0241,88.0241 L-88.0241,-88.0241"/> </g>                                                              <g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(0,-5.61645,5.61645,0,491.575,465.75)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/> </g>                  <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(5.61645,0,0,5.61645,500,500)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M6.52016,-6.52016 C4.8515,-8.18881 2.54628,-9.2209 0,-9.2209 C-2.54628,-9.2209 -4.8515,-8.18881 -6.52016,-6.52016 "/> </g>            <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(-3.97143,-3.97143,3.97143,-3.97143,457.423,469.337)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <polyline fill="none" vector-effect="non-scaling-stroke" points="0,1.5 8.13076,1.5 " /> </g>      <g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(-3.97143,-3.97143,3.97143,-3.97143,425.132,437.046)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/> </g>                  <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(5.61645,0,0,5.61645,500,500)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M-5.2916,-19.7141 C-12.3108,-17.8347 -17.8379,-12.3064 -19.7155,-5.2864 "/> </g>            <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(-5.42508,-1.45365,1.45365,-5.42508,387.111,478.473)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <polyline fill="none" vector-effect="non-scaling-stroke" points="0,1.5 8.13076,1.5 " /> </g>      <g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(-5.42508,-1.45365,1.45365,-5.42508,343.001,466.654)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="n'..b'80823,-4.86399,4.86399,2.80823,520.827,379.679)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <polyline fill="none" vector-effect="non-scaling-stroke" points="0,7.5 8.13076,7.5 " /> </g>      <g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(2.80823,-4.86399,4.86399,2.80823,572.844,356.981)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/> </g>          <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(2.80823,-4.86399,4.86399,2.80823,552.085,325.54)" font-family="Arial" font-size="10pt" font-weight="400" font-style="normal"  > <text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="12" font-family="Arial" font-size="10pt" font-weight="400" font-style="normal"   >G00017</text> </g>                    <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="butt" stroke-linejoin="bevel" transform="matrix(4.86399,-2.80823,2.80823,4.86399,578.197,406.213)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <polyline fill="none" vector-effect="non-scaling-stroke" points="0,7.5 8.13076,7.5 " /> </g>      <g fill="#0030c1" fill-opacity="1" stroke="#0030c1" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(4.86399,-2.80823,2.80823,4.86399,634.594,412.564)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <path vector-effect="non-scaling-stroke" fill-rule="evenodd" d="M3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 C2.32843,0 3,0.671573 3,1.5 "/> </g>          <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(4.86399,-2.80823,2.80823,4.86399,632.337,374.955)" font-family="Arial" font-size="10pt" font-weight="400" font-style="normal"  > <text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="12" font-family="Arial" font-size="10pt" font-weight="400" font-style="normal"   >G00018</text> </g>                                                          <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(5.61645,0,0,5.61645,5.61645,1000)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <polyline fill="none" vector-effect="none" points="0,5 50,5 " /> </g>      <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(5.61645,0,0,5.61645,5.61645,1000)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <polyline fill="none" vector-effect="none" points="0,0 0,10 " /> </g>      <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(5.61645,0,0,5.61645,5.61645,1000)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <polyline fill="none" vector-effect="none" points="50,0 50,10 " /> </g>      <g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(5.61645,0,0,5.61645,5.61645,1056.16)" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"  > <text fill="#000000" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="16" font-family="Cantarell" font-size="11pt" font-weight="400" font-style="normal"   >6.15</text> </g>     </g> </svg> \n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/output2.png
b
Binary file extract_display_features/draw_fingerprinter_dendrogram/output2.png has changed
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/output3.png
b
Binary file extract_display_features/draw_fingerprinter_dendrogram/output3.png has changed
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/draw_fingerprinter_dendrogram/test_draw_gram.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/draw_fingerprinter_dendrogram/test_draw_gram.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,93 @@
+__license__ = "MIT"
+
+import unittest
+import draw_gram as dg
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_empty_stream(self):
+        with self.assertRaises(IOError):
+            dg.parse_finger_to_newick(None)
+        with self.assertRaises(IOError):
+            dg.parse_finger_to_newick([])
+        with self.assertRaises(IOError):
+            dg.parse_finger_to_newick("")
+
+    def test_basic_input(self):
+        input_from_fingerprinter = "|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||"
+        output = dg.parse_finger_to_newick(input_from_fingerprinter)
+        self.assertEqual(output, "(((G00015,G00016),(G00019,G00020)),(G00017,G00018))")
+
+    def test_incorrect_input(self):
+        input_from_fingerprinter = "A|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||"
+        with self.assertRaises(TypeError):
+            dg.parse_finger_to_newick(input_from_fingerprinter)
+        input_from_fingerprinter = "|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||B"
+        with self.assertRaises(TypeError):
+            dg.parse_finger_to_newick(input_from_fingerprinter)
+        input_from_fingerprinter = "A|B"
+        with self.assertRaises(TypeError):
+            dg.parse_finger_to_newick(input_from_fingerprinter)
+
+    def test_uneven_brackets(self):
+        input_from_fingerprinter = "||G00015_G00016|_|G00019_G00020||_|G00017_G00018||"
+        with self.assertRaisesRegexp(TypeError, "uneven"):
+            dg.parse_finger_to_newick(input_from_fingerprinter)
+
+    def test_render_tree(self):
+        from ete2 import Tree
+        import os
+
+        try:
+            os.remove("output.png")
+            os.remove("output.svg")
+        except:
+            pass
+        input_from_fingerprinter = "|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||"
+        tree = Tree(dg.parse_finger_to_newick(input_from_fingerprinter) + ";")
+        dg.render_tree(tree, "output.png")
+        assert os.path.isfile("output.png")
+        dg.render_tree(tree, "output.svg")
+        assert os.path.isfile("output.svg")
+
+    def test_render_tree_bad_filename(self):
+        from ete2 import Tree
+        import os
+
+        input_from_fingerprinter = "|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||"
+        tree = Tree(dg.parse_finger_to_newick(input_from_fingerprinter) + ";")
+        with self.assertRaisesRegexp(TypeError,"Invalid input"):
+            dg.render_tree(tree, "output.dat")
+
+    def test_render_tree_mod(self):
+        from ete2 import Tree
+        import os
+
+        try:
+            os.remove("output2.png")
+            os.remove("output3.png")
+        except:
+            pass
+        input_from_fingerprinter = "|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||"
+        tree = Tree(dg.parse_finger_to_newick(input_from_fingerprinter) + ";")
+        dg.render_tree(tree, "output2.png", show_leaves=True, mode="c", arc_start=0, arc_span=180, width=300, dpi=300)
+        dg.render_tree(tree, "output3.png", show_leaves=True, mode="r", arc_start=0, arc_span=180, width=1100, dpi=300)
+        assert os.path.isfile("output2.png")
+        assert os.path.isfile("output3.png")
+
+
+def run_tests():
+    unittest.main()
+
+
+if __name__ == '__main__':
+    run_tests()
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_fingerprinter/README_fingerprinter.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_fingerprinter/README_fingerprinter.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,29 @@
+
+[TOC]
+
+# post_fingerprinter.py
+This tool reads kcf glycans and uses the RINGS fingerprint to provide a linear binary based fingerprint based on the motifs found in the glycan.
+
+## Works with Galaxy?
+Yes. see [post_fingerprinter.xml](post_fingerprinter.xml)
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python post_fingerprinter.py -i $input -o $output -d $dendrogram -f $format -g $glycanfragmentsize -s $fingerprintsize -n $folds -c $tanimoto -u $showunit -r $showgroup -m $showsimmatrix -l $showdissimmatrix -e $showmode
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python post_fingerprinter.py -h
+```
+
+## Unit Testing?
+Yes. Use test_post_fingerprinter.py
+
+```
+../../virtualpy/bin/activate
+python test_post_fingerprinter.py
+```
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_fingerprinter/post_fingerprinter.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_fingerprinter/post_fingerprinter.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,137 @@
+__author__ = "Chris Barnett"
+__version__ = "0.2"
+__license__ = "MIT"
+
+
+def post_rings_fingerprinter(instream, kcf_or_fingerprint=0, glycan_fragment_size=10000, fingerprint_size=1024,
+                             number_of_folds=0, calc_tanimoto_or_modifiedt=1, show_unitfingerprint=0,
+                             show_groupfingerprint=0, groupfingerprintname="fingerprint", show_similarity_matrix=1,
+                             show_dissimilarity_matrix=0, show_mode=0):
+    """
+    :param instream: instream (kcf or fingerprint) to be placed in the form text area
+ * input data format : <input type="radio" name="format" id="form1" value="0" checked><label for="form1">KCF</label>
+ <input type="radio" name="format" id="form2" value="1"><label for="form2">Glycan Fingerprint</label>
+ <br><p>
+ * glycan fragment size : <input type="text" name="frag" size="5" value = "10000"> <br>
+        * fingerprint size : <input type="text" name ="size" size="15" value = "1024"> <br>
+        * number of folds : <input type="text" name ="folds" size="5" value ="0"> <br>
+ * calc type : <input type="radio" name ="calc" id ="c1" value="1" checked><label for="c1">Tanimoto</label>
+      <input type="radio" name ="calc" id ="c2" value="2"><label for="c2">Modified tanimoto</label>
+        show unit fingerprint : <input type="radio" name ="fprint" id ="f1" value="1"><label for="f1">On</label>
+                                <input type="radio" name ="fprint" id ="f2" value="0" checked><label for="f2">Off</label>
+ show group fingerprint : <input type="radio" name ="sprint" id ="s1" value="1"><label for="s1">On</label>
+                                 <input type="radio" name ="sprint" id ="s2" value="0" checked><label for="s2">Off</label>
+       groupe fingerprint name : <input type="text" name="gf_name" size="20" value="fingerprint"><br>
+ show similarity matrix : <input type="radio" name ="sim_mat" id ="sm1" value="1" checked><label for="sm1">On</label>
+                                 <input type="radio" name ="sim_mat" id ="sm2" value="0"><label for="sm2">Off</label>
+ show dissimilarity matrix : <input type="radio" name ="dis_mat" id ="dm1" value="1"><label for="dm1">On</label>
+                             <input type="radio" name ="dis_mat" id ="dm2" value="0" checked><label for="dm2">Off</label>
+ groupe fingerprint mode : <input type="radio" name ="show_mode" id ="s_mode1" value="1"><label for="s_mode1">On</label>
+   <input type="radio" name ="show_mode" id ="s_mode2" value="0" checked><label for="s_mode2">Off</label>
+    """
+    import urllib2, urllib
+
+    if instream is None or instream == [] or instream == "":
+        raise IOError("empty input stream")
+
+    # URL user would navigate to rings.t.soka.ac.jp/cgi-bin/tools/Fingerprint2/Fingerprint_index.pl
+    # URL to post to
+    url = 'http://rings.t.soka.ac.jp/cgi-bin/tools/Fingerprint2/run_fingerprint1-2.pl'
+    kcfdata = instream.read()
+    file = ""
+    # values contains all the names of the items in the form and the appropriate data
+    values = {'datasetname': 'default', 'KCF': kcfdata, 'KCFFILE': file, 'format': kcf_or_fingerprint,
+              'frag': glycan_fragment_size, 'size': fingerprint_size, 'folds': number_of_folds,
+              'calc': calc_tanimoto_or_modifiedt, 'fprint': show_unitfingerprint, 'sprint': show_groupfingerprint,
+              'gf_name': groupfingerprintname, 'sim_mat': show_similarity_matrix, 'dis_mat': show_dissimilarity_matrix,
+              'show_mode': show_mode, 'submit': 'SUBMIT'}
+
+    html = urllib2.urlopen(url, urllib.urlencode(values)).readlines()
+
+    if html is None or str(html).strip() == "":
+        return None
+    for line in list(html):  # hack to remove unable to open file message
+        if "<title" in line or "</title" in line:
+            html.remove(line)
+        elif "<h1" in line or "</h1" in line:
+            html.remove(line)
+        elif "Content-type: text/html" in line:
+            html.remove(line)
+        elif "Error" in line:
+            html.remove(line)
+    return ''.join(html[:])
+
+
+def extract_dendro_from_fingerprinter_output(html):
+    """
+
+    :param html: output from fingerprinter
+    :return: dendrogram string
+    """
+    if html is None or html == [] or html == "":
+        raise IOError("empty html stream")
+    clusterinfo = ""  # preassigned just in case
+    for line in html.split('\n'):
+        if "Last Cluster" in line:
+            clusterinfo = (line.strip()).split(":")[1].lstrip()
+    return clusterinfo
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input.kcf",
+                      help="input kcf file or fingerprint (input)")
+    parser.add_option("-o", action="store", type="string", dest="o", default="output.html",
+                      help="output html file (output)")
+    parser.add_option("-d", action="store", type="string", dest="d", default="output.dendrogram",
+                      help="dendrogram text output")
+    parser.add_option("-f", action="store", type="int", dest="f", default=0,
+                      help="kcf (0) or fingerprint (1) format ")
+    parser.add_option("-g", action="store", type="int", dest="g", default=10000,
+                      help="glycan fragment size ")
+    parser.add_option("-s", action="store", type="int", dest="s", default=1024,
+                      help="fingerprint size ")
+    parser.add_option("-n", action="store", type="int", dest="n", default=0,
+                      help="number of folds")
+    parser.add_option("-c", action="store", type="int", dest="c", default=1,
+                      help="calc type - Tanimoto (1) or Modified Tanimoto (2)")
+    parser.add_option("-u", action="store", type="int", dest="u", default=0,
+                      help="show unit fingerprint")
+    parser.add_option("-r", action="store", type="int", dest="r", default=0,
+                      help="show group fingerprint")
+    parser.add_option("-a", action="store", type="string", dest="a", default="fingerprint",
+                      help="group fingerprint name")
+    parser.add_option("-m", action="store", type="int", dest="m", default=1,
+                      help="show similarity matrix")
+    parser.add_option("-l", action="store", type="int", dest="l", default=0,
+                      help="show dissimilarity matrix")
+    parser.add_option("-e", action="store", type="int", dest="e", default=0,
+                      help="show mode")
+
+    (options, args) = parser.parse_args()
+    try:
+        inputname = options.i
+        outputname = options.o
+        outputdendro = options.d
+    except Exception as e:
+        raise Exception(e, "Please pass an input (kcf), output filename and dendrogram out filename as arguments")
+    instream = file(inputname, 'r')
+
+    try:
+        html = post_rings_fingerprinter(instream, kcf_or_fingerprint=options.f, glycan_fragment_size=options.g,
+                                        fingerprint_size=options.s,
+                                        number_of_folds=options.n, calc_tanimoto_or_modifiedt=options.c,
+                                        show_unitfingerprint=options.u,
+                                        show_groupfingerprint=options.r, groupfingerprintname=options.a,
+                                        show_similarity_matrix=options.m,
+                                        show_dissimilarity_matrix=options.l, show_mode=options.e)
+        with open(outputname, "w") as f:
+            f.write(html)
+        with open(outputdendro, "w") as f:
+            f.write(extract_dendro_from_fingerprinter_output(html))
+    except Exception as e:
+        raise
+
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_fingerprinter/post_fingerprinter.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_fingerprinter/post_fingerprinter.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,206 @@
+<tool id="glytools_fingerprinter" name="GAP Fingerprinter" version="0.2">
+    <description>provides binary fingerprints for glycans using RINGS fingerprinter tool</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[post_fingerprinter.py -i $input -o $output -d $dendrogram -f $format -g $glycanfragmentsize -s $fingerprintsize -n $folds -c $tanimoto -u $showunit -r $showgroup -m $showsimmatrix -l $showdissimmatrix -e $showmode ]]></command>
+    <inputs>
+        <param format="kcf" name="input" type="data"  label="KCF source file"/>
+
+
+ <param name="format" type="integer" value="0" min="0" max="1" label="KCF(0) or Fingerprint(1) format"/>
+ <param name="glycanfragmentsize" type="integer" value="10000" min="0" max="100000" label="Glycan fragment size"/>
+ <param name="fingerprintsize" type="integer" value="1024" min="1" max="10000" label="Fingerprint size"/>
+ <param name="folds" type="integer" value="0" min="0" max="100" label="Number of Folds"/>
+ <param name="tanimoto" type="integer" value="1" min="1" max="2" label="Tanimoto(1) or Mod Tanimoto(2)"/>
+ <param name="showunit" type="integer" value="0" min="0" max="1" label="Show unit fingerprint"/>
+ <param name="showgroup" type="integer" value="0" min="0" max="1" label="Show group fingerprint"/>
+ <param name="showsimmatrix" type="integer" value="1" min="0" max="1" label="Show similarity matrix"/>
+ <param name="showdissimmatrix" type="integer" value="0" min="0" max="1" label="Show dissimilarity matrix"/>
+ <param name="showmode" type="integer" value="0" min="0" max="1" label="Show mode"/>
+    </inputs>
+    <outputs>
+        <data format="html" name="output" label="Fingerprint of $input.name"/>
+        <data format="txt" name="dendrogram" label="Newick-like Fingerprint of $input.name"/>
+    </outputs>
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool reads KCF glycans and uses the RINGS fingerprint to provide a linear binary based fingerprint based on the motifs found in the glycan.
+
+.. class:: infomark
+
+**Input**
+
+Any KCF glycan or glycan fingerprint (specific to this tool).
+
+.. class:: infomark
+
+**Output**
+
+Html output and a Newick-like linear tree format. 
+
+.. class:: infomark
+
+**Example Input**
+
+Query sequence::
+
+ ENTRY       G00015                      Glycan
+ NODE        8
+             1   Asn        20     0
+             2   GlcNAc     12     0
+             3   GlcNAc      3     0
+             4   Man        -5     0
+             5   Man       -12     5
+             6   Man       -12    -5
+             7   GlcNAc    -20     5
+             8   GlcNAc    -20    -5
+ EDGE        7
+             1     2:b1    1
+             2     3:b1    2:4
+             3     4:b1    3:4
+             4     5:a1    4:6
+             5     6:a1    4:3
+             6     7:b1    5:2
+             7     8:b1    6:2
+ ///
+ ENTRY       G00016                      Glycan
+ NODE        9
+             1   Asn        20     3
+             2   GlcNAc     12     3
+             3   LFuc        4     8
+             4   GlcNAc      3    -2
+             5   Man        -5    -2
+             6   Man       -12     3
+             7   Man       -12    -7
+             8   GlcNAc    -20     3
+             9   GlcNAc    -20    -7
+ EDGE        8
+             1     2:b1    1
+             2     3:a1    2:6
+             3     4:b1    2:4
+             4     5:b1    4:4
+             5     6:a1    5:6
+             6     7:a1    5:3
+             7     8:b1    6:2
+             8     9:b1    7:2
+ ///
+ ENTRY       G00017                      Glycan
+ NODE        11
+             1   Asn        24     3
+             2   GlcNAc     14     3
+             3   LFuc        7     8
+             4   GlcNAc      6    -2
+             5   Man        -2    -2
+             6   Man        -8     3
+             7   Man        -8    -7
+             8   GlcNAc    -16     3
+             9   GlcNAc    -16    -7
+             10  Gal       -24     3
+             11  Gal       -24    -7
+ EDGE        10
+             1     2:b1    1
+             2     3:a1    2:6
+             3     4:b1    2:4
+             4     5:b1    4:4
+             5     6:a1    5:6
+             6     7:a1    5:3
+             7     8:b1    6:2
+             8     9:b1    7:2
+             9    10:b1    8:4
+             10   11:b1    9:4
+ ///
+ ENTRY       G00018                      Glycan
+ NODE        13
+             1   Asn        28     3
+             2   GlcNAc     18     3
+             3   LFuc       10     8
+             4   GlcNAc      9    -2
+             5   Man         1    -2
+             6   Man        -5     4
+             7   Man        -5    -8
+             8   GlcNAc    -13     4
+             9   GlcNAc    -13    -8
+             10  Gal       -21     4
+             11  Gal       -21    -8
+             12  Neu5Ac    -29     4
+             13  Neu5Ac    -29    -8
+ EDGE        12
+             1     2:b1    1
+             2     3:a1    2:6
+             3     4:b1    2:4
+             4     5:b1    4:4
+             5     6:a1    5:6
+             6     7:a1    5:3
+             7     8:b1    6:2
+             8     9:b1    7:2
+             9    10:b1    8:4
+             10   11:b1    9:4
+             11   12:a2   10:6
+             12   13:a2   11:6
+ ///
+ ENTRY       G00019                      Glycan
+ NODE        9
+             1   Asn        20     0
+             2   GlcNAc     12     0
+             3   GlcNAc      3     0
+             4   Man        -5     0
+             5   Man       -12     5
+             6   Man       -12    -5
+             7   GlcNAc    -15     0
+             8   GlcNAc    -20     5
+             9   GlcNAc    -20    -5
+ EDGE        8
+             1     2:b1    1
+             2     3:b1    2:4
+             3     4:b1    3:4
+             4     5:a1    4:6
+             5     6:a1    4:3
+             6     7:b1    4:4
+             7     8:b1    5:2
+             8     9:b1    6:2
+ ///
+ ENTRY       G00020                      Glycan
+ NODE        9
+             1   Asn        20     3
+             2   GlcNAc     11     3
+             3   GlcNAc      2     3
+             4   Man        -6     3
+             5   Man       -13     9
+             6   Man       -13    -3
+             7   GlcNAc    -21     9
+             8   GlcNAc    -21     2
+             9   GlcNAc    -21    -8
+ EDGE        8
+             1     2:b1    1
+             2     3:b1    2:4
+             3     4:b1    3:4
+             4     5:a1    4:6
+             5     6:a1    4:3
+             6     7:b1    5:2
+             7     8:b1    6:4
+             8     9:b1    6:2
+ ///
+
+.. class:: infomark
+
+**Example Output**
+
+The html output varies dependent on options. To see the fingerprints set show unit to 1
+example output dendrogram sequence::
+
+ |||G00015_G00016|_|G00019_G00020||_|G00017_G00018||
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_fingerprinter/test_fingerprinter.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_fingerprinter/test_fingerprinter.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,190 @@
+__license__ = "MIT"
+
+import unittest
+import post_fingerprinter as fp
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        self.kcinput = {"rings": """ENTRY       G00015                      Glycan
+NODE        8
+            1   Asn        20     0
+            2   GlcNAc     12     0
+            3   GlcNAc      3     0
+            4   Man        -5     0
+            5   Man       -12     5
+            6   Man       -12    -5
+            7   GlcNAc    -20     5
+            8   GlcNAc    -20    -5
+EDGE        7
+            1     2:b1    1
+            2     3:b1    2:4
+            3     4:b1    3:4
+            4     5:a1    4:6
+            5     6:a1    4:3
+            6     7:b1    5:2
+            7     8:b1    6:2
+///
+ENTRY       G00016                      Glycan
+NODE        9
+            1   Asn        20     3
+            2   GlcNAc     12     3
+            3   LFuc        4     8
+            4   GlcNAc      3    -2
+            5   Man        -5    -2
+            6   Man       -12     3
+            7   Man       -12    -7
+            8   GlcNAc    -20     3
+            9   GlcNAc    -20    -7
+EDGE        8
+            1     2:b1    1
+            2     3:a1    2:6
+            3     4:b1    2:4
+            4     5:b1    4:4
+            5     6:a1    5:6
+            6     7:a1    5:3
+            7     8:b1    6:2
+            8     9:b1    7:2
+///
+ENTRY       G00017                      Glycan
+NODE        11
+            1   Asn        24     3
+            2   GlcNAc     14     3
+            3   LFuc        7     8
+            4   GlcNAc      6    -2
+            5   Man        -2    -2
+            6   Man        -8     3
+            7   Man        -8    -7
+            8   GlcNAc    -16     3
+            9   GlcNAc    -16    -7
+            10  Gal       -24     3
+            11  Gal       -24    -7
+EDGE        10
+            1     2:b1    1
+            2     3:a1    2:6
+            3     4:b1    2:4
+            4     5:b1    4:4
+            5     6:a1    5:6
+            6     7:a1    5:3
+            7     8:b1    6:2
+            8     9:b1    7:2
+            9    10:b1    8:4
+            10   11:b1    9:4
+///
+ENTRY       G00018                      Glycan
+NODE        13
+            1   Asn        28     3
+            2   GlcNAc     18     3
+            3   LFuc       10     8
+            4   GlcNAc      9    -2
+            5   Man         1    -2
+            6   Man        -5     4
+            7   Man        -5    -8
+            8   GlcNAc    -13     4
+            9   GlcNAc    -13    -8
+            10  Gal       -21     4
+            11  Gal       -21    -8
+            12  Neu5Ac    -29     4
+            13  Neu5Ac    -29    -8
+EDGE        12
+            1     2:b1    1
+            2     3:a1    2:6
+            3     4:b1    2:4
+            4     5:b1    4:4
+            5     6:a1    5:6
+            6     7:a1    5:3
+            7     8:b1    6:2
+            8     9:b1    7:2
+            9    10:b1    8:4
+            10   11:b1    9:4
+            11   12:a2   10:6
+            12   13:a2   11:6
+///
+ENTRY       G00019                      Glycan
+NODE        9
+            1   Asn        20     0
+            2   GlcNAc     12     0
+            3   GlcNAc      3     0
+            4   Man        -5     0
+            5   Man       -12     5
+            6   Man       -12    -5
+            7   GlcNAc    -15     0
+            8   GlcNAc    -20     5
+            9   GlcNAc    -20    -5
+EDGE        8
+            1     2:b1    1
+            2     3:b1    2:4
+            3     4:b1    3:4
+            4     5:a1    4:6
+            5     6:a1    4:3
+            6     7:b1    4:4
+            7     8:b1    5:2
+            8     9:b1    6:2
+///
+ENTRY       G00020                      Glycan
+NODE        9
+            1   Asn        20     3
+            2   GlcNAc     11     3
+            3   GlcNAc      2     3
+            4   Man        -6     3
+            5   Man       -13     9
+            6   Man       -13    -3
+            7   GlcNAc    -21     9
+            8   GlcNAc    -21     2
+            9   GlcNAc    -21    -8
+EDGE        8
+            1     2:b1    1
+            2     3:b1    2:4
+            3     4:b1    3:4
+            4     5:a1    4:6
+            5     6:a1    4:3
+            6     7:b1    5:2
+            7     8:b1    6:4
+            8     9:b1    6:2
+///
+"""
+        }
+        self.similaritymatrix = {
+            "rings": """G00015\t 1.000000\t 0.777778\t 0.460526\t 0.304348\t 0.564516\t 0.636364\t \nG00016\t 0.777778\t 1.000000\t 0.592105\t 0.391304\t 0.486111\t 0.538462\t \nG00017\t 0.460526\t 0.592105\t 1.000000\t 0.660870\t 0.339806\t 0.378947\t \nG00018\t 0.304348\t 0.391304\t 0.660870\t 1.000000\t 0.255319\t 0.268657\t \nG00019\t 0.564516\t 0.486111\t 0.339806\t 0.255319\t 1.000000\t 0.444444\t \nG00020\t 0.636364\t 0.538462\t 0.378947\t 0.268657\t 0.444444\t 1.000000\t """
+        }
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_kcf_input(self):
+        import StringIO
+
+        kchandle = StringIO.StringIO(''.join(self.kcinput["rings"]))
+        h = fp.post_rings_fingerprinter(kchandle)
+        # print h
+        d = fp.extract_dendro_from_fingerprinter_output(h)
+        # print d
+        self.assertIn(self.similaritymatrix["rings"], h)
+        self.assertIn("|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||", h)
+        self.assertIn("|||G00015_G00016|_|G00019_G00020||_|G00017_G00018||", d)
+
+    def test_empty_stream(self):
+        with self.assertRaises(IOError):
+            fp.post_rings_fingerprinter(None)
+        with self.assertRaises(IOError):
+            fp.post_rings_fingerprinter([])
+        with self.assertRaises(IOError):
+            fp.post_rings_fingerprinter("")
+        with self.assertRaises(IOError):
+            fp.extract_dendro_from_fingerprinter_output(None)
+        with self.assertRaises(IOError):
+            fp.extract_dendro_from_fingerprinter_output([])
+        with self.assertRaises(IOError):
+            fp.extract_dendro_from_fingerprinter_output("")
+
+
+def run_tests():
+    unittest.main()
+
+
+if __name__ == '__main__':
+    run_tests()
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_mcaw/README_mcaw.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_mcaw/README_mcaw.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,29 @@
+
+[TOC]
+
+# post_mcaw.py
+This tool uses read glycans in kcf format and aligns them using the RINGS MCAW tool.
+
+## Works with Galaxy?
+Yes. see [post_mcaw.xml](post_mcaw.xml)
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python post_mcaw.py -i $input -o $htmloutput -p $pngoutput -k $pkcfoutput -g $gap -s $sugar -a $anomer -n $nonreducing -r $reducing
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python post_mcaw.py -h
+```
+
+## Unit Testing?
+Yes. Use test_post_mcaw.py
+
+```
+../../virtualpy/bin/activate
+python test_post_mcaw.py
+```
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_mcaw/post_mcaw.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_mcaw/post_mcaw.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,145 @@
+__license__ = "MIT"
+__version__ = "0.2"
+
+def post_rings_mcaw(instream, gap_penalty=-10, sugar=60, anomer=30, nre_carbon=30, re_carbon=30):
+    """
+    post kcf to MCAW server and return html
+    :param instream: instream (kcf or fingerprint) to be placed in the form text area
+# Advanced weighting options
+# <input type="text" name="gapPenalty" value="-10" size=3>
+#                <td>&nbsp;&nbsp;&nbsp;&nbsp;&emsp;Monosaccharide:
+# <input type="text" name="sugar" value="60" size=3>
+#                Linkage information
+# <input type="text" name="anomer" value="30" size=3>
+#                <td>&nbsp;&nbsp;&nbsp;&nbsp;&emsp;Non reducing side carbon number:
+# <input type="text" name="nreCarbon" value="30" size=3>
+#                <td>&nbsp;&nbsp;&nbsp;&nbsp;&emsp;Reducing side carbon number:
+# <input type="text" name="reCarbon" value="30" size=3>
+    """
+    import urllib2
+    import urllib
+
+    # URL user would navigate to MCAW http://rings.t.soka.ac.jp/cgi-bin/tools/MCAW/mcaw_index.pl
+    # URL to post to
+    url = 'http://rings.t.soka.ac.jp/cgi-bin/tools/MCAW/mcaw_result_img.pl'
+
+    if instream is None or instream == [] or instream == "":
+        raise IOError("input stream is empty")
+
+    kcfdata = instream.read()
+    file = ""
+    # values contains all the names of the items in the form and the appropriate data
+    values = dict(datasetname='default', KCF=kcfdata, KCFfile=file, gapPenalty=gap_penalty, sugar=sugar,
+                  anomer=anomer, nreCarbon=nre_carbon, reCarbon=re_carbon, submit='SUBMIT')
+
+    html = urllib2.urlopen(url, urllib.urlencode(values)).readlines()
+
+    if html is None or str(html).strip() == "":
+        return None
+
+    for line in list(html):  # hack to remove unable to open file message
+        if "<title" in line or "</title" in line:
+            html.remove(line)
+        elif "<h1" in line or "</h1" in line:
+            html.remove(line)
+    return ''.join(html[2:])
+    # note the image link is /tmp/* /*.png append http://rings.t.soka.ac.jp to this to get the image file
+
+
+def get_pckf_from_html(html):
+    """
+     get pkcf related to mcaw html output
+
+    :param html: html from posting to mcaw
+    :return: pkcf
+    """
+    from BeautifulSoup import BeautifulSoup
+    import urllib2
+
+    if html is None or html == [] or html == "":
+        raise IOError("input stream is empty")
+    soup = BeautifulSoup(html)
+    pkcf = ""  # set to empty
+    for link in soup.findAll('a'):
+        if "pkcf" in link.get('href'):
+            pkcflink = link.get('href')
+            pkcf = urllib2.urlopen(pkcflink).read()
+    return pkcf
+
+
+def get_image_from_html(html):
+    """
+     get image related to mcaw html output
+    :param html: html from posting to mcaw
+    :return: png
+    """
+    from BeautifulSoup import BeautifulSoup
+    import urllib2
+
+    if html is None or html == [] or html == "":
+        raise IOError("input stream is empty")
+    soup = BeautifulSoup(html)
+    tags = soup.findAll(name='img')  # have to use explicit name= , as source html is damaged *by me..
+    imgsrc = (list(tag['src'] for tag in tags))
+    mcawpicsrc = "http://rings.t.soka.ac.jp" + imgsrc[1]
+
+    # now get the img (it is not embedded in the page and must be retrieved from the server
+    try:
+        img = urllib2.urlopen(mcawpicsrc).read()
+        return img
+    except urllib2.HTTPError:
+        img = ['\x89PNG\r\n', '\x1a\n',
+               '\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x01\x03\x00\x00\x00%\xdbV\xca\x00\x00\x00\x03PLTE\x00\x00\x00\xa7z=\xda\x00\x00\x00\x01tRNS\x00@\xe6\xd8f\x00\x00\x00\n',
+               'IDAT\x08\x1dc`\x00\x00\x00\x02\x00\x01\xcf\xc85\xe5\x00\x00\x00\x00IEND\xaeB`\x82']
+
+        return "".join(img)
+
+
+if __name__ == "__main__":
+    import urllib2
+    from BeautifulSoup import BeautifulSoup
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input.kcf",
+                      help="input kcf file (input)")
+    parser.add_option("-o", action="store", type="string", dest="o", default="output.html",
+                      help="output html file from mcaw (output)")
+    parser.add_option("-p", action="store", type="string", dest="p", default="output.png",
+                      help="png output of MCAW")
+    parser.add_option("-k", action="store", type="string", dest="k", default="output.pkcf",
+                      help="pkcf output from mcaw")
+    parser.add_option("-g", action="store", type="int", dest="g", default=-10,
+                      help="gap penalty")
+    parser.add_option("-s", action="store", type="int", dest="s", default=60,
+                      help="sugar")
+    parser.add_option("-a", action="store", type="int", dest="a", default=30,
+                      help="anomer")
+    parser.add_option("-n", action="store", type="int", dest="n", default=30,
+                      help="non reducing carbon number")
+    parser.add_option("-r", action="store", type="int", dest="r", default=30,
+                      help="reducing carbon number")
+
+    (options, args) = parser.parse_args()
+
+
+    try:
+        inputname = options.i
+        outputname = options.o
+        outputpng = options.p
+        outputpkcf = options.k
+    except Exception as e:
+        raise Exception(e, "Please pass an input (kcf), output html, png and pkcf filename as arguments")
+    instream = file(inputname, 'r')
+
+    try:
+        html = post_rings_mcaw(instream, gap_penalty=options.g, sugar=options.s, anomer=options.a, nre_carbon=options.n, re_carbon=options.r)
+        with open(outputname, "w") as out:
+            out.write(html)
+        with open(outputpkcf, "w") as f:
+            f.write(get_pckf_from_html(html))
+        with open(outputpng, "w") as f:
+            f.write(get_image_from_html(html))
+    except Exception as e:
+        raise e
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_mcaw/post_mcaw.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_mcaw/post_mcaw.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,50 @@
+<tool id="glytools_alignment_mcaw" name="GAP Align Glycans" version="0.2">
+    <description>using MCAW</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[post_mcaw.py -i $input -o $htmloutput -p $pngoutput -k $pkcfoutput -g $gap -s $sugar -a $anomer -n $nonreducing -r $reducing ]]></command>
+    <inputs>
+        <param format="kcf" name="input" type="data" label="KCF source file"/>
+ <param name="gap" type="integer" value="-10" min="-100" max="100" label="gap penalty for glycan alignment"/>
+ <param name="sugar" type="integer" value="60" min="-100" max="100" label="monosaccharide type weighting"/>
+ <param name="anomer" type="integer" value="30" min="-100" max="100" label="anomer weighting"/>
+ <param name="nonreducing" type="integer" value="30" min="-100" max="100" label="number of non reducing carbons weighting"/>
+ <param name="reducing" type="integer" value="30" min="-100" max="100" label="number of reducing carbons weighting"/>
+    </inputs>
+    <outputs>
+        <data format="html" name="htmloutput" label="MCAW of $input.name"/>
+        <data format="png" name="pngoutput" label="MCAW image of $input.name"/>
+        <data format="txt" name="pkcfoutput" label="MCAW PKCF of $input.name"/>
+    </outputs>
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1089/omi.2009.0129</citation>
+</citations>
+
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool uses read glycans in KCF format and aligns them using the RINGS MCAW tool. 
+
+.. class:: infomark
+
+**Input**
+
+glycans in KCF format
+
+.. class:: infomark
+
+**Output**
+
+Html output from mcaw.
+A png graphics od the MCAW alignment diagram.
+PKCF file (Probabilities KCF, contains the glycans in pseudo KCF with stats)
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_mcaw/test_post_mcaw.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_mcaw/test_post_mcaw.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,400 @@\n+__license__ = "MIT"\n+\n+import unittest\n+import post_mcaw as pm\n+\n+\n+class SimpleUnitTest(unittest.TestCase):\n+    def setUp(self):\n+        import os\n+\n+        self.kcinput = {"ringsmcaw": """ENTRY       G04845                      Glycan\n+COMPOSITION (Gal)3 (Glc)1 (GlcNAc)2 (LFuc)2 (Neu5Ac)1\n+MASS        1656.5\n+DBLINKS     CCSD: 23949\n+            GlycomeDB: 20420\n+            JCGGDB: JCGG-STR011245\n+NODE        9\n+            1   Glc         0     0\n+            2   Gal       -10     0\n+            3   GlcNAc    -20    10\n+            4   GlcNAc    -20   -10\n+            5   Gal       -30    15\n+            6   LFuc      -30     5\n+            7   LFuc      -30    -5\n+            8   Gal       -30   -15\n+            9   Neu5Ac    -40    15\n+EDGE        8\n+            1     2:b1    1:4\n+            2     3:b1    2:6\n+            3     4:b1    2:3\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a1    4:4\n+            7     8:b1    4:3\n+            8     9:a2    5:3\n+///\n+ENTRY       G05108                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)1 (S)1\n+MASS        1266.2\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33353\n+            GlycomeDB: 20590\n+            JCGGDB: JCGG-STR011425\n+NODE        7\n+            1   GalNAc     20     1\n+            2   Gal        10     1\n+            3   GlcNAc      0     1\n+            4   S          -5     5\n+            5   Gal       -10     1\n+            6   LFuc      -10    -4\n+            7   Neu5Ac    -20     1\n+EDGE        6\n+            1     2:b1    1:3\n+            2     3:b1    2:3\n+            3     4       3:6\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G05121                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)2\n+MASS        1477.3\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33350\n+            GlycomeDB: 20599\n+            JCGGDB: JCGG-STR011433\n+NODE        7\n+            1   GalNAc      0     0\n+            2   Neu5Ac    -10     5\n+            3   Gal       -10    -5\n+            4   GlcNAc    -20    -5\n+            5   Gal       -30     0\n+            6   LFuc      -30   -10\n+            7   Neu5Ac    -40     0\n+EDGE        6\n+            1     2:a2    1:6\n+            2     3:b1    1:3\n+            3     4:b1    3:3\n+            4     5:b1    4:4\n+            5     6:a1    4:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G04183                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)5 (LFuc)1 (Man)3 (Neu5Ac)3\n+MASS        3026.8\n+CLASS       Glycoprotein; N-Glycan\n+DBLINKS     CCSD: 41981\n+            GlycomeDB: 19974\n+            JCGGDB: JCGG-STR010756\n+NODE        15\n+            1   GlcNAc      0     0\n+            2   GlcNAc    -10     0\n+            3   Man       -20     0\n+            4   Man       -30    10\n+            5   Man       -30   -10\n+            6   GlcNAc    -40    10\n+            7   GlcNAc    -40    -5\n+            8   GlcNAc    -40   -15\n+            9   Gal       -50    10\n+            10  Gal       -50     0\n+            11  LFuc      -50   -10\n+            12  Gal       -50   -15\n+            13  Neu5Ac    -60    10\n+            14  Neu5Ac    -60     0\n+            15  Neu5Ac    -60   -15\n+EDGE        14\n+            1     2:b1    1:4\n+            2     3:b1    2:4\n+            3     4:a1    3:6\n+            4     5:a1    3:3\n+            5     6:b1    4:2\n+            6     7:b1    5:4\n+            7     8:b1    5:2\n+            8     9:b1    6:4\n+            9    10:b1    7:4\n+            10   11:a1    7:3\n+            11   12:b1    8:4\n+            12   13:a2    9:6\n+            13   14:a2   10:3\n+            14   15:a2   12:6\n+///\n+\n+ENTRY       G04329                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)3 (LFuc)3 (Neu5Ac)1\n+MASS        1843.7\n+DBLINKS     CCSD: 36620\n+            GlycomeDB: 20084\n+            JCGGDB: JCGG-STR01087'..b'   13  Neu5Ac    -29    -8\n+EDGE        12\n+            1     2:b1    1\n+            2     3:a1    2:6\n+            3     4:b1    2:4\n+            4     5:b1    4:4\n+            5     6:a1    5:6\n+            6     7:a1    5:3\n+            7     8:b1    6:2\n+            8     9:b1    7:2\n+            9    10:b1    8:4\n+            10   11:b1    9:4\n+            11   12:a2   10:6\n+            12   13:a2   11:6\n+///\n+ENTRY       G00019                      Glycan\n+NODE        9\n+            1   Asn        20     0\n+            2   GlcNAc     12     0\n+            3   GlcNAc      3     0\n+            4   Man        -5     0\n+            5   Man       -12     5\n+            6   Man       -12    -5\n+            7   GlcNAc    -15     0\n+            8   GlcNAc    -20     5\n+            9   GlcNAc    -20    -5\n+EDGE        8\n+            1     2:b1    1\n+            2     3:b1    2:4\n+            3     4:b1    3:4\n+            4     5:a1    4:6\n+            5     6:a1    4:3\n+            6     7:b1    4:4\n+            7     8:b1    5:2\n+            8     9:b1    6:2\n+///\n+ENTRY       G00020                      Glycan\n+NODE        9\n+            1   Asn        20     3\n+            2   GlcNAc     11     3\n+            3   GlcNAc      2     3\n+            4   Man        -6     3\n+            5   Man       -13     9\n+            6   Man       -13    -3\n+            7   GlcNAc    -21     9\n+            8   GlcNAc    -21     2\n+            9   GlcNAc    -21    -8\n+EDGE        8\n+            1     2:b1    1\n+            2     3:b1    2:4\n+            3     4:b1    3:4\n+            4     5:a1    4:6\n+            5     6:a1    4:3\n+            6     7:b1    5:2\n+            7     8:b1    6:4\n+            8     9:b1    6:2\n+///\n+""", "ringsbroken": """ABCDEFGENTRY       G00015                      Glycan\n+NODE        8\n+            1   Asn        20     0\n+            2   GlcNAc     12     0\n+"""\n+        }\n+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:\n+        pass\n+\n+    def tearDown(self):\n+        pass\n+\n+    def test_kcf_input(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsmcaw"]))\n+        h = pm.post_rings_mcaw(kchandle)\n+        d = pm.get_pckf_from_html(h)\n+        self.assertIn("G04804-G04183-G04845-G05121-G05108-G04329", d)\n+        i = pm.get_image_from_html(h)\n+        self.assertIn("PNG", i)\n+\n+    def test_broken_kcf_input(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsbroken"]))\n+        h = pm.post_rings_mcaw(kchandle)\n+        d = pm.get_pckf_from_html(h)\n+        self.assertEqual("", d)\n+        i = pm.get_image_from_html(h)\n+        self.assertIn("\\x89PNG", i)\n+\n+    def test_more_kcf_input(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsfinger"]))\n+        h = pm.post_rings_mcaw(kchandle)\n+        d = pm.get_pckf_from_html(h)\n+        self.assertIn("G00020-G00019-G00016-G00015-G00017-G00018", d)\n+        i = pm.get_image_from_html(h)\n+        self.assertIn("PNG", i)\n+\n+    def test_empty_stream(self):\n+        with self.assertRaises(IOError):\n+            pm.post_rings_mcaw(None)\n+        with self.assertRaises(IOError):\n+            pm.post_rings_mcaw([])\n+        with self.assertRaises(IOError):\n+            pm.post_rings_mcaw("")\n+        with self.assertRaises(IOError):\n+            pm.get_image_from_html(None)\n+        with self.assertRaises(IOError):\n+            pm.get_image_from_html([])\n+        with self.assertRaises(IOError):\n+            pm.get_image_from_html("")\n+        with self.assertRaises(IOError):\n+            pm.get_pckf_from_html(None)\n+        with self.assertRaises(IOError):\n+            pm.get_pckf_from_html([])\n+        with self.assertRaises(IOError):\n+            pm.get_pckf_from_html("")\n+\n+\n+def run_tests():\n+    unittest.main()\n+\n+\n+if __name__ == \'__main__\':\n+    run_tests()\n'
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_miner/README_miner.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_miner/README_miner.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,31 @@
+
+[TOC]
+
+# post_miner.py
+This tool reads kcf glycans and mines them for common subgraphs using the RINGS.
+
+
+## Works with Galaxy?
+Yes. see [post_miner.xml](post_miner.xml)
+
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python post_miner.py -i $input -o $output -a $alpha -m $minsup
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python post_miner.py -h
+```
+
+## Unit Testing?
+Yes. Use test_post_miner.py
+
+```
+../../virtualpy/bin/activate
+python test_post_miner.py
+```
+
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_miner/post_miner.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_miner/post_miner.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,68 @@
+__license__ = "MIT"
+__version__ = "0.2"
+
+def post_rings_miner(instream, alpha=1, minsup=1):
+    """
+
+    :param instream: kcf to be passed to the textarea
+    :param alpha: alpha parameter between 0 and 1
+    :param minsup: minimum number by which the resulting substructure should appear should be specified for minimum support
+    """
+    import urllib2
+    import urllib
+
+    if instream is None or instream == [] or instream == "":
+        raise IOError("input stream is empty")
+
+    # URL that users would navigate to rings.t.soka.ac.jp/cgi-bin/tools/GlycanMiner/Miner_index.pl
+    # URL to post to
+    url = 'http://rings.t.soka.ac.jp/cgi-bin/tools/GlycanMiner/miner.pl'
+    kcfdata = instream.read()
+    file = ""
+    # values contains all the names of the items in the form and the appropriate data
+    values = dict(datasetname='default', KCF=kcfdata, KCFFILE=file, alpha=alpha, minsup=minsup, submit='SUBMIT')
+    html = urllib2.urlopen(url, urllib.urlencode(values)).readlines()
+
+    if html is None or str(html).strip() == "":
+        return None
+
+    for line in list(html):  # hack to remove unable to open file message
+        if "<title" in line or "</title" in line:
+            html.remove(line)
+        elif "<h1" in line or "</h1" in line:
+            html.remove(line)
+        elif "Error" in line:
+            html.remove(line)
+    return ''.join(html[2:])
+    # output will seem empty if input issues, otherwise returns embedded images
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input.kcf",
+                      help="input kcf file (input)")
+    parser.add_option("-o", action="store", type="string", dest="o", default="output.html",
+                      help="output html file from miner (output)")
+    parser.add_option("-a", action="store", type="int", dest="a", default="1",
+                      help="alpha value (between 0 and 1)")
+    parser.add_option("-m", action="store", type="int", dest="m", default="1",
+                      help="minimum support")
+
+    (options, args) = parser.parse_args()
+
+    try:
+        inputname = options.i
+        outputname = options.o
+    except Exception as e:
+        raise Exception(e, "Please pass an input (kcf), output html  as arguments")
+    instream = file(inputname, 'r')
+
+    try:
+        html = post_rings_miner(instream, alpha=options.a, minsup=options.m)
+        with open(outputname, "w") as out:
+            out.write(html)
+    except Exception as e:
+        raise e
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_miner/post_miner.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_miner/post_miner.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,43 @@
+<tool id="glytools_subtree_miner" name="GAP Extract subtrees" version="0.2">
+    <description>Find significant subgraphs in glycans with Glycan Miner</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[post_miner.py -i $input -o $output -a $alpha -m $minsup ]]></command>
+    <inputs>
+        <param format="kcf" name="input" type="data" label="KCF source file"/>
+ <param name="alpha" type="integer" value="1" min="0" max="1" label="alpha value, used to specify the overlap in subtructures."/>
+ <param name="minsup" type="integer" value="1" min="1" max="100" label="minimum frequency of appearance that a substructure is seen in all input glycan. "/>
+    </inputs>
+    <outputs>
+        <data format="html" name="output" label="Miner of $input.name"/>
+    </outputs>
+
+ <citations>
+     <!--  -->
+    <citation type="doi">10.1093/bioinformatics/btn293</citation>
+  </citations>
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool reads KCF glycans and mines them for common subgraphs using the RINGS.
+
+.. class:: infomark
+
+**Input**
+
+Glycans in KCF format
+
+.. class:: infomark
+
+**Output**
+
+Html output from glycan miner which contains images of the common subgraphs. 
+
+]]>
+
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 extract_display_features/rings_miner/test_post_miner.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_display_features/rings_miner/test_post_miner.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,416 @@\n+__license__ = "MIT"\n+\n+import unittest\n+import post_miner as pm\n+\n+\n+class SimpleUnitTest(unittest.TestCase):\n+    def setUp(self):\n+        import os\n+\n+        self.kcinput = {"ringsmcaw": """ENTRY       G04845                      Glycan\n+COMPOSITION (Gal)3 (Glc)1 (GlcNAc)2 (LFuc)2 (Neu5Ac)1\n+MASS        1656.5\n+DBLINKS     CCSD: 23949\n+            GlycomeDB: 20420\n+            JCGGDB: JCGG-STR011245\n+NODE        9\n+            1   Glc         0     0\n+            2   Gal       -10     0\n+            3   GlcNAc    -20    10\n+            4   GlcNAc    -20   -10\n+            5   Gal       -30    15\n+            6   LFuc      -30     5\n+            7   LFuc      -30    -5\n+            8   Gal       -30   -15\n+            9   Neu5Ac    -40    15\n+EDGE        8\n+            1     2:b1    1:4\n+            2     3:b1    2:6\n+            3     4:b1    2:3\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a1    4:4\n+            7     8:b1    4:3\n+            8     9:a2    5:3\n+///\n+ENTRY       G05108                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)1 (S)1\n+MASS        1266.2\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33353\n+            GlycomeDB: 20590\n+            JCGGDB: JCGG-STR011425\n+NODE        7\n+            1   GalNAc     20     1\n+            2   Gal        10     1\n+            3   GlcNAc      0     1\n+            4   S          -5     5\n+            5   Gal       -10     1\n+            6   LFuc      -10    -4\n+            7   Neu5Ac    -20     1\n+EDGE        6\n+            1     2:b1    1:3\n+            2     3:b1    2:3\n+            3     4       3:6\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G05121                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)2\n+MASS        1477.3\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33350\n+            GlycomeDB: 20599\n+            JCGGDB: JCGG-STR011433\n+NODE        7\n+            1   GalNAc      0     0\n+            2   Neu5Ac    -10     5\n+            3   Gal       -10    -5\n+            4   GlcNAc    -20    -5\n+            5   Gal       -30     0\n+            6   LFuc      -30   -10\n+            7   Neu5Ac    -40     0\n+EDGE        6\n+            1     2:a2    1:6\n+            2     3:b1    1:3\n+            3     4:b1    3:3\n+            4     5:b1    4:4\n+            5     6:a1    4:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G04183                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)5 (LFuc)1 (Man)3 (Neu5Ac)3\n+MASS        3026.8\n+CLASS       Glycoprotein; N-Glycan\n+DBLINKS     CCSD: 41981\n+            GlycomeDB: 19974\n+            JCGGDB: JCGG-STR010756\n+NODE        15\n+            1   GlcNAc      0     0\n+            2   GlcNAc    -10     0\n+            3   Man       -20     0\n+            4   Man       -30    10\n+            5   Man       -30   -10\n+            6   GlcNAc    -40    10\n+            7   GlcNAc    -40    -5\n+            8   GlcNAc    -40   -15\n+            9   Gal       -50    10\n+            10  Gal       -50     0\n+            11  LFuc      -50   -10\n+            12  Gal       -50   -15\n+            13  Neu5Ac    -60    10\n+            14  Neu5Ac    -60     0\n+            15  Neu5Ac    -60   -15\n+EDGE        14\n+            1     2:b1    1:4\n+            2     3:b1    2:4\n+            3     4:a1    3:6\n+            4     5:a1    3:3\n+            5     6:b1    4:2\n+            6     7:b1    5:4\n+            7     8:b1    5:2\n+            8     9:b1    6:4\n+            9    10:b1    7:4\n+            10   11:a1    7:3\n+            11   12:b1    8:4\n+            12   13:a2    9:6\n+            13   14:a2   10:3\n+            14   15:a2   12:6\n+///\n+\n+ENTRY       G04329                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)3 (LFuc)3 (Neu5Ac)1\n+MASS        1843.7\n+DBLINKS     CCSD: 36620\n+            GlycomeDB: 20084\n+            JCGGDB: JCGG-STR0108'..b'  20     0\n+            2   GlcNAc     12     0\n+            3   GlcNAc      3     0\n+            4   Man        -5     0\n+            5   Man       -12     5\n+            6   Man       -12    -5\n+            7   GlcNAc    -15     0\n+            8   GlcNAc    -20     5\n+            9   GlcNAc    -20    -5\n+EDGE        8\n+            1     2:b1    1\n+            2     3:b1    2:4\n+            3     4:b1    3:4\n+            4     5:a1    4:6\n+            5     6:a1    4:3\n+            6     7:b1    4:4\n+            7     8:b1    5:2\n+            8     9:b1    6:2\n+///\n+ENTRY       G00020                      Glycan\n+NODE        9\n+            1   Asn        20     3\n+            2   GlcNAc     11     3\n+            3   GlcNAc      2     3\n+            4   Man        -6     3\n+            5   Man       -13     9\n+            6   Man       -13    -3\n+            7   GlcNAc    -21     9\n+            8   GlcNAc    -21     2\n+            9   GlcNAc    -21    -8\n+EDGE        8\n+            1     2:b1    1\n+            2     3:b1    2:4\n+            3     4:b1    3:4\n+            4     5:a1    4:6\n+            5     6:a1    4:3\n+            6     7:b1    5:2\n+            7     8:b1    6:4\n+            8     9:b1    6:2\n+///\n+""", "ringsbroken": """ABCDEFGENTRY       G00015                      Glycan\n+NODE        8\n+            1   Asn        20     0\n+            2   GlcNAc     12     0\n+"""\n+        }\n+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:\n+        pass\n+\n+    def tearDown(self):\n+        pass\n+\n+    def test_kcf_input(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsfinger"]))\n+        h = pm.post_rings_miner(kchandle)\n+        self.assertIn("Input size: 6", h)\n+        self.assertIn("alpha: 1.0", h)\n+        self.assertIn("Minsup: 1", h)\n+        self.assertIn("Subtrees: 7", h)\n+\n+    def test_kcf_input_alpha(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsfinger"]))\n+        h = pm.post_rings_miner(kchandle, alpha=0)\n+        self.assertIn("Input size: 6", h)\n+        self.assertIn("alpha: 0.0", h)\n+        self.assertIn("Minsup: 1", h)\n+        self.assertIn("Subtrees: 3", h)\n+\n+    def test_kcf_input_minsup(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsfinger"]))\n+        h = pm.post_rings_miner(kchandle, minsup=2)\n+        self.assertIn("Input size: 6", h)\n+        self.assertIn("alpha: 1.0", h)\n+        self.assertIn("Minsup: 2", h)\n+        self.assertIn("Subtrees: 4", h)\n+\n+    def test_kcf_input_alpha_minsup(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsfinger"]))\n+        h = pm.post_rings_miner(kchandle, alpha=0.5, minsup=2)\n+        self.assertIn("Input size: 6", h)\n+        self.assertIn("alpha: 0.5", h)\n+        self.assertIn("Minsup: 2", h)\n+        self.assertIn("Subtrees: 2", h)\n+\n+    def test_broken_kcf_input(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsbroken"]))\n+        h = pm.post_rings_miner(kchandle)\n+        self.assertIn("Input size: 0", h)\n+        self.assertIn("Subtrees: 0", h)\n+\n+    def test_more_kcf_input(self):\n+        import StringIO\n+\n+        kchandle = StringIO.StringIO(\'\'.join(self.kcinput["ringsmcaw"]))\n+        h = pm.post_rings_miner(kchandle)\n+        self.assertIn("Input size: 6", h)\n+        self.assertIn("alpha: 1.0", h)\n+        self.assertIn("Minsup: 1", h)\n+        self.assertIn("Subtrees: 11", h)\n+\n+    def test_empty_stream(self):\n+        with self.assertRaises(IOError):\n+            pm.post_rings_miner(None)\n+        with self.assertRaises(IOError):\n+            pm.post_rings_miner([])\n+        with self.assertRaises(IOError):\n+            pm.post_rings_miner("")\n+\n+\n+def run_tests():\n+    unittest.main()\n+\n+\n+if __name__ == \'__main__\':\n+    run_tests()\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/NOTES
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/NOTES Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,28 @@
+
+optional inputs : species, pi, glycan , cell type
+file type - for now msa
+outputs : json of everything. *.msa files . 
+possibly if images are selected then bundle all as an html.
+
+For now only interested in msa files. Ignoring everything else. i.e. if a match has no msa I do nothing serious just print to stdout
+
+basic functional version
+python cfg_get_glycan_from_cells.py  -s Human -p "Crocker,Paul" 
+
+gets the msa 
+Human_B-Cells_Crocker_N-Linked_10000007.msa  Human_K562_Crocker_N-Linked_7301.msa   Human_Monocytes_Crocker_N-Linked_10000006.msa             Human_T-Cells_Crocker_O-Linked_10000011.msa
+Human_B-Cells_Crocker_O-Linked_10000008.msa  Human_K562_Crocker_O-Linked_7302.msa   Human_Monocytes_Crocker_O-Linked_10000005.msa             Human_THP-1_Crocker_N-Linked_7309.msa
+Human_HL-60_Crocker_N-Linked_7330.msa        Human_KG-1a_Crocker_N-Linked_7317.msa  Human_Natural Killer Cells_Crocker_N-Linked_10000012.msa  Human_VG37_Crocker_N-Linked_7305.msa
+Human_HL-60_Crocker_O-Linked_7314.msa        Human_KG-1a_Crocker_O-Linked_7318.msa  Human_Natural Killer Cells_Crocker_O-Linked_10000013.msa
+
+writes out output.json with other info
+
+prints messages on stdout:
+no msa for  Human T-Cells Crocker,Paul N-Linked
+no msa for  Human VG37 Crocker,Paul O-Linked
+
+
+because any number of the outputs can be generated, Number of Output datasets cannot be determined until tool run
+However ... these discovered datasets cannot be used with workflows and require the user to refresh their history before they are shown. (1)
+Another option is to use an html file and link to all the data (2)
+I am trying part 1 first.
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/README.md Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,38 @@
+
+#GetCFG
+
+
+Current implementation uses data discovery
+
+* Galaxy note - each msa file is exposed as a new dataset in your history, thus links in this html file do not work in Galaxy. You may need to refresh your history to see all datasets.
+
+
+## Dev notes and thoughts
+
+## Dealing with multiple output data sets
+
+https://wiki.galaxyproject.org/Admin/Tools/Multiple%20Output%20Files
+
+2 options, either html with links to msa files or 'data discovery'
+
+Seems like HTML is best
+### HTML
+Unsure if can be used properly in workflows?
+The application must create and write valid html to setup the page $html_file seen by the user when they view (eye icon) the file. It must create and write that new file at the path passed by Galaxy as the $html_file command line parameter. All application outputs that will be included as links in that html code should be placed in the specific output directory $html_file.files_path passed on the command line. The external application is responsible for creating that directory before writing images and files into it. When generating the html, The files written by the application to $html_file.files_path are referenced in links directly by their name, without any other path decoration 
+
+#### 
+html works but html file is considered the history item, the msa files are not accessible in the workflow.
+Idea:
+Once the html has been generated the number of msa will be known. 
+create another xml to output the number of msa files found (or possibly generate this in a txt file here?)
+then create another xml to 'output' msa data as individual history items. 
+will not work as the filter is usually a boolean condition rather than an integer condition. Also a small number of outputs is easily supported but not much more. 
+
+Not sure how this will fit into a workflow. Maybe this will be useful for creating data libraries -> no as msa files are not accessible. 
+
+### DATA DISCOVERY
+Cons :  discovered datasets cannot be used with workflows and require the user to refresh their history before they are shown.
+Sure but at least you get access to the msa files. These can then be exported to other histories quite easily and/or used to make data libraries. 
+
+Data discovery works great. 
+
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/README_CFG.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/README_CFG.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,42 @@
+[TOC]
+
+# 1. cfg_get_glycan_from_cells.py
+
+Retrieve glycan profiling data from the CFG.
+
+With focus on retrieving the annotated mass spec data (.msa files)
+
+## Works with Galaxy?
+Yes. see [getcfgcells.xml](getcfgcells.xml)
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python cfg_get_glycan_from_cells.py
+```
+
+This will use the default settings and by default pull all data from the CFG. This may take some time.
+The CFG may be unimpressed, if you do this too often.
+
+To specify which data you would like to retrieve :
+```
+../../virtualpy/bin/activate
+cfg_get_glycan_from_cells.py -s "$species" -p "$investigator" -g "$glycantype" -c "$celltype" -o "$html_file" --filepath "msa_output"
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python cfg_get_glycan_from_cells.py -h
+```
+
+## Unit Testing?
+Not yet! Although some testing ha been done using the htmlfortesting.html and short-htmlfortesting.html. This code has also been used within Galaxy to retrieve data.
+So it _should work just fine..._
+
+In principle:
+
+```
+../../virtualpy/bin/activate
+python  test_cfg_get_glycan_from_cells.py
+```
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/cfg_get_glycan_from_cells.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/cfg_get_glycan_from_cells.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,417 @@\n+__author__ = "Chris Barnett"\n+__version__ = "0.3"\n+__license__ = "SCRU"\n+\n+from BeautifulSoup import BeautifulSoup\n+import mechanize\n+\n+\n+class PrettifyHandler(mechanize.BaseHandler):\n+    def http_response(self, request, response):\n+        if not hasattr(response, "seek"):\n+            response = mechanize.response_seek_wrapper(response)\n+        # only use BeautifulSoup if response is html\n+        if response.info().dict.has_key(\'content-type\') and (\'html\' in response.info().dict[\'content-type\']):\n+            soup = BeautifulSoup(response.get_data())\n+            response.set_data(soup.prettify())\n+        return response\n+\n+\n+def mechanise_cfg_cells(species, investigator, glycantype, celltype, page=\'http://www.functionalglycomics.org/glycomics/common/jsp/samples/searchSample.jsp?templateKey=2&12=CellType&operation=refine\', debug=False):\n+    """\n+    Use mechanise to submit input glycan and formats to the new converter tool at RINGS\n+    """\n+    import mechanize\n+    import cookielib\n+\n+    # create a Browser\n+    br = mechanize.Browser()\n+    br.add_handler(PrettifyHandler())\n+\n+    #  handle cookies - Cookie Jar\n+    cj = cookielib.LWPCookieJar()\n+    br.set_cookiejar(cj)\n+\n+    # Browser options\n+    br.set_handle_equiv(True)\n+    br.set_handle_gzip(True)\n+    br.set_handle_redirect(True)\n+    br.set_handle_referer(True)\n+    br.set_handle_robots(False)\n+\n+    # Follows refresh 0 but not hangs on refresh > 0\n+    br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)\n+\n+    # Want debugging messages?\n+    br.set_debug_http(debug)\n+    br.set_debug_redirects(debug)\n+    br.set_debug_responses(debug)\n+\n+    br.addheaders = [(\'User-agent\',\n+                      \'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1\')]\n+\n+    # Open site\n+    #page = \'http://www.functionalglycomics.org/glycomics/common/jsp/samples/searchSample.jsp?templateKey=2&12=CellType&operation=refine\'\n+    br.open(page)\n+\n+    # Show the response headers\n+    response_info = br.response().info()\n+\n+    # select the input form\n+    br.select_form(nr=0)\n+#    for form in br.forms():\n+#        print "Form name:", form.name\n+#        print form\n+    # read user glycan and submit\n+    # glycandata = inputstream.read() # read into a variable as I need it later\n+    #    br.form["5"] = "" # species\n+    #    br.form["15"] = "" # participating investigator\n+    #    br.form["10"] = "" # glycan type\n+    #    br.form["9"] = "" # cell type\n+\n+    #. select appropriate input on form\n+    if species == "all":\n+        pass\n+    else:\n+        control = br.form.find_control("5")\n+        br[control.name] = [species] # could use br["5"] but I think this is way is more descriptive\n+\n+    if investigator == "all":\n+        pass\n+    else:\n+        control = br.form.find_control("15")\n+        br[control.name] = [investigator]\n+\n+    if glycantype == "all":\n+        pass\n+    else:\n+        control = br.form.find_control("10")\n+        br[control.name] = [glycantype]\n+\n+    if celltype == "all":\n+        pass\n+    else:\n+        control = br.form.find_control("9")\n+        br[control.name] = [celltype]\n+\n+\n+    br.submit()\n+\n+    response = br.response().read()  # the converted file!\n+\n+    if response is None or str(response.strip()) == \'\':\n+        raise IOError("empty response")\n+    return response\n+\n+\n+def clean_json_response(response):\n+    """\n+        # look at json  status has failure status, submitData has original data and result has output with format\n+\n+    :param response: json from RINGS convert\n+    :return: a list of glycan structures\n+    """\n+    import json\n+    import re\n+    import StringIO\n+\n+    # RINGS bug, additional data returned with JSON format. Clean this up\n+    jsonoutputasfilehandle = StringIO.StringIO(\'\'.join(response))\n+    keeplines = []  # only keep lines that look like JSON\n+    for line in jsonoutputasfilehandle.readlines():\n+        if lin'..b'igator"].split(",")[0], entry["glycantype"],os.path.basename(entry["rawdata_msa"][0] )] )\n+                entry[\'caption\'] =  "_".join([entry["species"],entry["celltype"],entry["investigator"].split(",")[0], entry["glycantype"]])\n+\n+            except Exception as e:\n+                raise e\n+    with open(output,\'w\') as f:\n+        f.write(template.render(title=\'Mass Spec Annotated Files from the CFG\', items=data,species=options["species"], investigator=options["pi"], glycan=options["glycan"], cell=options["cell"] ))\n+\n+\n+def download_and_save_msa(parseddata, filepath):\n+    """\n+\n+    :param parseddata: dictionary containing links to msa data\n+    :return:\n+    """\n+    import os\n+    import urllib2\n+\n+    if not os.path.exists(filepath):\n+        os.makedirs(filepath)\n+    for entry in parseddata:\n+        if len(entry["rawdata_msa"]) == 0:\n+            print "no msa for ", entry["species"], entry["celltype"], entry["investigator"], entry["glycantype"]\n+        else:\n+            try:\n+                filename = "_".join([entry["species"],entry["celltype"],entry["investigator"].split(",")[0], entry["glycantype"],os.path.basename(entry["rawdata_msa"][0] )] )\n+            except Exception as e:\n+                raise e\n+\n+            with open(os.path.join(filepath,filename),\'w\') as f:\n+                f.write(urllib2.urlopen(entry["rawdata_msa"][0]).read())\n+        #print entry["rawdata_msa"]\n+        #print os.path.basename(entry["rawdata_msa"][0])\n+        #print filename\n+\n+if __name__ == "__main__":\n+    from optparse import OptionParser\n+\n+    usage = "usage: python %prog [options]\\n"\n+    parser = OptionParser(usage=usage)\n+    parser.add_option("-o", action="store", type="string", dest="o", default="output.html",\n+                      help="html output glycan summary file (output)")\n+    parser.add_option("--filepath", action="store", type="string", dest="filepath", default="msa_output",\n+                      help="galaxy file path to be prepended")\n+\n+    parser.add_option("-j", action="store", type="string", dest="j", default="output.json",\n+                      help="output glycan summary file (output)")\n+    parser.add_option("-s", action="store", type="string", dest="s", default="all",\n+                      help="species (all)")\n+    parser.add_option("-p", action="store", type="string", dest="p", default="all",\n+                      help="participating investigator (all)")\n+    parser.add_option("-g", action="store", type="string", dest="g", default="all",\n+                      help="glycan type (all)")\n+    parser.add_option("-c", action="store", type="string", dest="c", default="all",\n+                      help="cell type (all)")\n+    parser.add_option("-t", action="store_true", dest="t", default=False,\n+                      help="cell type (all)")\n+    (options, args) = parser.parse_args()\n+\n+    if options.t:\n+        #. for testing purposes read from example webpage rather than querying CFG\n+        #. only useful for initial testing. afterwards it will not filter and then will download all msa data (NOT IDEAL)\n+\ttestingfile="htmlfortesting.html"\n+        try:\n+            instream = file(testingfile, \'r\')\n+        except Exception as e:\n+           raise IOError(e, "the input file specified does not exist. Use -h flag for help")\n+        #. read example webpage using selections\n+\tm = instream.read() \n+    else:\n+        #. read webpage using selections\n+        m = mechanise_cfg_cells(options.s, options.p, options.g, options.c)\n+\n+\n+\n+    #. parse response for all useful data like links to msa\n+    s = get_data_from_soup(m)\n+    #. write out json of parsed data dictionary\n+    helper_write_to_json(s, options.j)\n+    #. write out html to specified dir\n+    options_dict={"species":options.s,"pi":options.p,"glycan":options.g,"cell":options.c}\n+    helper_write_to_html(s, options.o, options.filepath,options_dict)\n+    #. download the msa files and save\n+    download_and_save_msa(s,options.filepath)\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/getcfgcells.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/getcfgcells.xml Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,324 @@\n+<tool id="glytools_get_CFG_cell" name="GAP Get CFG cell" version="0.3">\n+\n+    <description>download msa entries from CFG</description>\n+    <requirements>\n+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>\n+    </requirements>\n+<stdio>\n+    <regex match="IOError" \n+           source="both" \n+           level="fatal" \n+           description="IOError" />\n+    <regex match="UserWarning: gzip transfer encoding is experimental" \n+           source="both" \n+           level="warning" \n+           description="Warning re use of gzip encoding" />\n+    <regex match="br.set_handle_gzip(True)" \n+           source="both" \n+           level="warning" \n+           description="Warning re use of gzip encoding" />\n+    <regex match="IOError" \n+           source="both" \n+           level="fatal" \n+           description="IOError" />\n+</stdio>\n+    <command interpreter="python"><![CDATA[ cfg_get_glycan_from_cells.py -s "$species" -p "$investigator" -g "$glycantype" -c "$celltype" -o "$html_file" --filepath "msa_output" ]]></command>\n+    <inputs>\n+        <param name="species" type="select" label="Species">\n+            <option value="Chinese Hamster" selected="false">Chinese Hamster</option>\n+            <option value="Human" selected="true">Human</option>\n+            <option value="Mouse" selected="false">Mouse</option>\n+            <option value="all" selected="false">all</option>\n+        </param>\n+        <param name="investigator" type="select" label="Investigator">\n+            <option value="all" selected="true">all</option>\n+            <option value="Agbandje-McKenna, Mavis" selected="false">\n+                Agbandje-McKenna, Mavis\n+            </option>\n+            <option value="Appelmelk, Ben J. " selected="false">\n+                Appelmelk, Ben J.\n+            </option>\n+            <option value="Bennett, Eric" selected="false">\n+                Bennett, Eric\n+            </option>\n+            <option value="Bochner, Bruce S." selected="false">\n+                Bochner, Bruce S.\n+            </option>\n+            <option value="Cheng, Pi-Wan" selected="false">\n+                Cheng, Pi-Wan\n+            </option>\n+            <option value="Contag, Christopher" selected="false">\n+                Contag, Christopher\n+            </option>\n+            <option value="Cook-Mills, Joan" selected="false">\n+                Cook-Mills, Joan\n+            </option>\n+            <option value="Crocker,Paul" selected="false">\n+                Crocker,Paul\n+            </option>\n+            <option value="Cummings,Richard D. " selected="false">\n+                Cummings,Richard D.\n+            </option>\n+            <option value="Dennis, James W." selected="false">\n+                Dennis, James W.\n+            </option>\n+            <option value="Dimitroff, Charles" selected="false">\n+                Dimitroff, Charles\n+            </option>\n+            <option value="Gordon, Siamon" selected="false">\n+                Gordon, Siamon\n+            </option>\n+            <option value="Henion, Timothy" selected="false">\n+                Henion, Timothy\n+            </option>\n+            <option value="Jackson, David " selected="false">\n+                Jackson, David\n+            </option>\n+            <option value="Jaye, David" selected="false">\n+                Jaye, David\n+            </option>\n+            <option value="Liu, FuTong" selected="false">\n+                Liu, FuTong\n+            </option>\n+            <option value="Mahal, Lara K." selected="false">\n+                Mahal, Lara K.\n+            </option>\n+            <option value="Merrill, Alfred" selected="false">\n+                Merrill, Alfred\n+            </option>\n+            <option value="Metcalfe, Dean D." selected="false">\n+                Metcalfe, Dean D.\n+            </option>\n+            <option value="Nitschke, Lars" selected="false">\n+                Nitschke, Lars\n+            </option>'..b'\n+                HL-60\n+            </option>\n+            <option value="HeLa EV2" selected="false">\n+                HeLa EV2\n+            </option>\n+            <option value="HeLa PF" selected="false">\n+                HeLa PF\n+            </option>\n+            <option value="Human Dermal Lymphatic Endothelial Cells (HDLEC) " selected="false">\n+                Human Dermal Lymphatic Endothelial Cells (HDLEC)\n+            </option>\n+            <option value="Human Prostate LNCaP Cells " selected="false">\n+                Human Prostate LNCaP Cells\n+            </option>\n+            <option value="Immunoglobulin (Plasma extract) " selected="false">\n+                Immunoglobulin (Plasma extract)\n+            </option>\n+            <option value="K562" selected="false">\n+                K562\n+            </option>\n+            <option value="KG-1a" selected="false">\n+                KG-1a\n+            </option>\n+            <option value="KG1a Cells" selected="false">\n+                KG1a Cells\n+            </option>\n+            <option value="Macrophages" selected="false">\n+                Macrophages\n+            </option>\n+            <option value="Mast Cells" selected="false">\n+                Mast Cells\n+            </option>\n+            <option value="Monocytes" selected="false">\n+                Monocytes\n+            </option>\n+            <option value="Murine mammary carcinoma" selected="false">\n+                Murine mammary carcinoma\n+            </option>\n+            <option value="Natural Killer Cells" selected="false">\n+                Natural Killer Cells\n+            </option>\n+            <option value="Natural killer cells" selected="false">\n+                Natural killer cells\n+            </option>\n+            <option value="Neurons" selected="false">\n+                Neurons\n+            </option>\n+            <option value="Neutrophils" selected="false">\n+                Neutrophils\n+            </option>\n+            <option value="Osteoclasts" selected="false">\n+                Osteoclasts\n+            </option>\n+            <option value="Peripheral Blood Mononuclear Cells (PBMC)" selected="false">\n+                Peripheral Blood Mononuclear Cells (PBMC)\n+            </option>\n+            <option value="RAW" selected="false">\n+                RAW\n+            </option>\n+            <option value="RAW 264.7 Cells" selected="false">\n+                RAW 264.7 Cells\n+            </option>\n+            <option value="SV40 transformed fibroblast cell line, NB324K" selected="false">\n+                SV40 transformed fibroblast cell line, NB324K\n+            </option>\n+            <option value="T-Cells" selected="false">\n+                T-Cells\n+            </option>\n+            <option value="THP-1" selected="false">\n+                THP-1\n+            </option>\n+            <option value="VG37" selected="false">\n+                VG37\n+            </option>\n+            <option value="WEHI 231 B Cells" selected="false">\n+                WEHI 231 B Cells\n+            </option>\n+            <option value="WEHI-3" selected="false">\n+                WEHI-3\n+            </option>\n+        </param>\n+    </inputs>\n+        <outputs>\n+        <data format="html" name="html_file" label="Summary_${tool.name}.html">\n+\t<discover_datasets pattern="__designation_and_ext__" directory="msa_output" visible="true" />\n+\t        </data>\n+\t</outputs>\n+    <help> <![CDATA[ \n+.. class:: infomark\n+\n+**What this tool does**\n+\n+This tool will request Annotated Mass spec (msa) data from the Consortium for Functional Glycomics. \n+\n+.. class:: infomark\n+\n+**Input**\n+\n+Your choice of Species, Participating Investigator, Glycan type and Cell type as per the CFG request page.\n+\n+----\n+\n+.. class:: infomark\n+\n+**Output**\n+\n+HTML summary of retrieved information (Note links in html do not function within Galaxy).\n+\n+A number of autodiscovered msa datasets (refresh browser if necessary).\n+\n+\n+]]>\n+    </help>\n+\n+</tool>\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/htmlfortesting.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/htmlfortesting.html Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,20650 @@\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n+ <!--\n+## Site Configuration\n+## @siteName\tFG\n+## @scope\t\tSite\n+## @adaption\ttaken from ABA by JDG@NPG 2006\n+-->\n+ <!-- used in ${common}/includes/separator.fhtml -->\n+ <!-- used in ${common}/includes/clearfloats.fhtml -->\n+ <!-- used in ${common}/includes/global.backtotop.fhtml -->\n+ <!-- SET THE BASE FOLDERS FOR THE SITE -->\n+ <head>\n+  <title>\n+   Consortium for Functional Glycomics\n+  </title>\n+  <!-- metadata and links -->\n+  <meta http-equiv="Content-Style-Type" content="text/css" />\n+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n+  <link rel="home" href="/fg/index.shtml" title="home" />\n+  <!-- provide correct meta robots information - all pages except TOC pages (AOP, Issue, Focus (web and other), Supplements) use default "noarchive" type -->\n+  <meta name="robots" content="noarchive" />\n+  <!-- end metadata and links -->\n+  <meta name="keywords" content="" />\n+  <meta name="description" content="" />\n+  <style type="text/css" media="screen, projection">\n+   <!--/*-->\n+   <![CDATA[/*&gt;&lt;!--*/\n+\t\t    @import "/fg/style/layout.css";\n+\t\t    @import "/fg/style/site.css";\n+\t\t    @import "/fg/style/header_footer_smallfonts.css";\n+\t\t\t@import "/fg/style/restrict_width/930px.css";/* do not edit this stylesheet */\n+/*]]>\n+   */--&gt;\n+  </style>\n+  <!-- IE specific scripts - min/max fix -->\n+  <!--[if lte IE 6]&gt;\n+\t&lt;script type="text/javascript" src="/fg/scripts/minmax.js"&gt;&lt;/script&gt;\n+&lt;![endif]-->\n+  <!-- end IE specific scripts -->\n+  <style type="text/css" media="screen, projection">\n+   <!--/*-->\n+   <![CDATA[/*&gt;&lt;!--*/\r\n+@import "/glycomics/common/css/general.css";\r\n+@import "/glycomics/common/css/jquery-ui-1.8.16.custom.css";\r\n+@import "/glycomics/common/css/jquery.bubblepopup.v2.3.1.css";\r\n+label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; };\r\n+/*]]>\n+   */--&gt;\n+  </style>\n+  <script type="text/javascript" language="javascript" src="/static/javascript/css_sidemenu.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/static/javascript/openWindow.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/AnchorPosition.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/CalendarPopup.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/date.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/PopupWindow.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/popupWin.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/details3.js">\n+  </script>\n+  <script type="text/javascript" src="/glycomics/common/jquery/jquery-1.6.4.min.js" language="javascript">\n+  </script>\n+  <script type="text/javascript" src="/glycomics/common/jquery/jquery.validate.js" language="javascript">\n+  </script>\n+ </head>\n+ <body class="www-nature-com-fg" id="info">\n+  <!-- header -->\n+  <div id="head-er">\n+   <div class="header-nonad-wrapper" id="top">\n+    <div class="accessibility-login-wrap">\n+     <div class="accessibility-login">\n+      <ul class="jumplinks">\n+       <li class="first">\n+        <a href="#content">\n+         Jump&nbsp;to&nbsp;main&nbsp;content\n+        </a>\n+       </li>\n+       <li>\n+        <a href="#main-journal-nav">\n+         Jump&nbsp;to&nbsp;navigation\n+        </a>\n+       </li>\n+      </ul>\n+      <span class="cleardiv">\n+       <!-- -->\n+      </span>\n+     </div>\n+    </div>\n+    <span class="cleardiv">\n+     <!-- -->\n+    </span>\n+    <hr />\n+    <div class="ima'..b'               <img src="/glycomics/common/images/coreC/MSA.jpg" alt="View Mass Peak file" />\n+                </a>\n+               </td>\n+               <td class="glycoEnzymeTablePresentation" width="50">\n+                <a href="/glycomics/publicdata/viewGlycoProfilingSampleData.jsp?sampleKey=951" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'dat_button01\',\'\', \'/coreCStatic/Library/images/dat_button_f2.gif\', 1)">\n+                 <img src="/coreCStatic/Library/images/dat_button.gif" alt="" name="dat_button&lt;01  width=" />\n+                 &lt;01  width="40" height="40" border="0" id="dat_button" /&gt;\n+                </a>\n+               </td>\n+               <td class="glycoEnzymeTablePresentation" width="50">\n+                &nbsp;\n+               </td>\n+               <td class="glycoEnzymeTablePresentation" width="50">\n+                <a href="/glycomics/publicdata/viewInApplet.jsp?datFileNumber=10000549">\n+                 <img src="/glycomics/common/images/spectra_40x40_bw.gif" alt="Interactive Mass Spectrum Viewer" />\n+                </a>\n+               </td>\n+              </tr>\n+             </table>\n+            </td>\n+            <td>\n+             <a href="/glycomics/ResourceServlet?operation=viewById&amp;resourceRequestId=cfg_rRequest_1477&amp;View=View">\n+              cfg_rRequest_1477\n+             </a>\n+            </td>\n+           </tr>\n+          </table>\n+         </td>\n+        </tr>\n+        <tr>\n+         <td class="webSiteBodyText" style="padding:4px;width =">\n+         </td>\n+        </tr>\n+       </table>\n+      </div>\n+     </div>\n+    </div>\n+    <!-- CLOSEs CONTENT-JOURNALNAV DIV -->\n+   </div>\n+  </div>\n+  <p class="back-to-top hidden">\n+   <a href="#top">\n+    Top\n+    <span class="hidden">\n+     of page\n+    </span>\n+   </a>\n+  </p>\n+  <div id="foot-er" class="footer">\n+   <div id="footer-journal">\n+    <div class="footer-constrain clearfix">\n+     <p class="journal-name">\n+      Functional Glycomics Gateway\n+     </p>\n+     <p class="eissn">\n+      <abbr title="International Standard Serial Number">\n+       ISSN\n+      </abbr>\n+      <span class="hidden">\n+       :\n+      </span>\n+      1752-184X\n+     </p>\n+     <span class="cleardiv">\n+      <!-- -->\n+     </span>\n+    </div>\n+    <span class="cleardiv">\n+     <!-- -->\n+    </span>\n+   </div>\n+   <div id="footer-copyright">\n+    <div class="footer-constrain">\n+     <p>\n+      &#169; 2010 Functional Glycomics Gateway - All Rights Reserved |\n+      <a href="/fg/privacy_terms.shtml">\n+       Privacy policy &amp; Terms of Use\n+      </a>\n+     </p>\n+    </div>\n+   </div>\n+  </div>\n+  <!-- webtrends Version: 8.5.0 -->\n+  <script src="/static/javascript/webtrends.js" type="text/javascript">\n+  </script>\n+  <script type="text/javascript">\n+   &lt;!--//--&gt;&lt;![CDATA[/ /&gt;&lt;!-- \n+\t\tvar _tag=new WebTrends(); \n+\t\t_tag.dcsGetId(); \n+//--&gt;&lt;!]]&gt;\n+  </script>\n+  <script type="text/javascript">\n+   &lt;!--//--&gt;&lt;![CDATA[/ /&gt;&lt;!-- \n+\t\t// Add custom parameters here. \n+\t\t// _tag.DCSext.param_name=param_value; \n+\t\t_tag.dcsCollect(); \n+//--&gt;&lt;!]]&gt;\n+  </script>\n+  <noscript>\n+   <div>\n+    <img alt="" id="DCSIMG" width="1" height="1" src="http://statse.webtrendslive.com/dcsc2bh0q10000cprjxnf6sz5_6h4b/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=8.5.0" />\n+   </div>\n+  </noscript>\n+  <!-- Google Analytics -->\n+  <script type="text/javascript">\n+   var _gaq = _gaq || [];\n+  _gaq.push([\'_setAccount\', \'UA-23107886-2\']);\n+  _gaq.push([\'_trackPageview\']);\n+\n+  (function() {\n+    var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;\n+    ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n+    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n+  })();\n+  </script>\n+  <!-- ================ -->\n+  <!--  END OF CONTENT  -->\n+  <!-- ================ -->\n+ </body>\n+</html>\n+\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/short-htmlfortesting.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/short-htmlfortesting.html Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,901 @@\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n+ <!--\n+## Site Configuration\n+## @siteName\tFG\n+## @scope\t\tSite\n+## @adaption\ttaken from ABA by JDG@NPG 2006\n+-->\n+ <!-- used in ${common}/includes/separator.fhtml -->\n+ <!-- used in ${common}/includes/clearfloats.fhtml -->\n+ <!-- used in ${common}/includes/global.backtotop.fhtml -->\n+ <!-- SET THE BASE FOLDERS FOR THE SITE -->\n+ <head>\n+  <title>\n+   Consortium for Functional Glycomics\n+  </title>\n+  <!-- metadata and links -->\n+  <meta http-equiv="Content-Style-Type" content="text/css" />\n+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n+  <link rel="home" href="/fg/index.shtml" title="home" />\n+  <!-- provide correct meta robots information - all pages except TOC pages (AOP, Issue, Focus (web and other), Supplements) use default "noarchive" type -->\n+  <meta name="robots" content="noarchive" />\n+  <!-- end metadata and links -->\n+  <meta name="keywords" content="" />\n+  <meta name="description" content="" />\n+  <style type="text/css" media="screen, projection">\n+   <!--/*-->\n+   <![CDATA[/*&gt;&lt;!--*/\n+\t\t    @import "/fg/style/layout.css";\n+\t\t    @import "/fg/style/site.css";\n+\t\t    @import "/fg/style/header_footer_smallfonts.css";\n+\t\t\t@import "/fg/style/restrict_width/930px.css";/* do not edit this stylesheet */\n+/*]]>\n+   */--&gt;\n+  </style>\n+  <!-- IE specific scripts - min/max fix -->\n+  <!--[if lte IE 6]&gt;\n+\t&lt;script type="text/javascript" src="/fg/scripts/minmax.js"&gt;&lt;/script&gt;\n+&lt;![endif]-->\n+  <!-- end IE specific scripts -->\n+  <style type="text/css" media="screen, projection">\n+   <!--/*-->\n+   <![CDATA[/*&gt;&lt;!--*/\n+@import "/glycomics/common/css/general.css";\n+@import "/glycomics/common/css/jquery-ui-1.8.16.custom.css";\n+@import "/glycomics/common/css/jquery.bubblepopup.v2.3.1.css";\n+label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; };\n+/*]]>\n+   */--&gt;\n+  </style>\n+  <script type="text/javascript" language="javascript" src="/static/javascript/css_sidemenu.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/static/javascript/openWindow.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/AnchorPosition.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/CalendarPopup.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/date.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/calendar/PopupWindow.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/popupWin.js">\n+  </script>\n+  <script type="text/javascript" language="javascript" src="/glycomics/common/javascript/details3.js">\n+  </script>\n+  <script type="text/javascript" src="/glycomics/common/jquery/jquery-1.6.4.min.js" language="javascript">\n+  </script>\n+  <script type="text/javascript" src="/glycomics/common/jquery/jquery.validate.js" language="javascript">\n+  </script>\n+ </head>\n+ <body class="www-nature-com-fg" id="info">\n+  <!-- header -->\n+  <div id="head-er">\n+   <div class="header-nonad-wrapper" id="top">\n+    <div class="accessibility-login-wrap">\n+     <div class="accessibility-login">\n+      <ul class="jumplinks">\n+       <li class="first">\n+        <a href="#content">\n+         Jump&nbsp;to&nbsp;main&nbsp;content\n+        </a>\n+       </li>\n+       <li>\n+        <a href="#main-journal-nav">\n+         Jump&nbsp;to&nbsp;navigation\n+        </a>\n+       </li>\n+      </ul>\n+      <span class="cleardiv">\n+       <!-- -->\n+      </span>\n+     </div>\n+    </div>\n+    <span class="cleardiv">\n+     <!-- -->\n+    </span>\n+    <hr />\n+    <div class="image-user'..b'          <a href="/coreCStatic/allmsdfiles/10000205.msd">\n+                 <img src="/glycomics/common/images/coreC/MSD.jpg" alt="View Mass Spectrum data as text" />\n+                </a>\n+               </td>\n+               <td class="glycoEnzymeTablePresentation" width="50">\n+                &nbsp;\n+               </td>\n+               <td class="glycoEnzymeTablePresentation" width="50">\n+                <a href="/glycomics/publicdata/viewGlycoProfilingSampleData.jsp?sampleKey=680" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'dat_button01\',\'\', \'/coreCStatic/Library/images/dat_button_f2.gif\', 1)">\n+                 <img src="/coreCStatic/Library/images/dat_button.gif" alt="" name="dat_button&lt;01  width=" />\n+                 &lt;01  width="40" height="40" border="0" id="dat_button" /&gt;\n+                </a>\n+               </td>\n+               <td class="glycoEnzymeTablePresentation" width="50">\n+                &nbsp;\n+               </td>\n+               <td class="glycoEnzymeTablePresentation" width="50">\n+                &nbsp;\n+               </td>\n+              </tr>\n+             </table>\n+            </td>\n+            <td>\n+             <a href="/glycomics/ResourceServlet?operation=viewById&amp;resourceRequestId=cfg_rRequest_1185&amp;View=View">\n+              cfg_rRequest_1185\n+             </a>\n+            </td>\n+           </tr>\n+\n+\n+\n+\n+\n+\n+\n+\n+          </table>\n+         </td>\n+        </tr>\n+        <tr>\n+         <td class="webSiteBodyText" style="padding:4px;width =">\n+         </td>\n+        </tr>\n+       </table>\n+      </div>\n+     </div>\n+    </div>\n+    <!-- CLOSEs CONTENT-JOURNALNAV DIV -->\n+   </div>\n+  </div>\n+  <p class="back-to-top hidden">\n+   <a href="#top">\n+    Top\n+    <span class="hidden">\n+     of page\n+    </span>\n+   </a>\n+  </p>\n+  <div id="foot-er" class="footer">\n+   <div id="footer-journal">\n+    <div class="footer-constrain clearfix">\n+     <p class="journal-name">\n+      Functional Glycomics Gateway\n+     </p>\n+     <p class="eissn">\n+      <abbr title="International Standard Serial Number">\n+       ISSN\n+      </abbr>\n+      <span class="hidden">\n+       :\n+      </span>\n+      1752-184X\n+     </p>\n+     <span class="cleardiv">\n+      <!-- -->\n+     </span>\n+    </div>\n+    <span class="cleardiv">\n+     <!-- -->\n+    </span>\n+   </div>\n+   <div id="footer-copyright">\n+    <div class="footer-constrain">\n+     <p>\n+      &#169; 2010 Functional Glycomics Gateway - All Rights Reserved |\n+      <a href="/fg/privacy_terms.shtml">\n+       Privacy policy &amp; Terms of Use\n+      </a>\n+     </p>\n+    </div>\n+   </div>\n+  </div>\n+  <!-- webtrends Version: 8.5.0 -->\n+  <script src="/static/javascript/webtrends.js" type="text/javascript">\n+  </script>\n+  <script type="text/javascript">\n+   &lt;!--//--&gt;&lt;![CDATA[/ /&gt;&lt;!-- \n+\t\tvar _tag=new WebTrends(); \n+\t\t_tag.dcsGetId(); \n+//--&gt;&lt;!]]&gt;\n+  </script>\n+  <script type="text/javascript">\n+   &lt;!--//--&gt;&lt;![CDATA[/ /&gt;&lt;!-- \n+\t\t// Add custom parameters here. \n+\t\t// _tag.DCSext.param_name=param_value; \n+\t\t_tag.dcsCollect(); \n+//--&gt;&lt;!]]&gt;\n+  </script>\n+  <noscript>\n+   <div>\n+    <img alt="" id="DCSIMG" width="1" height="1" src="http://statse.webtrendslive.com/dcsc2bh0q10000cprjxnf6sz5_6h4b/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=8.5.0" />\n+   </div>\n+  </noscript>\n+  <!-- Google Analytics -->\n+  <script type="text/javascript">\n+   var _gaq = _gaq || [];\n+  _gaq.push([\'_setAccount\', \'UA-23107886-2\']);\n+  _gaq.push([\'_trackPageview\']);\n+\n+  (function() {\n+    var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;\n+    ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n+    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n+  })();\n+  </script>\n+  <!-- ================ -->\n+  <!--  END OF CONTENT  -->\n+  <!-- ================ -->\n+ </body>\n+</html>\n+\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg/templates/base.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg/templates/base.html Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+</head>
+<body>
+
+<h1>{{title}}</h1>
+<h2> Species : {{species}} </h2>
+<h2> PI: {{investigator}} </h2>
+<h2> Glycan type : {{glycan}} </h2>
+<h2> Cell type : {{cell}}</h2> 
+
+* Galaxy note - each msa file is exposed as a new dataset in your history, thus links in this html file do not work in Galaxy. You may need to refresh your history to see all datasets.
+<ul>
+    {% for item in items %}
+    <li><a href="{{ item.href }}">{{ item.caption }}</a></li>
+    {% endfor %}
+</ul>
+
+
+</body>
+</html>
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/NOTES
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/NOTES Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,25 @@
+
+# Glycan array Notes on Primary screen html
+#
+idiosynchrocy of the site is that selections of the array type unselect lectin type selections. 
+the site says search by sample or array type but does actually support and (although there are some uncheck issues). 
+
+# Notes on Returned Selection html
+
+class="data" is 'conclusive while class="inconclusive" is not. 
+
+## include inconclusive data 
+there is often so much though!!
+need to turn this off by default . 
+incon is off by default. Use -i to turn back on. (this renders options.d ineffective and it has been removed)
+
+## Configuring Galaxy so a tool can properly generate an Excel file
+https://wiki.galaxyproject.org/Admin/FAQ
+
+Is there a way to force the mime type of the downloaded files ? eg an application generates a binary excel file and the mime type is always binary, and the file extension is always "data.ext". This causes problems when the user tries to view ( click the eye icon ) or download ( click the 'save' link ). Changing the file type to "excel" doesn't help, and the user is forced to save the file on his desktop, rename the file to an XLS extension and then open it. 
+
+In your universe_wsgi.ini file add this line to [galaxy:datatypes]...
+
+xls = galaxy.datatypes.data:Data,application/vnd.ms-excel
+
+...and set the output format of your tool to xls.
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/README_CFG_array.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/README_CFG_array.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,46 @@
+[TOC]
+
+# 1. cfg_get_glycan_array_data.py
+
+Retrieve glycan array data from the CFG.
+
+With focus on retrieving the xls data and also pull the metadata.
+
+## Works with Galaxy?
+
+Not properly tested yet!! The xml in this directory is not correct.
+
+## Command line usage
+
+**NOT RECOMMENDED** This will download all xls and will take a while.
+```
+../../virtualpy/bin/activate
+python cfg_get_glycan_array_data.py
+```
+
+**RECOMMENDED** This will get all metadata and not download xls
+```
+../../virtualpy/bin/activate
+python cfg_get_glycan_array_data.py -d
+```
+
+This metadata can be viewed using the [CFG glycan array explorer](https://bitbucket.org/rxncor/cfg-data-chart)
+
+## Help
+```
+../../virtualpy/bin/activate
+python cfg_get_glycan_from_cells.py -h
+```
+
+## Unit Testing?
+Not yet! Although some testing has been done using *.html in ./info and ./templates
+Also passed json metadata to [CFG glycan array explorer](https://bitbucket.org/rxncor/cfg-data-chart)
+
+In principle:
+
+```
+../../virtualpy/bin/activate
+python test_cfg_get_glycan_from_cells.py
+
+```
+
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/cfg_get_glycan_array_data.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/cfg_get_glycan_array_data.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,491 @@\n+__author__ = "Chris Barnett"\n+__version__ = "0.1.1"\n+__license__ = "SCRU"\n+\n+from BeautifulSoup import BeautifulSoup\n+import mechanize\n+\n+\n+class PrettifyHandler(mechanize.BaseHandler):\n+    def http_response(self, request, response):\n+        if not hasattr(response, "seek"):\n+            response = mechanize.response_seek_wrapper(response)\n+        # only use BeautifulSoup if response is html\n+        if response.info().dict.has_key(\'content-type\') and (\'html\' in response.info().dict[\'content-type\']):\n+            soup = BeautifulSoup(response.get_data())\n+            response.set_data(soup.prettify())\n+        return response\n+\n+\n+def mechanise_cfg_array(sample, arraytypeversion, page=\'http://www.functionalglycomics.org/glycomics/publicdata/primaryscreen.jsp\', debug=False):\n+    """\n+    Use mechanise to submit input glycan and formats to the new converter tool at RINGS\n+    """\n+    import mechanize\n+    import cookielib\n+\n+    # create a Browser\n+    br = mechanize.Browser()\n+    br.add_handler(PrettifyHandler())\n+\n+    #  handle cookies - Cookie Jar\n+    cj = cookielib.LWPCookieJar()\n+    br.set_cookiejar(cj)\n+\n+    # Browser options\n+    br.set_handle_equiv(True)\n+    br.set_handle_gzip(True)\n+    br.set_handle_redirect(True)\n+    br.set_handle_referer(True)\n+    br.set_handle_robots(False)\n+\n+    # Follows refresh 0 but not hangs on refresh > 0\n+    br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1)\n+\n+    # Want debugging messages?\n+    br.set_debug_http(debug)\n+    br.set_debug_redirects(debug)\n+    br.set_debug_responses(debug)\n+\n+    br.addheaders = [(\'User-agent\',\n+                      \'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1\')]\n+\n+    # Open site\n+    #page = \'http://www.functionalglycomics.org/glycomics/common/jsp/samples/searchSample.jsp?templateKey=2&12=CellType&operation=refine\'\n+    \n+    br.open(page)\n+\n+    # Show the response headers\n+    response_info = br.response().info()\n+\n+    # select the input form\n+    br.select_form(nr=0)\n+#    for form in br.forms():\n+#        print "Form name:", form.name\n+#        print form\n+\n+#Form name: pspresentation\n+#<pspresentation POST http://www.functionalglycomics.org/glycomics/publicdata/selectedScreens.jsp application/x-www-form-urlencoded\n+#  <CheckboxControl(animalLectins=[true])>\n+#    <CheckboxControl(selectedSetsToDisplay=[cTypeLectins, iTypeLectins, sTypeLectins, otherAnimalLectins, plantLectins, antiBodies, other, cellsOrganisms, v1, v2, v3, pv1, pv2, pv21, pv3, pv31, pv32, pv4, pv41, pv42, pv5, pv51, pv52, bactv1])>>\n+#\n+    #. select appropriate input on form\n+    control = br.form.find_control("selectedSetsToDisplay")\n+    # must select sample and arraytype all at once\n+    #sample = ["cTypeLectins", "iTypeLectins", "sTypeLectins", "otherAnimalLectins", "plantLectins", "antiBodies", "other", "cellsOrganisms"]\n+    #arraytypeversion = ["v1", "v2", "v3", "pv1", "pv2", "pv21", "pv3", "pv31", "pv32", "pv4", "pv41", "pv42", "pv5", "pv51", "pv52", "bactv1"]\n+    #sample = ["cTypeLectins"]\n+    #arraytypeversion = ["v1"]\n+    mergedselections = sample + arraytypeversion\n+    br[control.name] = mergedselections\n+    #print control\n+#              <input type="radio" name="dataNature" value="DataOnly"/> Data only\n+#                          &nbsp;\n+#                                  <input type="radio" name="dataNature" value="InconclusiveOnly"/> Inconclusive Only\n+#                                          &nbsp;\n+#                                                  <input type="radio" name="dataNature" value="All"/>All\n+#                                                      </td></tr>\n+    #. cannot select radio button at present. All data will be returned\n+#    print br.find_control(type="radio")\n+#    radiocontrol=br.find_control("dataNature")\n+#    datastatus = "InconclusiveOnly"\n+#    br[radiocontrol.name] = datastatus\n+    br.submit()\n+\n+    response = br'..b'ion as e:\n+                raise e\n+\n+            with open(os.path.join(filepath,filename),\'w\') as f:\n+                f.write(urllib2.urlopen(entry["rawdatalink"][0]).read())\n+        #print entry["rawdata_msa"]\n+        #print os.path.basename(entry["rawdata_msa"][0])\n+        #print filename\n+\n+if __name__ == "__main__":\n+    from optparse import OptionParser\n+\n+    usage = "usage: python %prog [options]\\n"\n+    parser = OptionParser(usage=usage)\n+    parser.add_option("-o", action="store", type="string", dest="o", default="array_output.html",\n+                      help="html output glycan summary file (output)")\n+    parser.add_option("--filepath", action="store", type="string", dest="filepath", default="xls_output",\n+                      help="galaxy file path to be prepended")\n+\n+    parser.add_option("-j", action="store", type="string", dest="j", default="array_output.json",\n+                      help="output glycan summary file (output)")\n+    parser.add_option("-s", action="store", type="string", dest="s", default="all",\n+                      help="sample type (all)")\n+    parser.add_option("-g", action="store", type="string", dest="g", default="all",\n+                      help="glycan array version (all)")\n+    parser.add_option("-i", action="store_true", dest="i", default=False,\n+                      help="download inconclusive data")\n+    parser.add_option("-t", action="store_true", dest="t", default=False,\n+                      help="parse local file for testing purposes")\n+    parser.add_option("-d", action="store_true", dest="d", default=False,\n+                      help="do not download array xls")\n+    (options, args) = parser.parse_args()\n+\n+\n+    sampleall = ["cTypeLectins", "iTypeLectins", "sTypeLectins", "otherAnimalLectins", "plantLectins", "antiBodies", "other", "cellsOrganisms"]\n+    arrayversionall = ["v1", "v2", "v3", "pv1", "pv2", "pv21", "pv3", "pv31", "pv32", "pv4", "pv41", "pv42", "pv5", "pv51", "pv52", "bactv1"]\n+\n+    if options.s=="all":\n+        options.s=sampleall\n+    else:\n+        #. clean up sample options and confirm they are legitimate\n+        checksampleoptions=options.s.strip().replace(" ", "").split(",")\n+        if set(checksampleoptions).issubset(set(sampleall)):\n+           options.s=list(set(checksampleoptions)) # any duplicates removed\n+        else:\n+           raise IOError("sample input invalid")\n+\n+    if options.g=="all":\n+        options.g=arrayversionall\n+    else:\n+        #. clean up array options and confirm they are legitimate\n+        checkarrayoptions=options.g.strip().replace(" ", "").split(",")\n+        #checkarrayoptions=options.g.strip().split(",")\n+        if set(checkarrayoptions).issubset(set(arrayversionall)):\n+           options.g=list(set(checkarrayoptions)) # any duplicates removed\n+        else:\n+           raise IOError("array version input invalid")\n+\n+    #. read webpage using selections\n+    m = mechanise_cfg_array(options.s, options.g)\n+    #print m\n+\n+#    testingfile="info/Selected Primary Screens.html"\n+#    try:\n+#        instream = file(testingfile, \'r\')\n+#    except Exception as e:\n+#       raise IOError(e, "the input file specified does not exist. Use -h flag for help")\n+#    #. read example output webpage\n+#    m = instream.read()\n+\n+    #. parse response for all useful data like links to msa\n+    s = get_data_from_soup(m)\n+    #exit(0)\n+\n+    #. write out json of parsed data dictionary\n+    helper_write_to_json(s[0]+s[1], options.j) # write out inconclusive data regardless\n+\n+    #. are we downloading the inconclusive data?\n+    options_dict={"sample":options.s,"arrayversion":options.g,"keepinconclusive":options.i}\n+    if options.i:\n+        dataset=s[0]+s[1]\n+    else:\n+        dataset=s[0]\n+    #. write out html to specified dir\n+    helper_write_to_html(dataset, options.o, options.filepath,options_dict)\n+    #. download the xls files and save\n+    if not options.d:\n+        download_and_save_xls(dataset,options.filepath)\n+\n+\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/getcfgarray.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/getcfgarray.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,95 @@
+<tool id="glytools_get_CFG_array" name="GAP Get CFG array" version="0.1.1">
+
+    <description> download glycan metadata (and xls) from CFG</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements>
+<stdio>
+    <regex match="IOError" 
+           source="both" 
+           level="fatal" 
+           description="IOError" />
+    <regex match="UserWarning: gzip transfer encoding is experimental" 
+           source="both" 
+           level="warning" 
+           description="Warning re use of gzip encoding" />
+    <regex match="br.set_handle_gzip(True)" 
+           source="both" 
+           level="warning" 
+           description="Warning re use of gzip encoding" />
+    <regex match="IOError" 
+           source="both" 
+           level="fatal" 
+           description="IOError" />
+</stdio>
+
+
+    <command interpreter="python"><![CDATA[  cfg_get_glycan_array_data.py -s "$species" -g "$glycanarrayversion" -i -j "$json_file" -o "$html_file" -d --filepath "xls_output" ]]></command>
+    <inputs>
+        <param name="species" type="select" label="Species"  >
+            <option value="cTypeLectins" selected="true">cTypeLectins</option>
+            <option value="iTypeLectins" selected="false">iTypeLectins</option>
+            <option value="sTypeLectins" selected="false">sTypeLectins</option>
+            <option value="otherAnimalLectins" selected="false">otherAnimalLectins</option>
+            <option value="plantLectins" selected="false">plantLectins</option>
+            <option value="antiBodies" selected="false">antiBodies</option>
+            <option value="other" selected="false">other</option>
+            <option value="cellsOrganisms" selected="false">cellsOrganisms</option>
+            <option value="all" selected="false">all</option>
+        </param>
+        <param name="glycanarrayversion" type="select" label="Glycan Array Version">
+            <option value="v1" selected="false">v1</option>
+            <option value="v2" selected="false">v2</option>
+            <option value="v3" selected="false">v3</option>
+            <option value="pv1" selected="false">pv1</option>
+            <option value="pv2" selected="false">pv2</option>
+            <option value="pv21" selected="false">pv21</option>
+            <option value="pv3" selected="false">pv3</option>
+            <option value="pv31" selected="false">pv31</option>
+            <option value="pv32" selected="false">pv32</option>
+            <option value="pv4" selected="false">pv4</option>
+            <option value="pv41" selected="false">pv41</option>
+            <option value="pv42" selected="false">pv42</option>
+            <option value="pv5" selected="false">pv5</option>
+            <option value="pv51" selected="false">pv51</option>
+            <option value="pv52" selected="false">pv52</option>
+            <option value="bactv1" selected="false">bactv1</option>
+            <option value="all" selected="true">all</option>
+
+        </param>
+    </inputs>
+    <outputs>
+        <data format="html" name="html_file" label="Summary_${tool.name}.html"/>
+        <data format="txt" name="json_file" label="Summary_${tool.name}.json"/>
+    </outputs>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool download the metadata from the glycan array data available at the CFG.
+
+.. class:: infomark
+
+**Input**
+
+Your choice of Species and Glycan Array Type.
+
+----
+
+.. class:: infomark
+
+**Output**
+
+HTML summary of retrieved information (Note links in html do not function within Galaxy).
+
+JSON summary of glycan array metadata. 
+
+xls data (not yet available in Galaxy) 
+
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/NOTES
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/NOTES Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,10 @@
+
+
+#Notes on Primary screen html
+#
+idiosynchrocy of the site is that selections of the array type unselect lectin type selections. 
+the site says search by sample or array type but does actually support and (although there are some uncheck issues). 
+
+# Notes on Returned Selection html
+
+class="data" is 'conclusive while class="inconclusive" is not. 
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen.html Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,570 @@\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><!--\n+## Site Configuration\n+## @siteName\tFG\n+## @scope\t\tSite\n+## @adaption\ttaken from ABA by JDG@NPG 2006\n+--><!-- used in ${common}/includes/separator.fhtml --><!-- used in ${common}/includes/clearfloats.fhtml --><!-- used in ${common}/includes/global.backtotop.fhtml --><!-- SET THE BASE FOLDERS FOR THE SITE --><head>\n+\n+<title>Primary Screen</title>\n+\n+\n+\t\n+\t\n+\t\n+\t<!-- metadata and links -->\n+<meta http-equiv="Content-Style-Type" content="text/css">\n+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">\n+\n+<link rel="home" href="http://www.functionalglycomics.org/fg/index.shtml" title="home">\n+\n+<!-- provide correct meta robots information - all pages except TOC pages (AOP, Issue, Focus (web and other), Supplements) use default "noarchive" type -->\n+\n+<meta name="robots" content="noarchive">\n+\n+\n+<!-- end metadata and links -->\n+\n+<meta name="keywords" content="">\n+<meta name="description" content="">\n+\n+<style type="text/css" media="screen, projection"><!--/*--><![CDATA[/*><!--*/\n+\t\t    @import "/fg/style/layout.css";\n+\t\t    @import "/fg/style/site.css";\n+\t\t    @import "/fg/style/header_footer_smallfonts.css";\n+\t\t\t@import "/fg/style/restrict_width/930px.css";/* do not edit this stylesheet */\n+/*]]>*/--></style>\n+\n+<!-- IE specific scripts - min/max fix -->\n+<!--[if lte IE 6]>\n+\t<script type="text/javascript" src="/fg/scripts/minmax.js"></script>\n+<![endif]-->\n+<!-- end IE specific scripts -->\n+\n+<style type="text/css" media="screen, projection"><!--/*--><![CDATA[/*><!--*/\n+@import "/glycomics/common/css/general.css";\n+@import "/glycomics/common/css/jquery-ui-1.8.16.custom.css";\n+@import "/glycomics/common/css/jquery.bubblepopup.v2.3.1.css";\n+label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; };\n+/*]]>*/--></style>\n+\n+<script src="Primary%20Screen_files/ga.js" async="" type="text/javascript"></script><script type="text/javascript" language="javascript" src="Primary%20Screen_files/css_sidemenu.js"></script>\n+<script type="text/javascript" language="javascript" src="Primary%20Screen_files/openWindow.js"></script>\n+<script type="text/javascript" language="javascript" src="Primary%20Screen_files/AnchorPosition.js"></script>\n+<script type="text/javascript" language="javascript" src="Primary%20Screen_files/CalendarPopup.js"></script>\n+<script type="text/javascript" language="javascript" src="Primary%20Screen_files/date.js"></script>\n+<script type="text/javascript" language="javascript" src="Primary%20Screen_files/PopupWindow.js"></script>\n+<script type="text/javascript" language="javascript" src="Primary%20Screen_files/popupWin.js"></script>\n+<script type="text/javascript" language="javascript" src="Primary%20Screen_files/details3.js"></script>\n+<script type="text/javascript" src="Primary%20Screen_files/jquery-1.js" language="javascript"></script>\n+<script type="text/javascript" src="Primary%20Screen_files/jquery.js" language="javascript"></script>\n+\n+\n+</head>\n+\n+<body class="www-nature-com-fg" id="info">\n+\n+<!-- header -->\n+<div id="head-er">\n+\t<div class="header-nonad-wrapper" id="top">\n+\t\t<div class="accessibility-login-wrap">\n+\t\t\t<div class="accessibility-login">\n+\t\t\t\t<ul class="jumplinks">\n+\t\t\t\t\t<li class="first"><a href="#content">Jump&nbsp;to&nbsp;main&nbsp;content</a></li>\n+\t\t\t\t\t<li><a href="#main-journal-nav">Jump&nbsp;to&nbsp;navigation</a></li>\n+\t\t\t\t</ul>\n+\t\t\t\t\n+<span class="cleardiv"><!-- --></span>\n+\n+\t\t\t</div>\n+\t\t</div>\n+\n+\t\t\n+<span class="cleardiv"><!-- --></span>\n+\n+\t\t\n+<hr>\n+\n+\n+\t\t<div class="image-user-services-wrap">\n+\t\t\t<div class="image-user-services">\n+\t\t\t\t<a href="http://www.functionalglycomics.org/fg"><img src="Primary%20Screen_files/journal_header.gif" class="journal-header" alt="Functional Glycomics homepage"></a>\n+\t\t\t\t\n+<span class="cleardiv"><!-- --></spa'..b'<tr>\n+\t\t\t\t\t\t<td class="webSiteBodyGreenText" colspan="2">\n+                            <a href="http://www.functionalglycomics.org/glycomics/common/jsp/resource/existingFilesForRequest.jsp?requserlogin=rubendonis&amp;resReqKey=1001109&amp;rrid=cfg_rRequest_1336&amp;projectDesc=To%20provide%20an%20interface%20%20to%20upload%20data%20collected%20on%20influenza%20virus%20receptor%20specficity%20with%20the%20custon%20CDC%20array&amp;showDelete=true&amp;showMakePublic=true">\n+                                Data from glycan arrays supplied to Centers for Disease Control</a>\n+                        </td>\n+\t\t\t\t\t</tr>\n+                    <tr>\n+                       <td class="webSiteBodyGreenText" colspan="2">\n+\n+                       </td>\n+                    </tr>\n+                </tbody></table>\n+\n+            </td>\n+            </tr>\n+\n+            <tr><td colspan="5" align="center">\n+                <input name="dataNature" value="DataOnly" type="radio"> Data only\n+                &nbsp;\n+                <input name="dataNature" value="InconclusiveOnly" type="radio"> Inconclusive Only\n+                &nbsp;\n+                <input name="dataNature" value="All" type="radio">All\n+            </td></tr>\n+\n+            <tr>\n+\t\t\t\t<td class="webSiteBodyGreenText" colspan="5" align="center">*\n+\t\t\t\tSubmitting with no selections would display all the available\n+\t\t\t\tresults. You may also restrict the results displayed to <b>Data</b>\n+                only or <b>inconclusive</b> results only.</td>\n+\t\t\t</tr>\n+\t\t\t<tr>\n+\t\t\t\t<td class="webSiteBody" colspan="5" align="center"><input value="Submit Selections" name="B3" type="submit"></td>\n+\t\t\t</tr>\n+\n+\n+\t\t</tbody></table>\n+\t\t</form>\n+\t\t<!--end inner table--></td>\n+\t</tr>\n+</tbody></table>\n+\n+</div>\n+</div><!-- CLOSEs CONTENT-JOURNALNAV DIV -->\n+\n+</div></div>\n+\n+\n+\n+<p class="back-to-top hidden"><a href="#top">Top<span class="hidden"> of page</span></a></p>\n+\n+\n+\n+<div id="foot-er" class="footer">\n+\n+    <div id="footer-journal">\n+\n+        <div class="footer-constrain clearfix">\n+\n+\t\t\t<p class="journal-name">Functional Glycomics Gateway</p>\n+\n+\t\t\t<p class="eissn"><abbr title="International Standard Serial Number">ISSN</abbr><span class="hidden">:</span> 1752-184X</p>        \n+\n+        \t\n+<span class="cleardiv"><!-- --></span>\n+\n+\n+\t\t</div>\n+\n+        \n+<span class="cleardiv"><!-- --></span>\n+\n+\n+    </div>\n+\n+\t\n+\n+\t<div id="footer-copyright">\n+\n+\t\t<div class="footer-constrain">\n+\n+\t\t\t<p>\xa9 2010 Functional Glycomics Gateway - All Rights Reserved | <a href="http://www.functionalglycomics.org/fg/privacy_terms.shtml">Privacy policy &amp; Terms of Use</a></p>\n+\n+\t\t</div>\n+\n+\t</div>\n+\n+</div>\n+<!-- webtrends Version: 8.5.0 --> \n+<script src="Primary%20Screen_files/webtrends.js" type="text/javascript"></script> \n+<script type="text/javascript"> \n+<!--//--><![CDATA[//><!-- \n+\t\tvar _tag=new WebTrends(); \n+\t\t_tag.dcsGetId(); \n+//--><!]]> \n+</script> \n+<script type="text/javascript"> <!--//--><![CDATA[//><!-- \n+\t\t// Add custom parameters here. \n+\t\t// _tag.DCSext.param_name=param_value; \n+\t\t_tag.dcsCollect(); \n+//--><!]]> \n+</script> \n+<noscript> \n+<div><img alt="" id="DCSIMG" width="1" height="1" src="http://statse.webtrendslive.com/dcsc2bh0q10000cprjxnf6sz5_6h4b/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=8.5.0" />\n+</div> \n+</noscript>\n+\n+<!-- Google Analytics -->\n+<script type="text/javascript">\n+\n+  var _gaq = _gaq || [];\n+  _gaq.push([\'_setAccount\', \'UA-23107886-2\']);\n+  _gaq.push([\'_trackPageview\']);\n+\n+  (function() {\n+    var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;\n+    ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n+    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n+  })();\n+\n+</script>\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+<!-- ================ -->\n+<!--  END OF CONTENT  -->\n+<!-- ================ -->\n+\n+\n+\n+</body></html>\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/AnchorPosition.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/AnchorPosition.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,147 @@
+// ===================================================================
+// Author: Matt Kruse <matt@mattkruse.com>
+// WWW: http://www.mattkruse.com/
+//
+// NOTICE: You may use this code for any purpose, commercial or
+// private, without any further permission from the author. You may
+// remove this notice from your final code if you wish, however it is
+// appreciated by the author if at least my web site address is kept.
+//
+// You may *NOT* re-distribute this code in any way except through its
+// use. That means, you can include it in your product, or your web
+// site, or any other form where the code is actually being used. You
+// may not put the plain javascript up on your site for download or
+// include it in your javascript libraries for download. 
+// If you wish to share this code with others, please just point them
+// to the URL instead.
+// Please DO NOT link directly to my .js files from your site. Copy
+// the files to your server and use them there. Thank you.
+// ===================================================================
+
+/* 
+AnchorPosition.js
+Author: Matt Kruse
+Last modified: 10/11/02
+
+DESCRIPTION: These functions find the position of an <A> tag in a document,
+so other elements can be positioned relative to it.
+
+COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
+positioning errors - usually with Window positioning - occur on the 
+Macintosh platform.
+
+FUNCTIONS:
+getAnchorPosition(anchorname)
+  Returns an Object() having .x and .y properties of the pixel coordinates
+  of the upper-left corner of the anchor. Position is relative to the PAGE.
+
+getAnchorWindowPosition(anchorname)
+  Returns an Object() having .x and .y properties of the pixel coordinates
+  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.
+
+NOTES:
+
+1) For popping up separate browser windows, use getAnchorWindowPosition. 
+   Otherwise, use getAnchorPosition
+
+2) Your anchor tag MUST contain both NAME and ID attributes which are the 
+   same. For example:
+   <A NAME="test" ID="test"> </A>
+
+3) There must be at least a space between <A> </A> for IE5.5 to see the 
+   anchor tag correctly. Do not do <A></A> with no space.
+*/ 
+
+// getAnchorPosition(anchorname)
+//   This function returns an object having .x and .y properties which are the coordinates
+//   of the named anchor, relative to the page.
+function getAnchorPosition(anchorname) {
+ // This function will return an Object with x and y properties
+ var useWindow=false;
+ var coordinates=new Object();
+ var x=0,y=0;
+ // Browser capability sniffing
+ var use_gebi=false, use_css=false, use_layers=false;
+ if (document.getElementById) { use_gebi=true; }
+ else if (document.all) { use_css=true; }
+ else if (document.layers) { use_layers=true; }
+ // Logic to find position
+  if (use_gebi && document.all) {
+ x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
+ y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
+ }
+ else if (use_gebi) {
+ var o=document.getElementById(anchorname);
+ x=AnchorPosition_getPageOffsetLeft(o);
+ y=AnchorPosition_getPageOffsetTop(o);
+ }
+  else if (use_css) {
+ x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
+ y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
+ }
+ else if (use_layers) {
+ var found=0;
+ for (var i=0; i<document.anchors.length; i++) {
+ if (document.anchors[i].name==anchorname) { found=1; break; }
+ }
+ if (found==0) {
+ coordinates.x=0; coordinates.y=0; return coordinates;
+ }
+ x=document.anchors[i].x;
+ y=document.anchors[i].y;
+ }
+ else {
+ coordinates.x=0; coordinates.y=0; return coordinates;
+ }
+ coordinates.x=x;
+ coordinates.y=y;
+ return coordinates;
+ }
+
+// getAnchorWindowPosition(anchorname)
+//   This function returns an object having .x and .y properties which are the coordinates
+//   of the named anchor, relative to the window
+function getAnchorWindowPosition(anchorname) {
+ var coordinates=getAnchorPosition(anchorname);
+ var x=0;
+ var y=0;
+ if (document.getElementById) {
+ if (isNaN(window.screenX)) {
+ x=coordinates.x-document.body.scrollLeft+window.screenLeft;
+ y=coordinates.y-document.body.scrollTop+window.screenTop;
+ }
+ else {
+ x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
+ y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
+ }
+ }
+ else if (document.all) {
+ x=coordinates.x-document.body.scrollLeft+window.screenLeft;
+ y=coordinates.y-document.body.scrollTop+window.screenTop;
+ }
+ else if (document.layers) {
+ x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
+ y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
+ }
+ coordinates.x=x;
+ coordinates.y=y;
+ return coordinates;
+ }
+
+// Functions for IE to get position of an object
+function AnchorPosition_getPageOffsetLeft (el) {
+ var ol=el.offsetLeft;
+ while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
+ return ol;
+ }
+function AnchorPosition_getWindowOffsetLeft (el) {
+ return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
+ }
+function AnchorPosition_getPageOffsetTop (el) {
+ var ot=el.offsetTop;
+ while((el=el.offsetParent) != null) { ot += el.offsetTop; }
+ return ot;
+ }
+function AnchorPosition_getWindowOffsetTop (el) {
+ return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
+ }
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/CalendarPopup.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/CalendarPopup.js Wed Mar 23 14:35:56 2016 -0400
[
b"@@ -0,0 +1,692 @@\n+// ===================================================================\r\n+// Author: Matt Kruse <matt@mattkruse.com>\r\n+// WWW: http://www.mattkruse.com/\r\n+//\r\n+// NOTICE: You may use this code for any purpose, commercial or\r\n+// private, without any further permission from the author. You may\r\n+// remove this notice from your final code if you wish, however it is\r\n+// appreciated by the author if at least my web site address is kept.\r\n+//\r\n+// You may *NOT* re-distribute this code in any way except through its\r\n+// use. That means, you can include it in your product, or your web\r\n+// site, or any other form where the code is actually being used. You\r\n+// may not put the plain javascript up on your site for download or\r\n+// include it in your javascript libraries for download. \r\n+// If you wish to share this code with others, please just point them\r\n+// to the URL instead.\r\n+// Please DO NOT link directly to my .js files from your site. Copy\r\n+// the files to your server and use them there. Thank you.\r\n+// ===================================================================\r\n+\r\n+// HISTORY\r\n+// ------------------------------------------------------------------\r\n+// Feb 7, 2005: Fixed a CSS styles to use px unit\r\n+// March 29, 2004: Added check in select() method for the form field\r\n+//      being disabled. If it is, just return and don't do anything.\r\n+// March 24, 2004: Fixed bug - when month name and abbreviations were\r\n+//      changed, date format still used original values.\r\n+// January 26, 2004: Added support for drop-down month and year\r\n+//      navigation (Thanks to Chris Reid for the idea)\r\n+// September 22, 2003: Fixed a minor problem in YEAR calendar with\r\n+//      CSS prefix.\r\n+// August 19, 2003: Renamed the function to get styles, and made it\r\n+//      work correctly without an object reference\r\n+// August 18, 2003: Changed showYearNavigation and \r\n+//      showYearNavigationInput to optionally take an argument of\r\n+//      true or false\r\n+// July 31, 2003: Added text input option for year navigation.\r\n+//      Added a per-calendar CSS prefix option to optionally use \r\n+//      different styles for different calendars.\r\n+// July 29, 2003: Fixed bug causing the Today link to be clickable \r\n+//      even though today falls in a disabled date range.\r\n+//      Changed formatting to use pure CSS, allowing greater control\r\n+//      over look-and-feel options.\r\n+// June 11, 2003: Fixed bug causing the Today link to be unselectable\r\n+//      under certain cases when some days of week are disabled\r\n+// March 14, 2003: Added ability to disable individual dates or date\r\n+//      ranges, display as light gray and strike-through\r\n+// March 14, 2003: Removed dependency on graypixel.gif and instead \r\n+///     use table border coloring\r\n+// March 12, 2003: Modified showCalendar() function to allow optional\r\n+//      start-date parameter\r\n+// March 11, 2003: Modified select() function to allow optional\r\n+//      start-date parameter\r\n+/* \r\n+DESCRIPTION: This object implements a popup calendar to allow the user to\r\n+select a date, month, quarter, or year.\r\n+\r\n+COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small\r\n+positioning errors - usually with Window positioning - occur on the \r\n+Macintosh platform.\r\n+The calendar can be modified to work for any location in the world by \r\n+changing which weekday is displayed as the first column, changing the month\r\n+names, and changing the column headers for each day.\r\n+\r\n+USAGE:\r\n+// Create a new CalendarPopup object of type WINDOW\r\n+var cal = new CalendarPopup(); \r\n+\r\n+// Create a new CalendarPopup object of type DIV using the DIV named 'mydiv'\r\n+var cal = new CalendarPopup('mydiv'); \r\n+\r\n+// Easy method to link the popup calendar with an input box. \r\n+cal.select(inputObject, anchorname, dateFormat);\r\n+// Same method, but passing a default date other than the field's current value\r\n+cal.select(inputObject, anchorname, dateFormat, '01/02/2000');\r\n+// Th"..b'/ Code common for MONTH, QUARTER, YEAR\r\n+\t// ------------------------------------\r\n+\tif (this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year") {\r\n+\t\tif (arguments.length > 0) { var year = arguments[0]; }\r\n+\t\telse { \r\n+\t\t\tif (this.displayType=="year") {\tvar year = now.getFullYear()-this.yearSelectStartOffset; }\r\n+\t\t\telse { var year = now.getFullYear(); }\r\n+\t\t\t}\r\n+\t\tif (this.displayType!="year" && this.isShowYearNavigation) {\r\n+\t\t\tresult += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";\r\n+\t\t\tresult += \'<TR>\\n\';\r\n+\t\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="22"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year-1)+\');">&lt;&lt;</A></TD>\\n\';\r\n+\t\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="100">\'+year+\'</TD>\\n\';\r\n+\t\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="22"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year+1)+\');">&gt;&gt;</A></TD>\\n\';\r\n+\t\t\tresult += \'</TR></TABLE>\\n\';\r\n+\t\t\t}\r\n+\t\t}\r\n+\t\t\r\n+\t// Code for MONTH display \r\n+\t// ----------------------\r\n+\tif (this.displayType=="month") {\r\n+\t\t// If POPUP, write entire HTML document\r\n+\t\tresult += \'<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\\n\';\r\n+\t\tfor (var i=0; i<4; i++) {\r\n+\t\t\tresult += \'<TR>\';\r\n+\t\t\tfor (var j=0; j<3; j++) {\r\n+\t\t\t\tvar monthindex = ((i*3)+j);\r\n+\t\t\t\tresult += \'<TD WIDTH=33% ALIGN=CENTER><A CLASS="\'+this.cssPrefix+\'cpText" HREF="javascript:\'+windowref+this.returnMonthFunction+\'(\'+year+\',\'+(monthindex+1)+\');\'+windowref+\'CP_hideCalendar(\\\'\'+this.index+\'\\\');" CLASS="\'+date_class+\'">\'+this.monthAbbreviations[monthindex]+\'</A></TD>\';\r\n+\t\t\t\t}\r\n+\t\t\tresult += \'</TR>\';\r\n+\t\t\t}\r\n+\t\tresult += \'</TABLE></CENTER></TD></TR></TABLE>\\n\';\r\n+\t\t}\r\n+\t\r\n+\t// Code for QUARTER display\r\n+\t// ------------------------\r\n+\tif (this.displayType=="quarter") {\r\n+\t\tresult += \'<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\\n\';\r\n+\t\tfor (var i=0; i<2; i++) {\r\n+\t\t\tresult += \'<TR>\';\r\n+\t\t\tfor (var j=0; j<2; j++) {\r\n+\t\t\t\tvar quarter = ((i*2)+j+1);\r\n+\t\t\t\tresult += \'<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="\'+this.cssPrefix+\'cpText" HREF="javascript:\'+windowref+this.returnQuarterFunction+\'(\'+year+\',\'+quarter+\');\'+windowref+\'CP_hideCalendar(\\\'\'+this.index+\'\\\');" CLASS="\'+date_class+\'">Q\'+quarter+\'</A><BR><BR></TD>\';\r\n+\t\t\t\t}\r\n+\t\t\tresult += \'</TR>\';\r\n+\t\t\t}\r\n+\t\tresult += \'</TABLE></CENTER></TD></TR></TABLE>\\n\';\r\n+\t\t}\r\n+\r\n+\t// Code for YEAR display\r\n+\t// ---------------------\r\n+\tif (this.displayType=="year") {\r\n+\t\tvar yearColumnSize = 4;\r\n+\t\tresult += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";\r\n+\t\tresult += \'<TR>\\n\';\r\n+\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="50%"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year-(yearColumnSize*2))+\');">&lt;&lt;</A></TD>\\n\';\r\n+\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="50%"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year+(yearColumnSize*2))+\');">&gt;&gt;</A></TD>\\n\';\r\n+\t\tresult += \'</TR></TABLE>\\n\';\r\n+\t\tresult += \'<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\\n\';\r\n+\t\tfor (var i=0; i<yearColumnSize; i++) {\r\n+\t\t\tfor (var j=0; j<2; j++) {\r\n+\t\t\t\tvar currentyear = year+(j*yearColumnSize)+i;\r\n+\t\t\t\tresult += \'<TD WIDTH=50% ALIGN=CENTER><A CLASS="\'+this.cssPrefix+\'cpText" HREF="javascript:\'+windowref+this.returnYearFunction+\'(\'+currentyear+\');\'+windowref+\'CP_hideCalendar(\\\'\'+this.index+\'\\\');" CLASS="\'+date_class+\'">\'+currentyear+\'</A></TD>\';\r\n+\t\t\t\t}\r\n+\t\t\tresult += \'</TR>\';\r\n+\t\t\t}\r\n+\t\tresult += \'</TABLE></CENTER></TD></TR></TABLE>\\n\';\r\n+\t\t}\r\n+\t// Common\r\n+\tif (this.type == "WINDOW") {\r\n+\t\tresult += "</BODY></HTML>\\n";\r\n+\t\t}\r\n+\treturn result;\r\n+\t}\r\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/PopupWindow.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/PopupWindow.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,336 @@\n+// ===================================================================\n+// Author: Matt Kruse <matt@mattkruse.com>\n+// WWW: http://www.mattkruse.com/\n+//\n+// NOTICE: You may use this code for any purpose, commercial or\n+// private, without any further permission from the author. You may\n+// remove this notice from your final code if you wish, however it is\n+// appreciated by the author if at least my web site address is kept.\n+//\n+// You may *NOT* re-distribute this code in any way except through its\n+// use. That means, you can include it in your product, or your web\n+// site, or any other form where the code is actually being used. You\n+// may not put the plain javascript up on your site for download or\n+// include it in your javascript libraries for download. \n+// If you wish to share this code with others, please just point them\n+// to the URL instead.\n+// Please DO NOT link directly to my .js files from your site. Copy\n+// the files to your server and use them there. Thank you.\n+// ===================================================================\n+\n+/* \n+PopupWindow.js\n+Author: Matt Kruse\n+Last modified: 02/16/04\n+\n+DESCRIPTION: This object allows you to easily and quickly popup a window\n+in a certain place. The window can either be a DIV or a separate browser\n+window.\n+\n+COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small\n+positioning errors - usually with Window positioning - occur on the \n+Macintosh platform. Due to bugs in Netscape 4.x, populating the popup \n+window with <STYLE> tags may cause errors.\n+\n+USAGE:\n+// Create an object for a WINDOW popup\n+var win = new PopupWindow(); \n+\n+// Create an object for a DIV window using the DIV named \'mydiv\'\n+var win = new PopupWindow(\'mydiv\'); \n+\n+// Set the window to automatically hide itself when the user clicks \n+// anywhere else on the page except the popup\n+win.autoHide(); \n+\n+// Show the window relative to the anchor name passed in\n+win.showPopup(anchorname);\n+\n+// Hide the popup\n+win.hidePopup();\n+\n+// Set the size of the popup window (only applies to WINDOW popups\n+win.setSize(width,height);\n+\n+// Populate the contents of the popup window that will be shown. If you \n+// change the contents while it is displayed, you will need to refresh()\n+win.populate(string);\n+\n+// set the URL of the window, rather than populating its contents\n+// manually\n+win.setUrl("http://www.site.com/");\n+\n+// Refresh the contents of the popup\n+win.refresh();\n+\n+// Specify how many pixels to the right of the anchor the popup will appear\n+win.offsetX = 50;\n+\n+// Specify how many pixels below the anchor the popup will appear\n+win.offsetY = 100;\n+\n+NOTES:\n+1) Requires the functions in AnchorPosition.js\n+\n+2) Your anchor tag MUST contain both NAME and ID attributes which are the \n+   same. For example:\n+   <A NAME="test" ID="test"> </A>\n+\n+3) There must be at least a space between <A> </A> for IE5.5 to see the \n+   anchor tag correctly. Do not do <A></A> with no space.\n+\n+4) When a PopupWindow object is created, a handler for \'onmouseup\' is\n+   attached to any event handler you may have already defined. Do NOT define\n+   an event handler for \'onmouseup\' after you define a PopupWindow object or\n+   the autoHide() will not work correctly.\n+*/ \n+\n+// Set the position of the popup window based on the anchor\n+function PopupWindow_getXYPosition(anchorname) {\n+\tvar coordinates;\n+\tif (this.type == "WINDOW") {\n+\t\tcoordinates = getAnchorWindowPosition(anchorname);\n+\t\t}\n+\telse {\n+\t\tcoordinates = getAnchorPosition(anchorname);\n+\t\t}\n+\tthis.x = coordinates.x;\n+\tthis.y = coordinates.y;\n+\t}\n+// Set width/height of DIV/popup window\n+function PopupWindow_setSize(width,height) {\n+\tthis.width = width;\n+\tthis.height = height;\n+\t}\n+// Fill the window with contents\n+function PopupWindow_populate(contents) {\n+\tthis.contents = contents;\n+\tthis.populated = false;\n+\t}\n+// Set the URL to go to\n+function PopupWindow_setUrl(url) {\n+\tthis.url = url;\n+\t}\n+// Set the window popup properti'..b'+\t\t\t}\n+\t\t}\n+\telse {\n+\t\tif (this.popupWindow && !this.popupWindow.closed) {\n+\t\t\tthis.popupWindow.close();\n+\t\t\tthis.popupWindow = null;\n+\t\t\t}\n+\t\t}\n+\t}\n+// Pass an event and return whether or not it was the popup DIV that was clicked\n+function PopupWindow_isClicked(e) {\n+\tif (this.divName != null) {\n+\t\tif (this.use_layers) {\n+\t\t\tvar clickX = e.pageX;\n+\t\t\tvar clickY = e.pageY;\n+\t\t\tvar t = document.layers[this.divName];\n+\t\t\tif ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {\n+\t\t\t\treturn true;\n+\t\t\t\t}\n+\t\t\telse { return false; }\n+\t\t\t}\n+\t\telse if (document.all) { // Need to hard-code this to trap IE for error-handling\n+\t\t\tvar t = window.event.srcElement;\n+\t\t\twhile (t.parentElement != null) {\n+\t\t\t\tif (t.id==this.divName) {\n+\t\t\t\t\treturn true;\n+\t\t\t\t\t}\n+\t\t\t\tt = t.parentElement;\n+\t\t\t\t}\n+\t\t\treturn false;\n+\t\t\t}\n+\t\telse if (this.use_gebi && e) {\n+\t\t\tvar t = e.originalTarget;\n+\t\t\twhile (t.parentNode != null) {\n+\t\t\t\tif (t.id==this.divName) {\n+\t\t\t\t\treturn true;\n+\t\t\t\t\t}\n+\t\t\t\tt = t.parentNode;\n+\t\t\t\t}\n+\t\t\treturn false;\n+\t\t\t}\n+\t\treturn false;\n+\t\t}\n+\treturn false;\n+\t}\n+\n+// Check an onMouseDown event to see if we should hide\n+function PopupWindow_hideIfNotClicked(e) {\n+\tif (this.autoHideEnabled && !this.isClicked(e)) {\n+\t\tthis.hidePopup();\n+\t\t}\n+\t}\n+// Call this to make the DIV disable automatically when mouse is clicked outside it\n+function PopupWindow_autoHide() {\n+\tthis.autoHideEnabled = true;\n+\t}\n+// This global function checks all PopupWindow objects onmouseup to see if they should be hidden\n+function PopupWindow_hidePopupWindows(e) {\n+\tfor (var i=0; i<popupWindowObjects.length; i++) {\n+\t\tif (popupWindowObjects[i] != null) {\n+\t\t\tvar p = popupWindowObjects[i];\n+\t\t\tp.hideIfNotClicked(e);\n+\t\t\t}\n+\t\t}\n+\t}\n+// Run this immediately to attach the event listener\n+function PopupWindow_attachListener() {\n+\tif (document.layers) {\n+\t\tdocument.captureEvents(Event.MOUSEUP);\n+\t\t}\n+\twindow.popupWindowOldEventListener = document.onmouseup;\n+\tif (window.popupWindowOldEventListener != null) {\n+\t\tdocument.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");\n+\t\t}\n+\telse {\n+\t\tdocument.onmouseup = PopupWindow_hidePopupWindows;\n+\t\t}\n+\t}\n+// CONSTRUCTOR for the PopupWindow object\n+// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup\n+function PopupWindow() {\n+\tif (!window.popupWindowIndex) { window.popupWindowIndex = 0; }\n+\tif (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }\n+\tif (!window.listenerAttached) {\n+\t\twindow.listenerAttached = true;\n+\t\tPopupWindow_attachListener();\n+\t\t}\n+\tthis.index = popupWindowIndex++;\n+\tpopupWindowObjects[this.index] = this;\n+\tthis.divName = null;\n+\tthis.popupWindow = null;\n+\tthis.width=0;\n+\tthis.height=0;\n+\tthis.populated = false;\n+\tthis.visible = false;\n+\tthis.autoHideEnabled = false;\n+\t\n+\tthis.contents = "";\n+\tthis.url="";\n+\tthis.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";\n+\tif (arguments.length>0) {\n+\t\tthis.type="DIV";\n+\t\tthis.divName = arguments[0];\n+\t\t}\n+\telse {\n+\t\tthis.type="WINDOW";\n+\t\t}\n+\tthis.use_gebi = false;\n+\tthis.use_css = false;\n+\tthis.use_layers = false;\n+\tif (document.getElementById) { this.use_gebi = true; }\n+\telse if (document.all) { this.use_css = true; }\n+\telse if (document.layers) { this.use_layers = true; }\n+\telse { this.type = "WINDOW"; }\n+\tthis.offsetX = 0;\n+\tthis.offsetY = 0;\n+\t// Method mappings\n+\tthis.getXYPosition = PopupWindow_getXYPosition;\n+\tthis.populate = PopupWindow_populate;\n+\tthis.setUrl = PopupWindow_setUrl;\n+\tthis.setWindowProperties = PopupWindow_setWindowProperties;\n+\tthis.refresh = PopupWindow_refresh;\n+\tthis.showPopup = PopupWindow_showPopup;\n+\tthis.hidePopup = PopupWindow_hidePopup;\n+\tthis.setSize = PopupWindow_setSize;\n+\tthis.isClicked = PopupWindow_isClicked;\n+\tthis.autoHide = PopupWindow_autoHide;\n+\tthis.hideIfNotClicked = PopupWindow_hideIfNotClicked;\n+\t}\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/css_sidemenu.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/css_sidemenu.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,81 @@
+
+unhighlighted_bullet= new Image();
+unhighlighted_bullet.src = "/static/consortium/images/samp2_bullet.gif";
+
+highlighted_bullet = new Image();
+highlighted_bullet.src = "/static/consortium/images/samp2_bullet_hl.gif";
+
+plus = new Image();
+plus.src = "/static/consortium/images/sub_plus.gif";
+
+minus = new Image();
+minus.src = "/static/consortium/images/sub_minus.gif";
+
+function highlightBullet(bulletID) {
+    bulletID.src=highlighted_bullet.src
+}
+
+function unhighlightBullet(bulletID) {
+    bulletID.src=unhighlighted_bullet.src
+}
+
+function plusToMinus(imgID) {
+    imgID.src=minus.src
+}
+
+function minusToPlus(imgID) {
+    imgID.src=plus.src
+}
+/****************************************************
+*         DOM Image rollover:
+
+* by Chris Poole
+* http://chrispoole.com
+*               Script featured on http://www.dynamicdrive.com
+* Keep this notice intact to use it :-)
+****************************************************/
+function init() {
+  if (!document.getElementById) return
+  var imgOriginSrc;
+  var imgTemp = new Array();
+  var imgarr = document.getElementsByTagName('img');
+  for (var i = 0; i < imgarr.length; i++) {
+    if (imgarr[i].getAttribute('hsrc')) {
+        imgTemp[i] = new Image();
+        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
+        imgarr[i].onmouseover = function() {
+            imgOriginSrc = this.getAttribute('src');
+            this.setAttribute('src',this.getAttribute('hsrc'))
+        }
+        imgarr[i].onmouseout = function() {
+            this.setAttribute('src',imgOriginSrc)
+        }
+    }
+  }
+}
+onload=init;
+/***********************************************
+* Switch Menu script- by Martial B of http://getElementById.com/
+* Modified by Dynamic Drive for format & NS4/IE4 compatibility
+* Visit http://www.dynamicdrive.com/ for full source code
+***********************************************/
+//if (document.getElementById){ //DynamicDrive.com change
+  // document.write('<style type="text/css">')
+   //document.write('.submenu{display: none;}')
+   //document.write('</style>')
+//}
+function SwitchMenu(obj){
+    if(document.getElementById){
+        var el = document.getElementById(obj);
+        var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
+        if(el.style.display != "block"){ //DynamicDrive.com change
+            for (var i=0; i<ar.length; i++){
+                if (ar[i].className=="submenu") //DynamicDrive.com change
+                    ar[i].style.display = "none";
+            }
+           el.style.display = "block";
+       }else{
+           el.style.display = "none";
+       }
+   }
+}
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/date.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/date.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,335 @@\n+// ===================================================================\n+// Author: Matt Kruse <matt@mattkruse.com>\n+// WWW: http://www.mattkruse.com/\n+//\n+// NOTICE: You may use this code for any purpose, commercial or\n+// private, without any further permission from the author. You may\n+// remove this notice from your final code if you wish, however it is\n+// appreciated by the author if at least my web site address is kept.\n+//\n+// You may *NOT* re-distribute this code in any way except through its\n+// use. That means, you can include it in your product, or your web\n+// site, or any other form where the code is actually being used. You\n+// may not put the plain javascript up on your site for download or\n+// include it in your javascript libraries for download. \n+// If you wish to share this code with others, please just point them\n+// to the URL instead.\n+// Please DO NOT link directly to my .js files from your site. Copy\n+// the files to your server and use them there. Thank you.\n+// ===================================================================\n+\n+// HISTORY\n+// ------------------------------------------------------------------\n+// May 17, 2003: Fixed bug in parseDate() for dates <1970\n+// March 11, 2003: Added parseDate() function\n+// March 11, 2003: Added "NNN" formatting option. Doesn\'t match up\n+//                 perfectly with SimpleDateFormat formats, but \n+//                 backwards-compatability was required.\n+\n+// ------------------------------------------------------------------\n+// These functions use the same \'format\' strings as the \n+// java.text.SimpleDateFormat class, with minor exceptions.\n+// The format string consists of the following abbreviations:\n+// \n+// Field        | Full Form          | Short Form\n+// -------------+--------------------+-----------------------\n+// Year         | yyyy (4 digits)    | yy (2 digits), y (2 or 4 digits)\n+// Month        | MMM (name or abbr.)| MM (2 digits), M (1 or 2 digits)\n+//              | NNN (abbr.)        |\n+// Day of Month | dd (2 digits)      | d (1 or 2 digits)\n+// Day of Week  | EE (name)          | E (abbr)\n+// Hour (1-12)  | hh (2 digits)      | h (1 or 2 digits)\n+// Hour (0-23)  | HH (2 digits)      | H (1 or 2 digits)\n+// Hour (0-11)  | KK (2 digits)      | K (1 or 2 digits)\n+// Hour (1-24)  | kk (2 digits)      | k (1 or 2 digits)\n+// Minute       | mm (2 digits)      | m (1 or 2 digits)\n+// Second       | ss (2 digits)      | s (1 or 2 digits)\n+// AM/PM        | a                  |\n+//\n+// NOTE THE DIFFERENCE BETWEEN MM and mm! Month=MM, not mm!\n+// Examples:\n+//  "MMM d, y" matches: January 01, 2000\n+//                      Dec 1, 1900\n+//                      Nov 20, 00\n+//  "M/d/yy"   matches: 01/20/00\n+//                      9/2/00\n+//  "MMM dd, yyyy hh:mm:ssa" matches: "January 01, 2000 12:30:45AM"\n+// ------------------------------------------------------------------\n+\n+var MONTH_NAMES=new Array(\'January\',\'February\',\'March\',\'April\',\'May\',\'June\',\'July\',\'August\',\'September\',\'October\',\'November\',\'December\',\'Jan\',\'Feb\',\'Mar\',\'Apr\',\'May\',\'Jun\',\'Jul\',\'Aug\',\'Sep\',\'Oct\',\'Nov\',\'Dec\');\n+var DAY_NAMES=new Array(\'Sunday\',\'Monday\',\'Tuesday\',\'Wednesday\',\'Thursday\',\'Friday\',\'Saturday\',\'Sun\',\'Mon\',\'Tue\',\'Wed\',\'Thu\',\'Fri\',\'Sat\');\n+function LZ(x) {return(x<0||x>9?"":"0")+x}\n+\n+// ------------------------------------------------------------------\n+// isDate ( date_string, format_string )\n+// Returns true if date string matches format of format string and\n+// is a valid date. Else returns false.\n+// It is recommended that you trim whitespace around the value before\n+// passing it to this function, as whitespace is NOT ignored!\n+// ------------------------------------------------------------------\n+function isDate(val,format) {\n+\tvar date=getDateFromFormat(val,format);\n+\tif (date==0) { return false; }\n+\treturn true;\n+\t}\n+\n+// -------------------------------------------------------------------\n+// compareDates(date1,date1format,date2,date2f'..b' month_name.length;\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\tif ((month < 1)||(month>12)){return 0;}\n+\t\t\t}\n+\t\telse if (token=="EE"||token=="E"){\n+\t\t\tfor (var i=0; i<DAY_NAMES.length; i++) {\n+\t\t\t\tvar day_name=DAY_NAMES[i];\n+\t\t\t\tif (val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()) {\n+\t\t\t\t\ti_val += day_name.length;\n+\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\telse if (token=="MM"||token=="M") {\n+\t\t\tmonth=_getInt(val,i_val,token.length,2);\n+\t\t\tif(month==null||(month<1)||(month>12)){return 0;}\n+\t\t\ti_val+=month.length;}\n+\t\telse if (token=="dd"||token=="d") {\n+\t\t\tdate=_getInt(val,i_val,token.length,2);\n+\t\t\tif(date==null||(date<1)||(date>31)){return 0;}\n+\t\t\ti_val+=date.length;}\n+\t\telse if (token=="hh"||token=="h") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<1)||(hh>12)){return 0;}\n+\t\t\ti_val+=hh.length;}\n+\t\telse if (token=="HH"||token=="H") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<0)||(hh>23)){return 0;}\n+\t\t\ti_val+=hh.length;}\n+\t\telse if (token=="KK"||token=="K") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<0)||(hh>11)){return 0;}\n+\t\t\ti_val+=hh.length;}\n+\t\telse if (token=="kk"||token=="k") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<1)||(hh>24)){return 0;}\n+\t\t\ti_val+=hh.length;hh--;}\n+\t\telse if (token=="mm"||token=="m") {\n+\t\t\tmm=_getInt(val,i_val,token.length,2);\n+\t\t\tif(mm==null||(mm<0)||(mm>59)){return 0;}\n+\t\t\ti_val+=mm.length;}\n+\t\telse if (token=="ss"||token=="s") {\n+\t\t\tss=_getInt(val,i_val,token.length,2);\n+\t\t\tif(ss==null||(ss<0)||(ss>59)){return 0;}\n+\t\t\ti_val+=ss.length;}\n+\t\telse if (token=="a") {\n+\t\t\tif (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";}\n+\t\t\telse if (val.substring(i_val,i_val+2).toLowerCase()=="pm") {ampm="PM";}\n+\t\t\telse {return 0;}\n+\t\t\ti_val+=2;}\n+\t\telse {\n+\t\t\tif (val.substring(i_val,i_val+token.length)!=token) {return 0;}\n+\t\t\telse {i_val+=token.length;}\n+\t\t\t}\n+\t\t}\n+\t// If there are any trailing characters left in the value, it doesn\'t match\n+\tif (i_val != val.length) { return 0; }\n+\t// Is date valid for month?\n+\tif (month==2) {\n+\t\t// Check for leap year\n+\t\tif ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year\n+\t\t\tif (date > 29){ return 0; }\n+\t\t\t}\n+\t\telse { if (date > 28) { return 0; } }\n+\t\t}\n+\tif ((month==4)||(month==6)||(month==9)||(month==11)) {\n+\t\tif (date > 30) { return 0; }\n+\t\t}\n+\t// Correct hours value\n+\tif (hh<12 && ampm=="PM") { hh=hh-0+12; }\n+\telse if (hh>11 && ampm=="AM") { hh-=12; }\n+\tvar newdate=new Date(year,month-1,date,hh,mm,ss);\n+\treturn newdate.getTime();\n+\t}\n+\n+// ------------------------------------------------------------------\n+// parseDate( date_string [, prefer_euro_format] )\n+//\n+// This function takes a date string and tries to match it to a\n+// number of possible date formats to get the value. It will try to\n+// match against the following international formats, in this order:\n+// y-M-d   MMM d, y   MMM d,y   y-MMM-d   d-MMM-y  MMM d\n+// M/d/y   M-d-y      M.d.y     MMM-d     M/d      M-d\n+// d/M/y   d-M-y      d.M.y     d-MMM     d/M      d-M\n+// A second argument may be passed to instruct the method to search\n+// for formats like d/M/y (european format) before M/d/y (American).\n+// Returns a Date object or null if no patterns match.\n+// ------------------------------------------------------------------\n+function parseDate(val) {\n+\tvar preferEuro=(arguments.length==2)?arguments[1]:false;\n+\tgeneralFormats=new Array(\'y-M-d\',\'MMM d, y\',\'MMM d,y\',\'y-MMM-d\',\'d-MMM-y\',\'MMM d\');\n+\tmonthFirst=new Array(\'M/d/y\',\'M-d-y\',\'M.d.y\',\'MMM-d\',\'M/d\',\'M-d\');\n+\tdateFirst =new Array(\'d/M/y\',\'d-M-y\',\'d.M.y\',\'d-MMM\',\'d/M\',\'d-M\');\n+\tvar checkList=new Array(\'generalFormats\',preferEuro?\'dateFirst\':\'monthFirst\',preferEuro?\'monthFirst\':\'dateFirst\');\n+\tvar d=null;\n+\tfor (var i=0; i<checkList.length; i++) {\n+\t\tvar l=window[checkList[i]];\n+\t\tfor (var j=0; j<l.length; j++) {\n+\t\t\td=getDateFromFormat(val,l[j]);\n+\t\t\tif (d!=0) { return new Date(d); }\n+\t\t\t}\n+\t\t}\n+\treturn null;\n+\t}\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/details3.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/details3.js Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,3 @@
+function details3(text) {
+    document.carbImage.src = text
+}
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/ga.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/ga.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,77 @@\n+(function(){var E;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")}function F(a,b){return void 0==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \\n\\r\\t".indexOf(a.charAt(0));)a=a.substring(1);for(;a&&-1<" \\n\\r\\t".indexOf(a.charAt(a.length-1));)a=a.substring(0,a.length-1);return a}\n+function Ea(){return Math.round(2147483647*Math.random())}function Fa(){}function G(a,b){if(encodeURIComponent instanceof Function)return b?encodeURI(a):encodeURIComponent(a);H(68);return escape(a)}function I(a){a=a.split("+").join(" ");if(decodeURIComponent instanceof Function)try{return decodeURIComponent(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)};\n+function Ia(a,b){if(a){var c=J.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;c.id=b;var d=J.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d);return c}}function K(a){return a&&0<a.length?a[0]:""}function L(a){var b=a?a.length:0;return 0<b?a[b-1]:""}var nf=function(){this.prefix="ga.";this.values={}};nf.prototype.set=function(a,b){this.values[this.prefix+a]=b};nf.prototype.get=function(a){return this.values[this.prefix+a]};\n+nf.prototype.contains=function(a){return void 0!==this.get(a)};function Ka(a){0==a.indexOf("www.")&&(a=a.substring(4));return a.toLowerCase()}\n+function La(a,b){var c,d={url:a,protocol:"http",host:"",path:"",R:new nf,anchor:""};if(!a)return d;c=a.indexOf("://");0<=c&&(d.protocol=a.substring(0,c),a=a.substring(c+3));c=a.search("/|\\\\?|#");if(0<=c)d.host=a.substring(0,c).toLowerCase(),a=a.substring(c);else return d.host=a.toLowerCase(),d;c=a.indexOf("#");0<=c&&(d.anchor=a.substring(c+1),a=a.substring(0,c));c=a.indexOf("?");0<=c&&(Na(d.R,a.substring(c+1)),a=a.substring(0,c));d.anchor&&b&&Na(d.R,d.anchor);a&&"/"==a.charAt(0)&&(a=a.substring(1));\n+d.path=a;return d}\n+function Oa(a,b){function c(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase(),c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";0==a.indexOf("/")||(a="/"+a);return[b,""+c,a]}var d=b||J.createElement("a");d.href=J.location.href;var e=(d.protocol||"").toLowerCase(),f=c(d),Be=d.search||"",k=e+"//"+f[0]+(f[1]?":"+f[1]:"");0==a.indexOf("//")?a=e+a:0==a.indexOf("/")?a=k+a:a&&0!=a.indexOf("?")?0>a.split("/")[0].indexOf(":")&&(a=k+f[2].substring(0,f[2].lastIndexOf("/"))+\n+"/"+a):a=k+f[2]+(a||Be);d.href=a;e=c(d);return{protocol:(d.protocol||"").toLowerCase(),host:e[0],port:e[1],path:e[2],Oa:d.search||"",url:a||""}}function Na(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b).push(c)}for(var d=Da(b).split("&"),e=0;e<d.length;e++)if(d[e]){var f=d[e].indexOf("=");0>f?c(d[e],"1"):c(d[e].substring(0,f),d[e].substring(f+1))}}\n+function Pa(a,b){if(F(a)||"["==a.charAt(0)&&"]"==a.charAt(a.length-1))return"-";var c=J.domain;return a.indexOf(c+(b&&"/"!=b?b:""))==(0==a.indexOf("http://")?7:0==a.indexOf("https://")?8:0)?"0":a};var Qa=0;function Ra(a,b,c){1<=Qa||1<=100*Math.random()||ld()||(a=["utmt=error","utmerr="+a,"utmwv=5.6.7","utmn="+Ea(),"utmsp=1"],b&&a.push("api="+b),c&&a.push("msg="+G(c.substring(0,100))),M.w&&a.push("aip=1"),Sa(a.join("&")),Qa++)};var Ta=0,Ua={};function N(a){return Va("x"+Ta++,a)}function Va(a,b){Ua[a]=!!b;return a}\n+var Wa=N(),Xa=Va("anonymizeIp"),Ya=N(),$a=N(),ab=N(),bb=N(),O=N(),P=N(),cb=N(),db=N(),eb=N(),fb=N(),gb=N(),hb=N(),ib=N(),jb=N(),kb=N(),lb=N(),nb=N(),ob=N(),pb=N(),qb=N(),rb=N(),sb=N(),tb=N(),ub=N(),vb=N(),wb=N(),xb=N(),yb=N(),zb=N(),Ab=N(),Bb=N(),Cb=N(),Db=N(),Eb=N(),Fb=N(!0),Gb=Va("currencyCode"),Hb=Va("page"),Ib=Va("title"),Jb=N(),Kb=N(),Lb=N(),Mb=N(),Nb=N(),Ob=N(),Pb=N(),Qb=N(),Rb=N(),Q=N(!0),Sb=N(!0),Tb=N(!0),Ub=N(!0),Vb=N(!0),Wb=N(!0),Zb=N(!0),$b=N(!0),ac=N(!0),bc=N(!0),cc=N(!0),R='..b'a,c),te(a,c)),c=[c.toString()];else if("event"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","event"),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),\n+c=[c.toString()];else if("var"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","var"),!b&&te(a,c),c=[c.toString()];else if("trans"==c)for(var c=[],d=a.get(Cb),e=0;e<d.length;++e){c.push(ye(a,d[e],b));for(var f=d[e].items_,Be=0;Be<f.length;++Be)c.push(ze(a,f[Be],b))}else"social"==c?b?c=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ac),!0),c.add("utmsa",a.get(Bc),!0),c.add("utmsid",a.get(Cc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):"feedback"==c?b?c=[]:(c=new qe,\n+re(a,b),se(a,c),c.add("utmt","feedback"),c.add("utmfbid",a.get(Gc),!0),c.add("utmfbpr",a.get(Hc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):c=[];return c},oe=function(a){var b,c=a.get(xb),d=a.get(uc),e=d&&d.Ua,f=0;if(0==c||2==c){var Be=a.get(wb)+"?";b=Ae(a,!0);for(var k=0,Ja=b.length;k<Ja;k++)Sa(b[k],e,Be,!0),f++}if(1==c||2==c)for(b=Ae(a),a=a.c(Jc,""),k=0,Ja=b.length;k<Ja;k++)try{Sa(b[k],e,a),f++}catch(t){t&&Ra(t.name,void 0,t.message)}d&&(d.fb=f)};var Ne=function(){return"https:"==J.location.protocol||M.G?"https://ssl.google-analytics.com":"http://www.google-analytics.com"},Ce=function(a){this.name="len";this.message=a+"-8192"},De=function(a){this.name="ff2post";this.message=a+"-2036"},Sa=function(a,b,c,d){b=b||Fa;if(d||2036>=a.length)gf(a,b,c);else if(8192>=a.length){if(0<=W.navigator.userAgent.indexOf("Firefox")&&![].reduce)throw new De(a.length);df(a,b)||ef(a,b)||Ee(a,b)||b()}else throw new Ce(a.length);},gf=function(a,b,c){c=c||Ne()+"/__utm.gif?";\n+var d=new Image(1,1);d.src=c+a;d.onload=function(){d.onload=null;d.onerror=null;b()};d.onerror=function(){d.onload=null;d.onerror=null;b()}},ef=function(a,b){if(0!=Ne().indexOf(J.location.protocol))return!1;var c;c=W.XDomainRequest;if(!c)return!1;c=new c;c.open("POST",Ne()+"/p/__utm.gif");c.onerror=function(){b()};c.onload=b;c.send(a);return!0},df=function(a,b){var c=W.XMLHttpRequest;if(!c)return!1;var d=new c;if(!("withCredentials"in d))return!1;d.open("POST",Ne()+"/p/__utm.gif",!0);d.withCredentials=\n+!0;d.setRequestHeader("Content-Type","text/plain");d.onreadystatechange=function(){4==d.readyState&&(b(),d=null)};d.send(a);return!0},Ee=function(a,b){if(!J.body)return We(function(){Ee(a,b)},100),!0;a=encodeURIComponent(a);try{var c=J.createElement(\'<iframe name="\'+a+\'"></iframe>\')}catch(d){c=J.createElement("iframe"),c.name=a}c.height="0";c.width="0";c.style.display="none";c.style.visibility="hidden";var e=Ne()+"/u/post_iframe.html";Ga(W,"beforeunload",function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)});\n+setTimeout(b,1E3);J.body.appendChild(c);c.src=e;return!0};var qf=function(){this.G=this.w=!1;0==Ea()%1E4&&(H(142),this.G=!0);this.C={};this.D=[];this.U=0;this.S=[["www.google-analytics.com","","/plugins/"]];this._gasoCPath=this._gasoDomain=this.bb=void 0;Re();Se()};E=qf.prototype;E.oa=function(a,b){return this.hb(a,void 0,b)};E.hb=function(a,b,c){b&&H(23);c&&H(67);void 0==b&&(b="~"+M.U++);a=new U(b,a,c);M.C[b]=a;M.D.push(a);return a};E.u=function(a){a=a||"";return M.C[a]||M.hb(void 0,a)};E.pa=function(){return M.D.slice(0)};E.ab=function(){return M.D.length};\n+E.aa=function(){this.w=!0};E.la=function(){this.G=!0};var Fe=function(a){if("prerender"==J.visibilityState)return!1;a();return!0};var M=new qf;var Ha=W._gat;Ha&&Ba(Ha._getTracker)?M=Ha:W._gat=M;var Z=new Y;(function(a){if(!Fe(a)){H(123);var b=!1,c=function(){if(!b&&Fe(a)){b=!0;var d=J,e=c;d.removeEventListener?d.removeEventListener("visibilitychange",e,!1):d.detachEvent&&d.detachEvent("onvisibilitychange",e)}};Ga(J,"visibilitychange",c)}})(function(){var a=W._gaq,b=!1;if(a&&Ba(a.push)&&(b="[object Array]"==Object.prototype.toString.call(Object(a)),!b)){Z=a;return}W._gaq=Z;b&&Z.push.apply(Z,a)});function Yc(a){var b=1,c=0,d;if(a)for(b=0,d=a.length-1;0<=d;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=0!=c?b^c>>21:b;return b};})();\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/journal_header.gif
b
Binary file get_data/cfg_array/info/Primary Screen_files/journal_header.gif has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/jquery-1.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/jquery-1.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,4 @@\n+/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */\n+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outer'..b'ent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style=\'position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;\'><div></div></div><table style=\'position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;\' cellpadding=\'0\' cellspacing=\'0\'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/jquery.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/jquery.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,1112 @@\n+/*\n+ * jQuery validation plug-in pre-1.5.2\n+ *\n+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n+ * http://docs.jquery.com/Plugins/Validation\n+ *\n+ * Copyright (c) 2006 - 2008 J\xc3\xb6rn Zaefferer\n+ *\n+ * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $\n+ *\n+ * Dual licensed under the MIT and GPL licenses:\n+ *   http://www.opensource.org/licenses/mit-license.php\n+ *   http://www.gnu.org/licenses/gpl.html\n+ */\n+\n+(function($) {\n+\n+$.extend($.fn, {\n+\t// http://docs.jquery.com/Plugins/Validation/validate\n+\tvalidate: function( options ) {\n+\t\t\n+\t\t// if nothing is selected, return nothing; can\'t chain anyway\n+\t\tif (!this.length) {\n+\t\t\toptions && options.debug && window.console && console.warn( "nothing selected, can\'t validate, returning nothing" );\n+\t\t\treturn;\n+\t\t}\n+\t\t\n+\t\t// check if a validator for this form was already created\n+\t\tvar validator = $.data(this[0], \'validator\');\n+\t\tif ( validator ) {\n+\t\t\treturn validator;\n+\t\t}\n+\t\t\n+\t\tvalidator = new $.validator( options, this[0] );\n+\t\t$.data(this[0], \'validator\', validator); \n+\t\t\n+\t\tif ( validator.settings.onsubmit ) {\n+\t\t\n+\t\t\t// allow suppresing validation by adding a cancel class to the submit button\n+\t\t\tthis.find("input, button").filter(".cancel").click(function() {\n+\t\t\t\tvalidator.cancelSubmit = true;\n+\t\t\t});\n+\t\t\n+\t\t\t// validate the form on submit\n+\t\t\tthis.submit( function( event ) {\n+\t\t\t\tif ( validator.settings.debug )\n+\t\t\t\t\t// prevent form submit to be able to see console output\n+\t\t\t\t\tevent.preventDefault();\n+\t\t\t\t\t\n+\t\t\t\tfunction handle() {\n+\t\t\t\t\tif ( validator.settings.submitHandler ) {\n+\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm );\n+\t\t\t\t\t\treturn false;\n+\t\t\t\t\t}\n+\t\t\t\t\treturn true;\n+\t\t\t\t}\n+\t\t\t\t\t\n+\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n+\t\t\t\tif ( validator.cancelSubmit ) {\n+\t\t\t\t\tvalidator.cancelSubmit = false;\n+\t\t\t\t\treturn handle();\n+\t\t\t\t}\n+\t\t\t\tif ( validator.form() ) {\n+\t\t\t\t\tif ( validator.pendingRequest ) {\n+\t\t\t\t\t\tvalidator.formSubmitted = true;\n+\t\t\t\t\t\treturn false;\n+\t\t\t\t\t}\n+\t\t\t\t\treturn handle();\n+\t\t\t\t} else {\n+\t\t\t\t\tvalidator.focusInvalid();\n+\t\t\t\t\treturn false;\n+\t\t\t\t}\n+\t\t\t});\n+\t\t}\n+\t\t\n+\t\treturn validator;\n+\t},\n+\t// http://docs.jquery.com/Plugins/Validation/valid\n+\tvalid: function() {\n+        if ( $(this[0]).is(\'form\')) {\n+            return this.validate().form();\n+        } else {\n+            var valid = false;\n+            var validator = $(this[0].form).validate();\n+            this.each(function() {\n+\t\t\t\tvalid |= validator.element(this);\n+            });\n+            return valid;\n+        }\n+    },\n+\t// attributes: space seperated list of attributes to retrieve and remove\n+\tremoveAttrs: function(attributes) {\n+\t\tvar result = {},\n+\t\t\t$element = this;\n+\t\t$.each(attributes.split(/\\s/), function(index, value) {\n+\t\t\tresult[value] = $element.attr(value);\n+\t\t\t$element.removeAttr(value);\n+\t\t});\n+\t\treturn result;\n+\t},\n+\t// http://docs.jquery.com/Plugins/Validation/rules\n+\trules: function(command, argument) {\n+\t\tvar element = this[0];\n+\t\t\n+\t\tif (command) {\n+\t\t\tvar settings = $.data(element.form, \'validator\').settings;\n+\t\t\tvar staticRules = settings.rules;\n+\t\t\tvar existingRules = $.validator.staticRules(element);\n+\t\t\tswitch(command) {\n+\t\t\tcase "add":\n+\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n+\t\t\t\tstaticRules[element.name] = existingRules;\n+\t\t\t\tif (argument.messages)\n+\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n+\t\t\t\tbreak;\n+\t\t\tcase "remove":\n+\t\t\t\tif (!argument) {\n+\t\t\t\t\tdelete staticRules[element.name];\n+\t\t\t\t\treturn existingRules;\n+\t\t\t\t}\n+\t\t\t\tvar filtered = {};\n+\t\t\t\t$.each(argument.split(/\\s/), function(index, method) {\n+\t\t\t\t\tfiltered[method] = existingRules[method];\n+\t\t\t\t\tdelete existingRules[method];\n+\t\t\t\t});\n+\t\t\t\treturn filtered;\n+\t\t\t}\n+\t\t}\n+\t\t\n+\t\tvar data = $.validator.normalizeRules(\n+\t\t$.extend(\n+\t\t\t{},\n+\t\t\t$.validator.metadataRules(element),\n+\t\t\t$.validator.classRules(element),\n+\t\t\t$.'..b'ion(value, element) {\n+\t\t\treturn this.optional(element) || /^\\d\\d?\\.\\d\\d?\\.\\d\\d\\d?\\d?$/.test(value);\n+\t\t},\n+\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\n+\t\tnumber: function(value, element) {\n+\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.test(value);\n+\t\t},\n+\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/numberDE\n+\t\tnumberDE: function(value, element) {\n+\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:\\.\\d{3})+)(?:,\\d+)?$/.test(value);\n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\n+\t\tdigits: function(value, element) {\n+\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\n+\t\t// based on http://en.wikipedia.org/wiki/Luhn\n+\t\tcreditcard: function(value, element) {\n+\t\t\tif ( this.optional(element) )\n+\t\t\t\treturn "dependency-mismatch";\n+\t\t\t// accept only digits and dashes\n+\t\t\tif (/[^0-9-]+/.test(value))\n+\t\t\t\treturn false;\n+\t\t\tvar nCheck = 0,\n+\t\t\t\tnDigit = 0,\n+\t\t\t\tbEven = false;\n+\n+\t\t\tvalue = value.replace(/\\D/g, "");\n+\n+\t\t\tfor (n = value.length - 1; n >= 0; n--) {\n+\t\t\t\tvar cDigit = value.charAt(n);\n+\t\t\t\tvar nDigit = parseInt(cDigit, 10);\n+\t\t\t\tif (bEven) {\n+\t\t\t\t\tif ((nDigit *= 2) > 9)\n+\t\t\t\t\t\tnDigit -= 9;\n+\t\t\t\t}\n+\t\t\t\tnCheck += nDigit;\n+\t\t\t\tbEven = !bEven;\n+\t\t\t}\n+\n+\t\t\treturn (nCheck % 10) == 0;\n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/accept\n+\t\taccept: function(value, element, param) {\n+\t\t\tparam = typeof param == "string" ? param : "png|jpe?g|gif";\n+\t\t\treturn this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); \n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n+\t\tequalTo: function(value, element, param) {\n+\t\t\treturn value == $(param).val();\n+\t\t}\n+\t\t\n+\t}\n+\t\n+});\n+\n+})(jQuery);\n+\n+// ajax mode: abort\n+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});\n+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() \n+;(function($) {\n+\tvar ajax = $.ajax;\n+\tvar pendingRequests = {};\n+\t$.ajax = function(settings) {\n+\t\t// create settings for compatibility with ajaxSetup\n+\t\tsettings = $.extend(settings, $.extend({}, $.ajaxSettings, settings));\n+\t\tvar port = settings.port;\n+\t\tif (settings.mode == "abort") {\n+\t\t\tif ( pendingRequests[port] ) {\n+\t\t\t\tpendingRequests[port].abort();\n+\t\t\t}\n+\t\t\treturn (pendingRequests[port] = ajax.apply(this, arguments));\n+\t\t}\n+\t\treturn ajax.apply(this, arguments);\n+\t};\n+})(jQuery);\n+\n+// provides cross-browser focusin and focusout events\n+// IE has native support, in other browsers, use event caputuring (neither bubbles)\n+\n+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\n+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target \n+\n+// provides triggerEvent(type: String, target: Element) to trigger delegated events\n+;(function($) {\n+\t$.each({\n+\t\tfocus: \'focusin\',\n+\t\tblur: \'focusout\'\t\n+\t}, function( original, fix ){\n+\t\t$.event.special[fix] = {\n+\t\t\tsetup:function() {\n+\t\t\t\tif ( $.browser.msie ) return false;\n+\t\t\t\tthis.addEventListener( original, $.event.special[fix].handler, true );\n+\t\t\t},\n+\t\t\tteardown:function() {\n+\t\t\t\tif ( $.browser.msie ) return false;\n+\t\t\t\tthis.removeEventListener( original,\n+\t\t\t\t$.event.special[fix].handler, true );\n+\t\t\t},\n+\t\t\thandler: function(e) {\n+\t\t\t\targuments[0] = $.event.fix(e);\n+\t\t\t\targuments[0].type = fix;\n+\t\t\t\treturn $.event.handle.apply(this, arguments);\n+\t\t\t}\n+\t\t};\n+\t});\n+\t$.extend($.fn, {\n+\t\tdelegate: function(type, delegate, handler) {\n+\t\t\treturn this.bind(type, function(event) {\n+\t\t\t\tvar target = $(event.target);\n+\t\t\t\tif (target.is(delegate)) {\n+\t\t\t\t\treturn handler.apply(target, arguments);\n+\t\t\t\t}\n+\t\t\t});\n+\t\t},\n+\t\ttriggerEvent: function(type, target) {\n+\t\t\treturn this.triggerHandler(type, [$.event.fix({ type: type, target: target })]);\n+\t\t}\n+\t})\n+})(jQuery);\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/openWindow.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/openWindow.js Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,5 @@
+
+function openWindow(loc)
+{
+ var w= window.open(loc);
+}
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/popupWin.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/popupWin.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,249 @@
+var popupWin
+
+Stamp = new Date();
+var Hours;
+var Mins;
+var Seconds;
+var uniqueWindow;
+Hours = Stamp.getHours();
+Minutes = Stamp.getMinutes();
+Seconds = Stamp.getSeconds();
+uniqueWindow = "popupWin_" + Hours + Minutes + Seconds;
+var win;
+
+//Function for opening a new window of given width or height
+function openWindow(page, wid, hei) {
+    if (wid == null) {
+        wid = 1200;
+    }
+    if (hei == null) {
+        hei = 600;
+    }
+    if (!popupWin || popupWin.closed) {
+        popupWin = window.open(page, uniqueWindow, "width=" + wid + ",height=" + hei + ",resizable=yes,scrollbars=yes");
+        popupWin.moveTo(250, 250);
+        popupWin.focus();
+    } else {
+        /*popupWin.close(); */
+        popupWin = window.open(page, uniqueWindow, "width=" + wid + ",height=" + hei + ",resizable=yes,scrollbars=yes");
+        popupWin.focus();
+    }
+}
+
+//Opening a new window
+function showPopup(some_url)
+{
+    win = window.open(some_url, 'popup', 'width=500,height=220,scrollbars=no,menubar=no');
+    win.moveTo(x + 20, y - 5);
+    return true;
+}
+
+//Closing a popup window.
+function closePopup()
+{
+    win.close();
+    return true;
+}
+//end hide --></script></head>
+
+//
+function closeMe(url) {
+    var wopener = url;
+
+ if(window.opener)  {
+        window.opener.location.href = wopener;
+     window.close();
+    } else {
+     window.location.href = wopener;
+    }
+}
+function move_box(an, box) {
+    var cleft = 0;
+    var ctop = 0;
+    var obj = an;
+    while (obj.offsetParent) {
+        cleft += obj.offsetLeft;
+        ctop += obj.offsetTop;
+        obj = obj.offsetParent;
+    }
+    //box.style.left = cleft + 'px';
+    box.style.left = 0 + 'px';
+    ctop += an.offsetHeight + 8;
+    if (document.body.currentStyle &&
+        document.body.currentStyle['marginTop']) {
+        ctop += parseInt(
+                document.body.currentStyle['marginTop']);
+    }
+    //box.style.top = ctop + 'px';
+    box.style.top = 0 + 'px';
+}
+//
+//function move_box( box, left, top) {
+//
+//    box.style.left = x + left + 'px';
+// box.style.top = y + top + 'px';
+//}
+
+//
+function fixed_box(box, left, top)
+{
+    //box.style.left = left + 'px';
+    //box.style.top = top + 'px';
+    box.style.left = 0 + 'px';
+    box.style.top = 0 + 'px';
+}
+
+function show_hide_box(an, width, height, borderStyle) {
+    hide("br");
+    var href = an.href;
+    var boxdiv = document.getElementById("br");
+
+    if (boxdiv != null) {
+        if (boxdiv.style.display == 'none') {
+            move_box(an, boxdiv, 0, 0);
+            boxdiv.style.display = 'block';
+        } else
+            boxdiv.style.display = 'none';
+        return false;
+    }
+
+    boxdiv = document.createElement('div');
+    boxdiv.setAttribute('id', "br");
+    // "br"
+
+    boxdiv.style.display = 'block';
+    boxdiv.style.position = 'absolute';
+    boxdiv.style.width = width + 'px';
+    boxdiv.style.height = height + 'px';
+    boxdiv.style.border = borderStyle;
+    boxdiv.style.backgroundColor = '#fff';
+
+    var contents = document.createElement('iframe');
+
+
+    contents.scrolling = 'no';
+    contents.frameBorder = '0';
+    contents.style.width = width + 'px';
+    contents.style.height = height + 'px';
+    contents.style.backgroundColor = "#ccc"
+    contents.src = href;
+
+    boxdiv.appendChild(contents);
+
+    document.body.appendChild(boxdiv);
+    move_box(an, boxdiv, 0, 0);
+
+    return false;
+}
+
+//
+function hide(an) {
+    //var href = an;
+    var boxdiv = document.getElementById(an);
+    if (boxdiv != null) {
+        if (boxdiv.style.display == 'block')
+            boxdiv.style.display = 'none';
+    }
+}
+
+function hide2() {
+    //var href = an;
+    var boxdiv = document.getElementById("br");
+    var select = document.getElementById("select")
+
+    if (boxdiv.style.display == 'block')
+        boxdiv.style.display = 'none';
+
+    if (select.style.display == 'block')
+        select.style.display = 'none';
+
+}
+
+
+function show(an, width, height, borderStyle) {
+    //selected();
+    hide(href);
+    //hide("select");
+
+    //selected();
+    var href = an.href;
+    // alert(href);
+    var boxdiv = document.getElementById(href);
+    //var selected = document.getElementById("select");
+    // if (boxdiv != null) {
+    // if (boxdiv.style.display == 'none') {
+    //           // move_box(an,boxdiv);
+    // fixed_box(boxdiv, 800, 50);
+    // boxdiv.style.display = 'block';
+    // } else
+    // boxdiv.style.display = 'none';
+    //
+    // return false;
+    // }
+
+    boxdiv = document.createElement('div');
+
+    boxdiv.setAttribute('id', href);
+    boxdiv.style.display = 'block';
+    boxdiv.style.position = 'absolute';
+    boxdiv.style.width = width + 'px';
+    boxdiv.style.height = height + 'px';
+    boxdiv.style.border = borderStyle;
+    boxdiv.style.backgroundColor = '#fff';
+
+    var contents = document.createElement('iframe');
+    contents.scrolling = 'no';
+    // contents.autoHideEnabled='yes'
+    contents.frameBorder = '0';
+    contents.style.width = width + 'px';
+    contents.style.height = height + 'px';
+
+
+    contents.src = href;
+
+    boxdiv.appendChild(contents);
+    document.body.appendChild(boxdiv);
+    fixed_box(boxdiv, 800, 50);
+
+
+    //selected = document.createElement('div');
+
+    //selected.setAttribute('id', "select");
+
+    //
+    // selected.style.display = 'block';
+    // selected.style.position = 'absolute';
+    //
+    // selected.style.width = 20 + 'px';
+    // selected.style.height = 10 + 'px';
+    // selected.style.backgroundColor = '#fff';
+    // selected.innerHTML = "<html><table><tr><td  class=\"webSiteBodyGreenText\"><img src=\"/glycomics/common/images/red_arrow_up.gif\" width=\"12\" height=\"16\"/></td></td></table><html>";
+    // document.body.appendChild(selected);
+    //move_box(an, selected, -10, 5);
+
+    return false;
+}
+
+function SwitchMenu(obj) {
+    if (document.getElementById) { //DynamicDrive.com change
+        document.write('<style \n')
+        document.write('.submenu{display: none;}\n')
+        document.write('</style>\n')
+    }
+
+    if (document.getElementById) {
+        var el = document.getElementById(obj);
+        var ar = document.getElementById("masterdiv").getElementsByTagName("span");
+        //DynamicDrive.com change
+        if (el.style.display != "block") { //DynamicDrive.com change
+
+            if (ar.className == "submenu") //DynamicDrive.com change
+                ar.style.display = "none";
+
+            el.style.display = "block";
+        } else {
+            el.style.display = "none";
+        }
+    }
+}
+
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Primary Screen_files/webtrends.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Primary Screen_files/webtrends.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,760 @@\n+// WebTrends SmartSource Data Collector Tag\n+// Version: 8.6.0     \n+// Tag Builder Version: 2.1.0\n+// Created: 04/17/2009 4:49:40\n+// Updated: 04/06/2010\n+\n+function WebTrends(){\n+\tvar that=this;\n+\t// begin: user modifiable\n+\tthis.dcsid="dcsc2bh0q10000cprjxnf6sz5_6h4b";\n+\tthis.domain="statse.webtrendslive.com";\n+\tthis.timezone=-5;\n+\tthis.fpcdom="";\n+\tthis.onsitedoms="www.nature.com, blog-msb.embo.org, blogs.nature.com,cmckb.cellmigration.org, connotea.org, functionalglycomics.com, go.nature.com, guide.labanimal.com, kb.psi-structuralgenomics.org, lipidmaps.org, nature.com, natureasia.com, naturechina.com.cn, network.nature.com, neuroscience-gateway.org, pid.nci.nih.gov, precedings.nature.com, scintilla.nature.com, secure.nature.com, signaling-gateway.org, spotlight.nature.com, npg.nature.com, press.nature.com , palgrave-connect.com, www.cellmigration.org, www.connotea.org, www.econolog.net, www.functionalglycomics.org, www.labanimal.com, www.lipidmaps.org, www.natureasia.com, www.neuroscience-gateway.org, www.palgrave-journals.com, www.rikenresearch.riken.jp, www.scitable.com, www.signaling-gateway.org, cmkb.cellmigration.org, nrgwiki.nature.com, www.iaor-palgrave.com, www.natureprotocols.com, media.nature.com";\n+\tthis.downloadtypes="xls,doc,pdf,ris,txt,csv,zip,mp3,mp4,mov,AVI,bin,bmp,BMP,cdx,cml,CSS,css,dat,db,exe,Exe,GIF,gif,gz,HTM,jar,java,jpg,mol,pkg,png,ppt,psd,rss,sgml,tab,TAB,tgz,ttf,TXT,utf,xml,rdf";\n+\tthis.metanames="Access, citation_title, citation_journal_title, citation_date,citation_volume,citation_issue,citation_doi";\n+\tthis.trackevents=true;\n+\tthis.enabled=true;\n+\tthis.i18n=false;\n+\tthis.fpc="WT_FPC";\n+\t// end: user modifiable\n+\tthis.DCS={};\n+\tthis.WT={};\n+\tthis.DCSext={};\n+\tthis.images=[];\n+\tthis.index=0;\n+\tthis.qp=[];\n+\tthis.exre=(function(){return(window.RegExp?new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)","i"):"");})();\n+\tthis.re=(function(){return(window.RegExp?(that.i18n?{"%25":/\\%/g}:{"%09":/\\t/g,"%20":/ /g,"%23":/\\#/g,"%26":/\\&/g,"%2B":/\\+/g,"%3F":/\\?/g,"%5C":/\\\\/g,"%22":/\\"/g,"%7F":/\\x7F/g,"%A0":/\\xA0/g}):"");})();\n+}\n+WebTrends.prototype.dcsGetId=function(){\n+\tif (this.enabled&&(document.cookie.indexOf(this.fpc+"=")==-1)&&(document.cookie.indexOf("WTLOPTOUT=")==-1)){\n+\t\tdocument.write("<scr"+"ipt type=\'text/javascript\' src=\'"+"http"+(window.location.protocol.indexOf(\'https:\')==0?\'s\':\'\')+"://"+this.domain+"/"+this.dcsid+"/wtid.js"+"\'><\\/scr"+"ipt>");\n+\t}\n+}\n+WebTrends.prototype.dcsGetCookie=function(name){\n+\tvar cookies=document.cookie.split("; ");\n+\tvar cmatch=[];\n+\tvar idx=0;\n+\tvar i=0;\n+\tvar namelen=name.length;\n+\tvar clen=cookies.length;\n+\tfor (i=0;i<clen;i++){\n+\t\tvar c=cookies[i];\n+\t\tif ((c.substring(0,namelen+1))==(name+"=")){\n+\t\t\tcmatch[idx++]=c;\n+\t\t}\n+\t}\n+\tvar cmatchCount=cmatch.length;\n+\tif (cmatchCount>0){\n+\t\tidx=0;\n+\t\tif ((cmatchCount>1)&&(name==this.fpc)){\n+\t\t\tvar dLatest=new Date(0);\n+\t\t\tfor (i=0;i<cmatchCount;i++){\n+\t\t\t\tvar lv=parseInt(this.dcsGetCrumb(cmatch[i],"lv"));\n+\t\t\t\tvar dLst=new Date(lv);\n+\t\t\t\tif (dLst>dLatest){\n+\t\t\t\t\tdLatest.setTime(dLst.getTime());\n+\t\t\t\t\tidx=i;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t\treturn unescape(cmatch[idx].substring(namelen+1));\n+\t}\n+\telse{\n+\t\treturn null;\n+\t}\n+}\n+WebTrends.prototype.dcsGetCrumb=function(cval,crumb,sep){\n+\tvar aCookie=cval.split(sep||":");\n+\tfor (var i=0;i<aCookie.length;i++){\n+\t\tvar aCrumb=aCookie[i].split("=");\n+\t\tif (crumb==aCrumb[0]){\n+\t\t\treturn aCrumb[1];\n+\t\t}\n+\t}\n+\treturn null;\n+}\n+WebTrends.prototype.dcsGetIdCrumb=function(cval,crumb){\n+\tvar id=cval.substring(0,cval.indexOf(":lv="));\n+\tvar aCrumb=id.split("=");\n+\tfor (var i=0;i<aCrumb.length;i++){\n+\t\tif (crumb==aCrumb[0]){\n+\t\t\treturn aCrumb[1];\n+\t\t}\n+\t}\n+\treturn null;\n+}\n+WebTrends.prototype.dcsIsFpcSet=function(name,id,lv,ss){\n+\tvar c=this.dcsGetCookie(name);\n+\tif (c){\n+\t\treturn ((id==this.dcsGetIdCrumb(c,"id"))&&(lv==this.dcsGetCrumb(c,"lv"))&&(ss==this.dcsGetCrumb(c,"ss")))?0:3;\n+\t}\n+\treturn 2;\n+}\n+WebTrends.prototype.dcsFPC=f'..b'bTrends.prototype.dcsMeta=function(){\n+\tvar elems;\n+\tif (document.all){\n+\t\telems=document.all.tags("meta");\n+\t}\n+\telse if (document.documentElement){\n+\t\telems=document.getElementsByTagName("meta");\n+\t}\n+\tif (typeof(elems)!="undefined"){\n+\t\tvar length=elems.length;\n+\t\tfor (var i=0;i<length;i++){\n+\t\t\tvar name=elems.item(i).name;\n+\t\t\tvar content=elems.item(i).content;\n+\t\t\tvar equiv=elems.item(i).httpEquiv;\n+\t\t\tif (name.length>0){\n+\t\t\t\tif (name.toUpperCase().indexOf("WT.")==0){\n+\t\t\t\t\tthis.WT[name.substring(3)]=content;\n+\t\t\t\t}\n+\t\t\t\telse if (name.toUpperCase().indexOf("DCSEXT.")==0){\n+\t\t\t\t\tthis.DCSext[name.substring(7)]=content;\n+\t\t\t\t}\n+\t\t\t\telse if (name.toUpperCase().indexOf("DCS.")==0){\n+\t\t\t\t\tthis.DCS[name.substring(4)]=content;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t}\n+}\n+WebTrends.prototype.dcsTag=function(){\n+\tif (document.cookie.indexOf("WTLOPTOUT=")!=-1){\n+\t\treturn;\n+\t}\n+\tvar WT=this.WT;\n+\tvar DCS=this.DCS;\n+\tvar DCSext=this.DCSext;\n+\tvar i18n=this.i18n;\n+\tvar P="http"+(window.location.protocol.indexOf(\'https:\')==0?\'s\':\'\')+"://"+this.domain+(this.dcsid==""?\'\':\'/\'+this.dcsid)+"/dcs.gif?";\n+\tif (i18n){\n+\t\tWT.dep="";\n+\t}\n+\tfor (var N in DCS){\n+ \t\tif (DCS[N]&&(typeof DCS[N]!="function")){\n+\t\t\tP+=this.dcsA(N,DCS[N]);\n+\t\t}\n+\t}\n+\tvar keys=["co_f","vtid","vtvs","vt_f_tlv"];\n+\tfor (var i=0;i<keys.length;i++){\n+\t\tvar key=keys[i];\n+\t\tif (WT[key]){\n+\t\t\tP+=this.dcsA("WT."+key,WT[key]);\n+\t\t\tdelete WT[key];\n+\t\t}\n+\t}\n+\tfor (N in WT){\n+\t\tif (WT[N]&&(typeof WT[N]!="function")){\n+\t\t\tP+=this.dcsA("WT."+N,WT[N]);\n+\t\t}\n+\t}\n+\tfor (N in DCSext){\n+\t\tif (DCSext[N]&&(typeof DCSext[N]!="function")){\n+\t\t\tif (i18n){\n+\t\t\t\tWT.dep=(WT.dep.length==0)?N:(WT.dep+";"+N);\n+\t\t\t}\n+\t\t\tP+=this.dcsA(N,DCSext[N]);\n+\t\t}\n+\t}\n+\tif (i18n&&(WT.dep.length>0)){\n+\t\tP+=this.dcsA("WT.dep",WT.dep);\n+\t}\n+\tif (P.length>2048&&navigator.userAgent.indexOf(\'MSIE\')>=0){\n+\t\tP=P.substring(0,2040)+"&WT.tu=1";\n+\t}\n+\tthis.dcsCreateImage(P);\n+\tthis.WT.ad="";\n+}\n+WebTrends.prototype.dcsDebug=function(){\n+\tvar t=this;\n+\tvar i=t.images[0].src;\n+\tvar q=i.indexOf("?");\n+\tvar r=i.substring(0,q).split("/");\n+\tvar m="<b>Protocol</b><br><code>"+r[0]+"<br></code>";\n+\tm+="<b>Domain</b><br><code>"+r[2]+"<br></code>";\n+\tm+="<b>Path</b><br><code>/"+r[3]+"/"+r[4]+"<br></code>";\n+\tm+="<b>Query Params</b><code>"+i.substring(q+1).replace(/\\&/g,"<br>")+"</code>";\n+\tm+="<br><b>Cookies</b><br><code>"+document.cookie.replace(/\\;/g,"<br>")+"</code>";\n+\tif (t.w&&!t.w.closed){\n+\t\tt.w.close();\n+\n+\t}\n+\tt.w=window.open("","dcsDebug","width=500,height=650,scrollbars=yes,resizable=yes");\n+\tt.w.document.write(m);\n+\tt.w.focus();\n+}\n+\n+WebTrends.prototype.isonsiteHelper=function(host)\n+{\n+    var osda=this.onsitedoms.split(",");\n+    var len=osda.length;\n+    for (x=0; x<len; x++)\n+    {\n+    \tvar o=osda[x].trim();\n+    \tif (host.indexOf(o.toLowerCase())==0)\n+    \t{\n+    \t\treturn true;\n+    \t}\n+    }\n+    return false;\t\n+}\n+WebTrends.prototype.dcsCollect=function(){\n+    if (this.enabled){\n+        this.dcsVar();\n+        this.dcsMeta();\n+        this.dcsAdv();\n+        this.dcsTag();\n+    }\n+}\n+\n+//custom function to get window host\n+WebTrends.prototype.getHost=function(){\n+    host = window.location.hostname.toLowerCase();\n+    //if host starts with www.nature.com but also includes gatway domain (is longer than 14 char)\n+    if ((host.substr(0,14)=="www.nature.com")&&(host.length>14)) {\n+        _tag.DCSext.gateway=host.substr(14,host.length);\n+        //return trimed version of host name\n+        return host.substr(0,14);\n+    } else {\n+        //else return full host\n+        return host;\n+    }\n+}\n+\n+function dcsMultiTrack(){\n+\tif (typeof(_tag)!="undefined"){\n+\t\treturn(_tag.dcsMultiTrack());\n+\t}\n+}\n+\n+function dcsDebug(){\n+\tif (typeof(_tag)!="undefined"){\n+\t\treturn(_tag.dcsDebug());\n+\t}\n+}\n+\n+Function.prototype.wtbind = function(obj){\n+\tvar method=this;\n+\tvar temp=function(){\n+\t\treturn method.apply(obj,arguments);\n+\t};\n+\treturn temp;\n+}\n+\n+String.prototype.trim = function () {\n+    return this.replace(/^\\s*/, "").replace(/\\s*$/, "");\n+}\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens.html Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,234197 @@\n+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><!--\n+## Site Configuration\n+## @siteName\tFG\n+## @scope\t\tSite\n+## @adaption\ttaken from ABA by JDG@NPG 2006\n+--><!-- used in ${common}/includes/separator.fhtml --><!-- used in ${common}/includes/clearfloats.fhtml --><!-- used in ${common}/includes/global.backtotop.fhtml --><!-- SET THE BASE FOLDERS FOR THE SITE --><head>\n+\n+<title>Selected Primary Screens</title>\n+\n+\n+\t\n+\t\n+\t\n+\t<!-- metadata and links -->\n+<meta http-equiv="Content-Style-Type" content="text/css">\n+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">\n+\n+<link rel="home" href="http://www.functionalglycomics.org/fg/index.shtml" title="home">\n+\n+<!-- provide correct meta robots information - all pages except TOC pages (AOP, Issue, Focus (web and other), Supplements) use default "noarchive" type -->\n+\n+<meta name="robots" content="noarchive">\n+\n+\n+<!-- end metadata and links -->\n+\n+<meta name="keywords" content="">\n+<meta name="description" content="">\n+\n+<style type="text/css" media="screen, projection"><!--/*--><![CDATA[/*><!--*/\n+\t\t    @import "/fg/style/layout.css";\n+\t\t    @import "/fg/style/site.css";\n+\t\t    @import "/fg/style/header_footer_smallfonts.css";\n+\t\t\t@import "/fg/style/restrict_width/930px.css";/* do not edit this stylesheet */\n+/*]]>*/--></style>\n+\n+<!-- IE specific scripts - min/max fix -->\n+<!--[if lte IE 6]>\n+\t<script type="text/javascript" src="/fg/scripts/minmax.js"></script>\n+<![endif]-->\n+<!-- end IE specific scripts -->\n+\n+<style type="text/css" media="screen, projection"><!--/*--><![CDATA[/*><!--*/\n+@import "/glycomics/common/css/general.css";\n+@import "/glycomics/common/css/jquery-ui-1.8.16.custom.css";\n+@import "/glycomics/common/css/jquery.bubblepopup.v2.3.1.css";\n+label.error { float: none; color: red; padding-left: .5em; vertical-align: middle; };\n+/*]]>*/--></style>\n+\n+<script src="Selected%20Primary%20Screens_files/ga.js" async="" type="text/javascript"></script><script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/css_sidemenu.js"></script>\n+<script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/openWindow.js"></script>\n+<script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/AnchorPosition.js"></script>\n+<script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/CalendarPopup.js"></script>\n+<script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/date.js"></script>\n+<script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/PopupWindow.js"></script>\n+<script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/popupWin.js"></script>\n+<script type="text/javascript" language="javascript" src="Selected%20Primary%20Screens_files/details3.js"></script>\n+<script type="text/javascript" src="Selected%20Primary%20Screens_files/jquery-1.js" language="javascript"></script>\n+<script type="text/javascript" src="Selected%20Primary%20Screens_files/jquery_003.js" language="javascript"></script>\n+\n+\n+</head>\n+\n+<body class="www-nature-com-fg" id="info">\n+\n+<!-- header -->\n+<div id="head-er">\n+\t<div class="header-nonad-wrapper" id="top">\n+\t\t<div class="accessibility-login-wrap">\n+\t\t\t<div class="accessibility-login">\n+\t\t\t\t<ul class="jumplinks">\n+\t\t\t\t\t<li class="first"><a href="#content">Jump&nbsp;to&nbsp;main&nbsp;content</a></li>\n+\t\t\t\t\t<li><a href="#main-journal-nav">Jump&nbsp;to&nbsp;navigation</a></li>\n+\t\t\t\t</ul>\n+\t\t\t\t\n+<span class="cleardiv"><!-- --></span>\n+\n+\t\t\t</div>\n+\t\t</div>\n+\n+\t\t\n+<span class="cleardiv"><!-- --></span>\n+\n+\t\t\n+<hr>\n+\n+\n+\t\t<div class="image-user-services-wrap">\n+\t\t\t<div class="image-user-services">\n+\t\t\t\t<a href="http://www.functionalglycomics.org/fg"><img src="S'..b'p;operationType=view&amp;cbpId=cbp_hum_Stlect_00118&amp;sideMenu=no\')">PROTEIN View:cbp_hum_Stlect_00118</a></td>\n+\t\t\t\t<td class="webSiteBody">Human</td>\n+\t\t\t\t<td class="webSiteBody">Galectin</td>\n+\t\t\t\t<td class="webSiteBody"><a href="javascript:openWindow(\'http://www.biochem.emory.edu/cgi-bin/people/detail_faculty?id=rdcummi\')">Richard D. Cummings</a></td>\n+\t\t\t\t<td>\n+\t\t\t\t<table>\n+\t\t\t\t\t<tbody><tr>\n+\t\t\t\t\t\t<td class="webSiteBody" align="center"></td>\n+\t\t\t\t\t</tr>\n+\t\t\t\t\t<tr>\n+\t\t\t\t\t\t<td class="websiteBodyLight" align="center">Mammalian Plate Array Ver. 2</td>\n+\t\t\t\t\t</tr>\n+                    <tr>\n+\t\t\t\t\t\t<td class="websiteBodyLight" align="center">&nbsp;</td>\n+                    </tr>\n+                </tbody></table>\n+\t\t\t\t</td>\n+\t\t\t\t\n+\t\t\t\t\n+\t\t\t\t<td class="webSiteBody">\n+\t\t\t\t<table>\n+\t\t\t\t\t<tbody><tr>\n+\t\t\t\t\t\t<td align="center" width="33%"><a href="javascript:openWindow(\'http://www.functionalglycomics.org:80/glycomics/HServlet?operation=view&amp;sideMenu=no&amp;psId=primscreen_GLYCAN_v2_10_02132003\')" onmouseout="switchPresentationImage(\'data_button_h_5549\',9)" onmouseover="switchPresentationImage(\'data_button_h_5549\',8)"><img src="Selected%20Primary%20Screens_files/array_inactive.jpg" alt="View Primary Screen Information" name="data_button_h_5549" id="data_button_h_5549" border="0" height="40" width="40"></a></td>\n+\t\t\t\t\t\t<td align="center" width="33%"></td>\n+\t\t\t\t\t\t<td align="center" width="33%"></td>\n+\t\t\t\t\t</tr>\n+\t\t\t\t\t<tr>\n+\t\t\t\t\t\t<td class="websiteBodyLight" colspan="3" align="center">Mar 29, 03</td>\n+\t\t\t\t\t</tr>\n+\t\t\t\t\t<tr>\n+\t\t\t\t\t\t<td class="websiteBodyLight" colspan="3" align="center">Public Data</td>\n+\t\t\t\t\t</tr>\n+\n+\t\t\t\t</tbody></table>\n+\t\t\t\t</td>\n+\t\t\t</tr>\n+\t\t\n+\t\t\t\n+\t\t</tbody></table>\n+\t\t</td>\n+</tr>\n+</tbody></table>\n+\n+</div>\n+</div><!-- CLOSEs CONTENT-JOURNALNAV DIV -->\n+\n+</div></div>\n+\n+\n+\n+<p class="back-to-top hidden"><a href="#top">Top<span class="hidden"> of page</span></a></p>\n+\n+\n+\n+<div id="foot-er" class="footer">\n+\n+    <div id="footer-journal">\n+\n+        <div class="footer-constrain clearfix">\n+\n+\t\t\t<p class="journal-name">Functional Glycomics Gateway</p>\n+\n+\t\t\t<p class="eissn"><abbr title="International Standard Serial Number">ISSN</abbr><span class="hidden">:</span> 1752-184X</p>        \n+\n+        \t\n+<span class="cleardiv"><!-- --></span>\n+\n+\n+\t\t</div>\n+\n+        \n+<span class="cleardiv"><!-- --></span>\n+\n+\n+    </div>\n+\n+\t\n+\n+\t<div id="footer-copyright">\n+\n+\t\t<div class="footer-constrain">\n+\n+\t\t\t<p>\xa9 2010 Functional Glycomics Gateway - All Rights Reserved | <a href="http://www.functionalglycomics.org/fg/privacy_terms.shtml">Privacy policy &amp; Terms of Use</a></p>\n+\n+\t\t</div>\n+\n+\t</div>\n+\n+</div>\n+<!-- webtrends Version: 8.5.0 --> \n+<script src="Selected%20Primary%20Screens_files/webtrends.js" type="text/javascript"></script> \n+<script type="text/javascript"> \n+<!--//--><![CDATA[//><!-- \n+\t\tvar _tag=new WebTrends(); \n+\t\t_tag.dcsGetId(); \n+//--><!]]> \n+</script> \n+<script type="text/javascript"> <!--//--><![CDATA[//><!-- \n+\t\t// Add custom parameters here. \n+\t\t// _tag.DCSext.param_name=param_value; \n+\t\t_tag.dcsCollect(); \n+//--><!]]> \n+</script> \n+<noscript> \n+<div><img alt="" id="DCSIMG" width="1" height="1" src="http://statse.webtrendslive.com/dcsc2bh0q10000cprjxnf6sz5_6h4b/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=8.5.0" />\n+</div> \n+</noscript>\n+\n+<!-- Google Analytics -->\n+<script type="text/javascript">\n+\n+  var _gaq = _gaq || [];\n+  _gaq.push([\'_setAccount\', \'UA-23107886-2\']);\n+  _gaq.push([\'_trackPageview\']);\n+\n+  (function() {\n+    var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;\n+    ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n+    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n+  })();\n+\n+</script>\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+<!-- ================ -->\n+<!--  END OF CONTENT  -->\n+<!-- ================ -->\n+\n+\n+\n+</body></html>\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/AnchorPosition.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/AnchorPosition.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,147 @@
+// ===================================================================
+// Author: Matt Kruse <matt@mattkruse.com>
+// WWW: http://www.mattkruse.com/
+//
+// NOTICE: You may use this code for any purpose, commercial or
+// private, without any further permission from the author. You may
+// remove this notice from your final code if you wish, however it is
+// appreciated by the author if at least my web site address is kept.
+//
+// You may *NOT* re-distribute this code in any way except through its
+// use. That means, you can include it in your product, or your web
+// site, or any other form where the code is actually being used. You
+// may not put the plain javascript up on your site for download or
+// include it in your javascript libraries for download. 
+// If you wish to share this code with others, please just point them
+// to the URL instead.
+// Please DO NOT link directly to my .js files from your site. Copy
+// the files to your server and use them there. Thank you.
+// ===================================================================
+
+/* 
+AnchorPosition.js
+Author: Matt Kruse
+Last modified: 10/11/02
+
+DESCRIPTION: These functions find the position of an <A> tag in a document,
+so other elements can be positioned relative to it.
+
+COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
+positioning errors - usually with Window positioning - occur on the 
+Macintosh platform.
+
+FUNCTIONS:
+getAnchorPosition(anchorname)
+  Returns an Object() having .x and .y properties of the pixel coordinates
+  of the upper-left corner of the anchor. Position is relative to the PAGE.
+
+getAnchorWindowPosition(anchorname)
+  Returns an Object() having .x and .y properties of the pixel coordinates
+  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.
+
+NOTES:
+
+1) For popping up separate browser windows, use getAnchorWindowPosition. 
+   Otherwise, use getAnchorPosition
+
+2) Your anchor tag MUST contain both NAME and ID attributes which are the 
+   same. For example:
+   <A NAME="test" ID="test"> </A>
+
+3) There must be at least a space between <A> </A> for IE5.5 to see the 
+   anchor tag correctly. Do not do <A></A> with no space.
+*/ 
+
+// getAnchorPosition(anchorname)
+//   This function returns an object having .x and .y properties which are the coordinates
+//   of the named anchor, relative to the page.
+function getAnchorPosition(anchorname) {
+ // This function will return an Object with x and y properties
+ var useWindow=false;
+ var coordinates=new Object();
+ var x=0,y=0;
+ // Browser capability sniffing
+ var use_gebi=false, use_css=false, use_layers=false;
+ if (document.getElementById) { use_gebi=true; }
+ else if (document.all) { use_css=true; }
+ else if (document.layers) { use_layers=true; }
+ // Logic to find position
+  if (use_gebi && document.all) {
+ x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
+ y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
+ }
+ else if (use_gebi) {
+ var o=document.getElementById(anchorname);
+ x=AnchorPosition_getPageOffsetLeft(o);
+ y=AnchorPosition_getPageOffsetTop(o);
+ }
+  else if (use_css) {
+ x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
+ y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
+ }
+ else if (use_layers) {
+ var found=0;
+ for (var i=0; i<document.anchors.length; i++) {
+ if (document.anchors[i].name==anchorname) { found=1; break; }
+ }
+ if (found==0) {
+ coordinates.x=0; coordinates.y=0; return coordinates;
+ }
+ x=document.anchors[i].x;
+ y=document.anchors[i].y;
+ }
+ else {
+ coordinates.x=0; coordinates.y=0; return coordinates;
+ }
+ coordinates.x=x;
+ coordinates.y=y;
+ return coordinates;
+ }
+
+// getAnchorWindowPosition(anchorname)
+//   This function returns an object having .x and .y properties which are the coordinates
+//   of the named anchor, relative to the window
+function getAnchorWindowPosition(anchorname) {
+ var coordinates=getAnchorPosition(anchorname);
+ var x=0;
+ var y=0;
+ if (document.getElementById) {
+ if (isNaN(window.screenX)) {
+ x=coordinates.x-document.body.scrollLeft+window.screenLeft;
+ y=coordinates.y-document.body.scrollTop+window.screenTop;
+ }
+ else {
+ x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
+ y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
+ }
+ }
+ else if (document.all) {
+ x=coordinates.x-document.body.scrollLeft+window.screenLeft;
+ y=coordinates.y-document.body.scrollTop+window.screenTop;
+ }
+ else if (document.layers) {
+ x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
+ y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
+ }
+ coordinates.x=x;
+ coordinates.y=y;
+ return coordinates;
+ }
+
+// Functions for IE to get position of an object
+function AnchorPosition_getPageOffsetLeft (el) {
+ var ol=el.offsetLeft;
+ while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
+ return ol;
+ }
+function AnchorPosition_getWindowOffsetLeft (el) {
+ return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
+ }
+function AnchorPosition_getPageOffsetTop (el) {
+ var ot=el.offsetTop;
+ while((el=el.offsetParent) != null) { ot += el.offsetTop; }
+ return ot;
+ }
+function AnchorPosition_getWindowOffsetTop (el) {
+ return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
+ }
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/CalendarPopup.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/CalendarPopup.js Wed Mar 23 14:35:56 2016 -0400
[
b"@@ -0,0 +1,692 @@\n+// ===================================================================\r\n+// Author: Matt Kruse <matt@mattkruse.com>\r\n+// WWW: http://www.mattkruse.com/\r\n+//\r\n+// NOTICE: You may use this code for any purpose, commercial or\r\n+// private, without any further permission from the author. You may\r\n+// remove this notice from your final code if you wish, however it is\r\n+// appreciated by the author if at least my web site address is kept.\r\n+//\r\n+// You may *NOT* re-distribute this code in any way except through its\r\n+// use. That means, you can include it in your product, or your web\r\n+// site, or any other form where the code is actually being used. You\r\n+// may not put the plain javascript up on your site for download or\r\n+// include it in your javascript libraries for download. \r\n+// If you wish to share this code with others, please just point them\r\n+// to the URL instead.\r\n+// Please DO NOT link directly to my .js files from your site. Copy\r\n+// the files to your server and use them there. Thank you.\r\n+// ===================================================================\r\n+\r\n+// HISTORY\r\n+// ------------------------------------------------------------------\r\n+// Feb 7, 2005: Fixed a CSS styles to use px unit\r\n+// March 29, 2004: Added check in select() method for the form field\r\n+//      being disabled. If it is, just return and don't do anything.\r\n+// March 24, 2004: Fixed bug - when month name and abbreviations were\r\n+//      changed, date format still used original values.\r\n+// January 26, 2004: Added support for drop-down month and year\r\n+//      navigation (Thanks to Chris Reid for the idea)\r\n+// September 22, 2003: Fixed a minor problem in YEAR calendar with\r\n+//      CSS prefix.\r\n+// August 19, 2003: Renamed the function to get styles, and made it\r\n+//      work correctly without an object reference\r\n+// August 18, 2003: Changed showYearNavigation and \r\n+//      showYearNavigationInput to optionally take an argument of\r\n+//      true or false\r\n+// July 31, 2003: Added text input option for year navigation.\r\n+//      Added a per-calendar CSS prefix option to optionally use \r\n+//      different styles for different calendars.\r\n+// July 29, 2003: Fixed bug causing the Today link to be clickable \r\n+//      even though today falls in a disabled date range.\r\n+//      Changed formatting to use pure CSS, allowing greater control\r\n+//      over look-and-feel options.\r\n+// June 11, 2003: Fixed bug causing the Today link to be unselectable\r\n+//      under certain cases when some days of week are disabled\r\n+// March 14, 2003: Added ability to disable individual dates or date\r\n+//      ranges, display as light gray and strike-through\r\n+// March 14, 2003: Removed dependency on graypixel.gif and instead \r\n+///     use table border coloring\r\n+// March 12, 2003: Modified showCalendar() function to allow optional\r\n+//      start-date parameter\r\n+// March 11, 2003: Modified select() function to allow optional\r\n+//      start-date parameter\r\n+/* \r\n+DESCRIPTION: This object implements a popup calendar to allow the user to\r\n+select a date, month, quarter, or year.\r\n+\r\n+COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small\r\n+positioning errors - usually with Window positioning - occur on the \r\n+Macintosh platform.\r\n+The calendar can be modified to work for any location in the world by \r\n+changing which weekday is displayed as the first column, changing the month\r\n+names, and changing the column headers for each day.\r\n+\r\n+USAGE:\r\n+// Create a new CalendarPopup object of type WINDOW\r\n+var cal = new CalendarPopup(); \r\n+\r\n+// Create a new CalendarPopup object of type DIV using the DIV named 'mydiv'\r\n+var cal = new CalendarPopup('mydiv'); \r\n+\r\n+// Easy method to link the popup calendar with an input box. \r\n+cal.select(inputObject, anchorname, dateFormat);\r\n+// Same method, but passing a default date other than the field's current value\r\n+cal.select(inputObject, anchorname, dateFormat, '01/02/2000');\r\n+// Th"..b'/ Code common for MONTH, QUARTER, YEAR\r\n+\t// ------------------------------------\r\n+\tif (this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year") {\r\n+\t\tif (arguments.length > 0) { var year = arguments[0]; }\r\n+\t\telse { \r\n+\t\t\tif (this.displayType=="year") {\tvar year = now.getFullYear()-this.yearSelectStartOffset; }\r\n+\t\t\telse { var year = now.getFullYear(); }\r\n+\t\t\t}\r\n+\t\tif (this.displayType!="year" && this.isShowYearNavigation) {\r\n+\t\t\tresult += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";\r\n+\t\t\tresult += \'<TR>\\n\';\r\n+\t\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="22"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year-1)+\');">&lt;&lt;</A></TD>\\n\';\r\n+\t\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="100">\'+year+\'</TD>\\n\';\r\n+\t\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="22"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year+1)+\');">&gt;&gt;</A></TD>\\n\';\r\n+\t\t\tresult += \'</TR></TABLE>\\n\';\r\n+\t\t\t}\r\n+\t\t}\r\n+\t\t\r\n+\t// Code for MONTH display \r\n+\t// ----------------------\r\n+\tif (this.displayType=="month") {\r\n+\t\t// If POPUP, write entire HTML document\r\n+\t\tresult += \'<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\\n\';\r\n+\t\tfor (var i=0; i<4; i++) {\r\n+\t\t\tresult += \'<TR>\';\r\n+\t\t\tfor (var j=0; j<3; j++) {\r\n+\t\t\t\tvar monthindex = ((i*3)+j);\r\n+\t\t\t\tresult += \'<TD WIDTH=33% ALIGN=CENTER><A CLASS="\'+this.cssPrefix+\'cpText" HREF="javascript:\'+windowref+this.returnMonthFunction+\'(\'+year+\',\'+(monthindex+1)+\');\'+windowref+\'CP_hideCalendar(\\\'\'+this.index+\'\\\');" CLASS="\'+date_class+\'">\'+this.monthAbbreviations[monthindex]+\'</A></TD>\';\r\n+\t\t\t\t}\r\n+\t\t\tresult += \'</TR>\';\r\n+\t\t\t}\r\n+\t\tresult += \'</TABLE></CENTER></TD></TR></TABLE>\\n\';\r\n+\t\t}\r\n+\t\r\n+\t// Code for QUARTER display\r\n+\t// ------------------------\r\n+\tif (this.displayType=="quarter") {\r\n+\t\tresult += \'<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\\n\';\r\n+\t\tfor (var i=0; i<2; i++) {\r\n+\t\t\tresult += \'<TR>\';\r\n+\t\t\tfor (var j=0; j<2; j++) {\r\n+\t\t\t\tvar quarter = ((i*2)+j+1);\r\n+\t\t\t\tresult += \'<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="\'+this.cssPrefix+\'cpText" HREF="javascript:\'+windowref+this.returnQuarterFunction+\'(\'+year+\',\'+quarter+\');\'+windowref+\'CP_hideCalendar(\\\'\'+this.index+\'\\\');" CLASS="\'+date_class+\'">Q\'+quarter+\'</A><BR><BR></TD>\';\r\n+\t\t\t\t}\r\n+\t\t\tresult += \'</TR>\';\r\n+\t\t\t}\r\n+\t\tresult += \'</TABLE></CENTER></TD></TR></TABLE>\\n\';\r\n+\t\t}\r\n+\r\n+\t// Code for YEAR display\r\n+\t// ---------------------\r\n+\tif (this.displayType=="year") {\r\n+\t\tvar yearColumnSize = 4;\r\n+\t\tresult += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";\r\n+\t\tresult += \'<TR>\\n\';\r\n+\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="50%"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year-(yearColumnSize*2))+\');">&lt;&lt;</A></TD>\\n\';\r\n+\t\tresult += \'\t<TD CLASS="\'+this.cssPrefix+\'cpYearNavigation" WIDTH="50%"><A CLASS="\'+this.cssPrefix+\'cpYearNavigation" HREF="javascript:\'+windowref+\'CP_refreshCalendar(\'+this.index+\',\'+(year+(yearColumnSize*2))+\');">&gt;&gt;</A></TD>\\n\';\r\n+\t\tresult += \'</TR></TABLE>\\n\';\r\n+\t\tresult += \'<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\\n\';\r\n+\t\tfor (var i=0; i<yearColumnSize; i++) {\r\n+\t\t\tfor (var j=0; j<2; j++) {\r\n+\t\t\t\tvar currentyear = year+(j*yearColumnSize)+i;\r\n+\t\t\t\tresult += \'<TD WIDTH=50% ALIGN=CENTER><A CLASS="\'+this.cssPrefix+\'cpText" HREF="javascript:\'+windowref+this.returnYearFunction+\'(\'+currentyear+\');\'+windowref+\'CP_hideCalendar(\\\'\'+this.index+\'\\\');" CLASS="\'+date_class+\'">\'+currentyear+\'</A></TD>\';\r\n+\t\t\t\t}\r\n+\t\t\tresult += \'</TR>\';\r\n+\t\t\t}\r\n+\t\tresult += \'</TABLE></CENTER></TD></TR></TABLE>\\n\';\r\n+\t\t}\r\n+\t// Common\r\n+\tif (this.type == "WINDOW") {\r\n+\t\tresult += "</BODY></HTML>\\n";\r\n+\t\t}\r\n+\treturn result;\r\n+\t}\r\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/PopupWindow.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/PopupWindow.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,336 @@\n+// ===================================================================\n+// Author: Matt Kruse <matt@mattkruse.com>\n+// WWW: http://www.mattkruse.com/\n+//\n+// NOTICE: You may use this code for any purpose, commercial or\n+// private, without any further permission from the author. You may\n+// remove this notice from your final code if you wish, however it is\n+// appreciated by the author if at least my web site address is kept.\n+//\n+// You may *NOT* re-distribute this code in any way except through its\n+// use. That means, you can include it in your product, or your web\n+// site, or any other form where the code is actually being used. You\n+// may not put the plain javascript up on your site for download or\n+// include it in your javascript libraries for download. \n+// If you wish to share this code with others, please just point them\n+// to the URL instead.\n+// Please DO NOT link directly to my .js files from your site. Copy\n+// the files to your server and use them there. Thank you.\n+// ===================================================================\n+\n+/* \n+PopupWindow.js\n+Author: Matt Kruse\n+Last modified: 02/16/04\n+\n+DESCRIPTION: This object allows you to easily and quickly popup a window\n+in a certain place. The window can either be a DIV or a separate browser\n+window.\n+\n+COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small\n+positioning errors - usually with Window positioning - occur on the \n+Macintosh platform. Due to bugs in Netscape 4.x, populating the popup \n+window with <STYLE> tags may cause errors.\n+\n+USAGE:\n+// Create an object for a WINDOW popup\n+var win = new PopupWindow(); \n+\n+// Create an object for a DIV window using the DIV named \'mydiv\'\n+var win = new PopupWindow(\'mydiv\'); \n+\n+// Set the window to automatically hide itself when the user clicks \n+// anywhere else on the page except the popup\n+win.autoHide(); \n+\n+// Show the window relative to the anchor name passed in\n+win.showPopup(anchorname);\n+\n+// Hide the popup\n+win.hidePopup();\n+\n+// Set the size of the popup window (only applies to WINDOW popups\n+win.setSize(width,height);\n+\n+// Populate the contents of the popup window that will be shown. If you \n+// change the contents while it is displayed, you will need to refresh()\n+win.populate(string);\n+\n+// set the URL of the window, rather than populating its contents\n+// manually\n+win.setUrl("http://www.site.com/");\n+\n+// Refresh the contents of the popup\n+win.refresh();\n+\n+// Specify how many pixels to the right of the anchor the popup will appear\n+win.offsetX = 50;\n+\n+// Specify how many pixels below the anchor the popup will appear\n+win.offsetY = 100;\n+\n+NOTES:\n+1) Requires the functions in AnchorPosition.js\n+\n+2) Your anchor tag MUST contain both NAME and ID attributes which are the \n+   same. For example:\n+   <A NAME="test" ID="test"> </A>\n+\n+3) There must be at least a space between <A> </A> for IE5.5 to see the \n+   anchor tag correctly. Do not do <A></A> with no space.\n+\n+4) When a PopupWindow object is created, a handler for \'onmouseup\' is\n+   attached to any event handler you may have already defined. Do NOT define\n+   an event handler for \'onmouseup\' after you define a PopupWindow object or\n+   the autoHide() will not work correctly.\n+*/ \n+\n+// Set the position of the popup window based on the anchor\n+function PopupWindow_getXYPosition(anchorname) {\n+\tvar coordinates;\n+\tif (this.type == "WINDOW") {\n+\t\tcoordinates = getAnchorWindowPosition(anchorname);\n+\t\t}\n+\telse {\n+\t\tcoordinates = getAnchorPosition(anchorname);\n+\t\t}\n+\tthis.x = coordinates.x;\n+\tthis.y = coordinates.y;\n+\t}\n+// Set width/height of DIV/popup window\n+function PopupWindow_setSize(width,height) {\n+\tthis.width = width;\n+\tthis.height = height;\n+\t}\n+// Fill the window with contents\n+function PopupWindow_populate(contents) {\n+\tthis.contents = contents;\n+\tthis.populated = false;\n+\t}\n+// Set the URL to go to\n+function PopupWindow_setUrl(url) {\n+\tthis.url = url;\n+\t}\n+// Set the window popup properti'..b'+\t\t\t}\n+\t\t}\n+\telse {\n+\t\tif (this.popupWindow && !this.popupWindow.closed) {\n+\t\t\tthis.popupWindow.close();\n+\t\t\tthis.popupWindow = null;\n+\t\t\t}\n+\t\t}\n+\t}\n+// Pass an event and return whether or not it was the popup DIV that was clicked\n+function PopupWindow_isClicked(e) {\n+\tif (this.divName != null) {\n+\t\tif (this.use_layers) {\n+\t\t\tvar clickX = e.pageX;\n+\t\t\tvar clickY = e.pageY;\n+\t\t\tvar t = document.layers[this.divName];\n+\t\t\tif ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {\n+\t\t\t\treturn true;\n+\t\t\t\t}\n+\t\t\telse { return false; }\n+\t\t\t}\n+\t\telse if (document.all) { // Need to hard-code this to trap IE for error-handling\n+\t\t\tvar t = window.event.srcElement;\n+\t\t\twhile (t.parentElement != null) {\n+\t\t\t\tif (t.id==this.divName) {\n+\t\t\t\t\treturn true;\n+\t\t\t\t\t}\n+\t\t\t\tt = t.parentElement;\n+\t\t\t\t}\n+\t\t\treturn false;\n+\t\t\t}\n+\t\telse if (this.use_gebi && e) {\n+\t\t\tvar t = e.originalTarget;\n+\t\t\twhile (t.parentNode != null) {\n+\t\t\t\tif (t.id==this.divName) {\n+\t\t\t\t\treturn true;\n+\t\t\t\t\t}\n+\t\t\t\tt = t.parentNode;\n+\t\t\t\t}\n+\t\t\treturn false;\n+\t\t\t}\n+\t\treturn false;\n+\t\t}\n+\treturn false;\n+\t}\n+\n+// Check an onMouseDown event to see if we should hide\n+function PopupWindow_hideIfNotClicked(e) {\n+\tif (this.autoHideEnabled && !this.isClicked(e)) {\n+\t\tthis.hidePopup();\n+\t\t}\n+\t}\n+// Call this to make the DIV disable automatically when mouse is clicked outside it\n+function PopupWindow_autoHide() {\n+\tthis.autoHideEnabled = true;\n+\t}\n+// This global function checks all PopupWindow objects onmouseup to see if they should be hidden\n+function PopupWindow_hidePopupWindows(e) {\n+\tfor (var i=0; i<popupWindowObjects.length; i++) {\n+\t\tif (popupWindowObjects[i] != null) {\n+\t\t\tvar p = popupWindowObjects[i];\n+\t\t\tp.hideIfNotClicked(e);\n+\t\t\t}\n+\t\t}\n+\t}\n+// Run this immediately to attach the event listener\n+function PopupWindow_attachListener() {\n+\tif (document.layers) {\n+\t\tdocument.captureEvents(Event.MOUSEUP);\n+\t\t}\n+\twindow.popupWindowOldEventListener = document.onmouseup;\n+\tif (window.popupWindowOldEventListener != null) {\n+\t\tdocument.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");\n+\t\t}\n+\telse {\n+\t\tdocument.onmouseup = PopupWindow_hidePopupWindows;\n+\t\t}\n+\t}\n+// CONSTRUCTOR for the PopupWindow object\n+// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup\n+function PopupWindow() {\n+\tif (!window.popupWindowIndex) { window.popupWindowIndex = 0; }\n+\tif (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }\n+\tif (!window.listenerAttached) {\n+\t\twindow.listenerAttached = true;\n+\t\tPopupWindow_attachListener();\n+\t\t}\n+\tthis.index = popupWindowIndex++;\n+\tpopupWindowObjects[this.index] = this;\n+\tthis.divName = null;\n+\tthis.popupWindow = null;\n+\tthis.width=0;\n+\tthis.height=0;\n+\tthis.populated = false;\n+\tthis.visible = false;\n+\tthis.autoHideEnabled = false;\n+\t\n+\tthis.contents = "";\n+\tthis.url="";\n+\tthis.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";\n+\tif (arguments.length>0) {\n+\t\tthis.type="DIV";\n+\t\tthis.divName = arguments[0];\n+\t\t}\n+\telse {\n+\t\tthis.type="WINDOW";\n+\t\t}\n+\tthis.use_gebi = false;\n+\tthis.use_css = false;\n+\tthis.use_layers = false;\n+\tif (document.getElementById) { this.use_gebi = true; }\n+\telse if (document.all) { this.use_css = true; }\n+\telse if (document.layers) { this.use_layers = true; }\n+\telse { this.type = "WINDOW"; }\n+\tthis.offsetX = 0;\n+\tthis.offsetY = 0;\n+\t// Method mappings\n+\tthis.getXYPosition = PopupWindow_getXYPosition;\n+\tthis.populate = PopupWindow_populate;\n+\tthis.setUrl = PopupWindow_setUrl;\n+\tthis.setWindowProperties = PopupWindow_setWindowProperties;\n+\tthis.refresh = PopupWindow_refresh;\n+\tthis.showPopup = PopupWindow_showPopup;\n+\tthis.hidePopup = PopupWindow_hidePopup;\n+\tthis.setSize = PopupWindow_setSize;\n+\tthis.isClicked = PopupWindow_isClicked;\n+\tthis.autoHide = PopupWindow_autoHide;\n+\tthis.hideIfNotClicked = PopupWindow_hideIfNotClicked;\n+\t}\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/array_inactive.jpg
b
Binary file get_data/cfg_array/info/Selected Primary Screens_files/array_inactive.jpg has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/arrowDown.jpg
b
Binary file get_data/cfg_array/info/Selected Primary Screens_files/arrowDown.jpg has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/arrowUp.jpg
b
Binary file get_data/cfg_array/info/Selected Primary Screens_files/arrowUp.jpg has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/css_sidemenu.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/css_sidemenu.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,81 @@
+
+unhighlighted_bullet= new Image();
+unhighlighted_bullet.src = "/static/consortium/images/samp2_bullet.gif";
+
+highlighted_bullet = new Image();
+highlighted_bullet.src = "/static/consortium/images/samp2_bullet_hl.gif";
+
+plus = new Image();
+plus.src = "/static/consortium/images/sub_plus.gif";
+
+minus = new Image();
+minus.src = "/static/consortium/images/sub_minus.gif";
+
+function highlightBullet(bulletID) {
+    bulletID.src=highlighted_bullet.src
+}
+
+function unhighlightBullet(bulletID) {
+    bulletID.src=unhighlighted_bullet.src
+}
+
+function plusToMinus(imgID) {
+    imgID.src=minus.src
+}
+
+function minusToPlus(imgID) {
+    imgID.src=plus.src
+}
+/****************************************************
+*         DOM Image rollover:
+
+* by Chris Poole
+* http://chrispoole.com
+*               Script featured on http://www.dynamicdrive.com
+* Keep this notice intact to use it :-)
+****************************************************/
+function init() {
+  if (!document.getElementById) return
+  var imgOriginSrc;
+  var imgTemp = new Array();
+  var imgarr = document.getElementsByTagName('img');
+  for (var i = 0; i < imgarr.length; i++) {
+    if (imgarr[i].getAttribute('hsrc')) {
+        imgTemp[i] = new Image();
+        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
+        imgarr[i].onmouseover = function() {
+            imgOriginSrc = this.getAttribute('src');
+            this.setAttribute('src',this.getAttribute('hsrc'))
+        }
+        imgarr[i].onmouseout = function() {
+            this.setAttribute('src',imgOriginSrc)
+        }
+    }
+  }
+}
+onload=init;
+/***********************************************
+* Switch Menu script- by Martial B of http://getElementById.com/
+* Modified by Dynamic Drive for format & NS4/IE4 compatibility
+* Visit http://www.dynamicdrive.com/ for full source code
+***********************************************/
+//if (document.getElementById){ //DynamicDrive.com change
+  // document.write('<style type="text/css">')
+   //document.write('.submenu{display: none;}')
+   //document.write('</style>')
+//}
+function SwitchMenu(obj){
+    if(document.getElementById){
+        var el = document.getElementById(obj);
+        var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
+        if(el.style.display != "block"){ //DynamicDrive.com change
+            for (var i=0; i<ar.length; i++){
+                if (ar[i].className=="submenu") //DynamicDrive.com change
+                    ar[i].style.display = "none";
+            }
+           el.style.display = "block";
+       }else{
+           el.style.display = "none";
+       }
+   }
+}
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/data_inactive.jpg
b
Binary file get_data/cfg_array/info/Selected Primary Screens_files/data_inactive.jpg has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/date.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/date.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,335 @@\n+// ===================================================================\n+// Author: Matt Kruse <matt@mattkruse.com>\n+// WWW: http://www.mattkruse.com/\n+//\n+// NOTICE: You may use this code for any purpose, commercial or\n+// private, without any further permission from the author. You may\n+// remove this notice from your final code if you wish, however it is\n+// appreciated by the author if at least my web site address is kept.\n+//\n+// You may *NOT* re-distribute this code in any way except through its\n+// use. That means, you can include it in your product, or your web\n+// site, or any other form where the code is actually being used. You\n+// may not put the plain javascript up on your site for download or\n+// include it in your javascript libraries for download. \n+// If you wish to share this code with others, please just point them\n+// to the URL instead.\n+// Please DO NOT link directly to my .js files from your site. Copy\n+// the files to your server and use them there. Thank you.\n+// ===================================================================\n+\n+// HISTORY\n+// ------------------------------------------------------------------\n+// May 17, 2003: Fixed bug in parseDate() for dates <1970\n+// March 11, 2003: Added parseDate() function\n+// March 11, 2003: Added "NNN" formatting option. Doesn\'t match up\n+//                 perfectly with SimpleDateFormat formats, but \n+//                 backwards-compatability was required.\n+\n+// ------------------------------------------------------------------\n+// These functions use the same \'format\' strings as the \n+// java.text.SimpleDateFormat class, with minor exceptions.\n+// The format string consists of the following abbreviations:\n+// \n+// Field        | Full Form          | Short Form\n+// -------------+--------------------+-----------------------\n+// Year         | yyyy (4 digits)    | yy (2 digits), y (2 or 4 digits)\n+// Month        | MMM (name or abbr.)| MM (2 digits), M (1 or 2 digits)\n+//              | NNN (abbr.)        |\n+// Day of Month | dd (2 digits)      | d (1 or 2 digits)\n+// Day of Week  | EE (name)          | E (abbr)\n+// Hour (1-12)  | hh (2 digits)      | h (1 or 2 digits)\n+// Hour (0-23)  | HH (2 digits)      | H (1 or 2 digits)\n+// Hour (0-11)  | KK (2 digits)      | K (1 or 2 digits)\n+// Hour (1-24)  | kk (2 digits)      | k (1 or 2 digits)\n+// Minute       | mm (2 digits)      | m (1 or 2 digits)\n+// Second       | ss (2 digits)      | s (1 or 2 digits)\n+// AM/PM        | a                  |\n+//\n+// NOTE THE DIFFERENCE BETWEEN MM and mm! Month=MM, not mm!\n+// Examples:\n+//  "MMM d, y" matches: January 01, 2000\n+//                      Dec 1, 1900\n+//                      Nov 20, 00\n+//  "M/d/yy"   matches: 01/20/00\n+//                      9/2/00\n+//  "MMM dd, yyyy hh:mm:ssa" matches: "January 01, 2000 12:30:45AM"\n+// ------------------------------------------------------------------\n+\n+var MONTH_NAMES=new Array(\'January\',\'February\',\'March\',\'April\',\'May\',\'June\',\'July\',\'August\',\'September\',\'October\',\'November\',\'December\',\'Jan\',\'Feb\',\'Mar\',\'Apr\',\'May\',\'Jun\',\'Jul\',\'Aug\',\'Sep\',\'Oct\',\'Nov\',\'Dec\');\n+var DAY_NAMES=new Array(\'Sunday\',\'Monday\',\'Tuesday\',\'Wednesday\',\'Thursday\',\'Friday\',\'Saturday\',\'Sun\',\'Mon\',\'Tue\',\'Wed\',\'Thu\',\'Fri\',\'Sat\');\n+function LZ(x) {return(x<0||x>9?"":"0")+x}\n+\n+// ------------------------------------------------------------------\n+// isDate ( date_string, format_string )\n+// Returns true if date string matches format of format string and\n+// is a valid date. Else returns false.\n+// It is recommended that you trim whitespace around the value before\n+// passing it to this function, as whitespace is NOT ignored!\n+// ------------------------------------------------------------------\n+function isDate(val,format) {\n+\tvar date=getDateFromFormat(val,format);\n+\tif (date==0) { return false; }\n+\treturn true;\n+\t}\n+\n+// -------------------------------------------------------------------\n+// compareDates(date1,date1format,date2,date2f'..b' month_name.length;\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\tif ((month < 1)||(month>12)){return 0;}\n+\t\t\t}\n+\t\telse if (token=="EE"||token=="E"){\n+\t\t\tfor (var i=0; i<DAY_NAMES.length; i++) {\n+\t\t\t\tvar day_name=DAY_NAMES[i];\n+\t\t\t\tif (val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()) {\n+\t\t\t\t\ti_val += day_name.length;\n+\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t}\n+\t\telse if (token=="MM"||token=="M") {\n+\t\t\tmonth=_getInt(val,i_val,token.length,2);\n+\t\t\tif(month==null||(month<1)||(month>12)){return 0;}\n+\t\t\ti_val+=month.length;}\n+\t\telse if (token=="dd"||token=="d") {\n+\t\t\tdate=_getInt(val,i_val,token.length,2);\n+\t\t\tif(date==null||(date<1)||(date>31)){return 0;}\n+\t\t\ti_val+=date.length;}\n+\t\telse if (token=="hh"||token=="h") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<1)||(hh>12)){return 0;}\n+\t\t\ti_val+=hh.length;}\n+\t\telse if (token=="HH"||token=="H") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<0)||(hh>23)){return 0;}\n+\t\t\ti_val+=hh.length;}\n+\t\telse if (token=="KK"||token=="K") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<0)||(hh>11)){return 0;}\n+\t\t\ti_val+=hh.length;}\n+\t\telse if (token=="kk"||token=="k") {\n+\t\t\thh=_getInt(val,i_val,token.length,2);\n+\t\t\tif(hh==null||(hh<1)||(hh>24)){return 0;}\n+\t\t\ti_val+=hh.length;hh--;}\n+\t\telse if (token=="mm"||token=="m") {\n+\t\t\tmm=_getInt(val,i_val,token.length,2);\n+\t\t\tif(mm==null||(mm<0)||(mm>59)){return 0;}\n+\t\t\ti_val+=mm.length;}\n+\t\telse if (token=="ss"||token=="s") {\n+\t\t\tss=_getInt(val,i_val,token.length,2);\n+\t\t\tif(ss==null||(ss<0)||(ss>59)){return 0;}\n+\t\t\ti_val+=ss.length;}\n+\t\telse if (token=="a") {\n+\t\t\tif (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";}\n+\t\t\telse if (val.substring(i_val,i_val+2).toLowerCase()=="pm") {ampm="PM";}\n+\t\t\telse {return 0;}\n+\t\t\ti_val+=2;}\n+\t\telse {\n+\t\t\tif (val.substring(i_val,i_val+token.length)!=token) {return 0;}\n+\t\t\telse {i_val+=token.length;}\n+\t\t\t}\n+\t\t}\n+\t// If there are any trailing characters left in the value, it doesn\'t match\n+\tif (i_val != val.length) { return 0; }\n+\t// Is date valid for month?\n+\tif (month==2) {\n+\t\t// Check for leap year\n+\t\tif ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year\n+\t\t\tif (date > 29){ return 0; }\n+\t\t\t}\n+\t\telse { if (date > 28) { return 0; } }\n+\t\t}\n+\tif ((month==4)||(month==6)||(month==9)||(month==11)) {\n+\t\tif (date > 30) { return 0; }\n+\t\t}\n+\t// Correct hours value\n+\tif (hh<12 && ampm=="PM") { hh=hh-0+12; }\n+\telse if (hh>11 && ampm=="AM") { hh-=12; }\n+\tvar newdate=new Date(year,month-1,date,hh,mm,ss);\n+\treturn newdate.getTime();\n+\t}\n+\n+// ------------------------------------------------------------------\n+// parseDate( date_string [, prefer_euro_format] )\n+//\n+// This function takes a date string and tries to match it to a\n+// number of possible date formats to get the value. It will try to\n+// match against the following international formats, in this order:\n+// y-M-d   MMM d, y   MMM d,y   y-MMM-d   d-MMM-y  MMM d\n+// M/d/y   M-d-y      M.d.y     MMM-d     M/d      M-d\n+// d/M/y   d-M-y      d.M.y     d-MMM     d/M      d-M\n+// A second argument may be passed to instruct the method to search\n+// for formats like d/M/y (european format) before M/d/y (American).\n+// Returns a Date object or null if no patterns match.\n+// ------------------------------------------------------------------\n+function parseDate(val) {\n+\tvar preferEuro=(arguments.length==2)?arguments[1]:false;\n+\tgeneralFormats=new Array(\'y-M-d\',\'MMM d, y\',\'MMM d,y\',\'y-MMM-d\',\'d-MMM-y\',\'MMM d\');\n+\tmonthFirst=new Array(\'M/d/y\',\'M-d-y\',\'M.d.y\',\'MMM-d\',\'M/d\',\'M-d\');\n+\tdateFirst =new Array(\'d/M/y\',\'d-M-y\',\'d.M.y\',\'d-MMM\',\'d/M\',\'d-M\');\n+\tvar checkList=new Array(\'generalFormats\',preferEuro?\'dateFirst\':\'monthFirst\',preferEuro?\'monthFirst\':\'dateFirst\');\n+\tvar d=null;\n+\tfor (var i=0; i<checkList.length; i++) {\n+\t\tvar l=window[checkList[i]];\n+\t\tfor (var j=0; j<l.length; j++) {\n+\t\t\td=getDateFromFormat(val,l[j]);\n+\t\t\tif (d!=0) { return new Date(d); }\n+\t\t\t}\n+\t\t}\n+\treturn null;\n+\t}\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/details3.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/details3.js Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,3 @@
+function details3(text) {
+    document.carbImage.src = text
+}
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/ga.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/ga.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,77 @@\n+(function(){var E;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")}function F(a,b){return void 0==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \\n\\r\\t".indexOf(a.charAt(0));)a=a.substring(1);for(;a&&-1<" \\n\\r\\t".indexOf(a.charAt(a.length-1));)a=a.substring(0,a.length-1);return a}\n+function Ea(){return Math.round(2147483647*Math.random())}function Fa(){}function G(a,b){if(encodeURIComponent instanceof Function)return b?encodeURI(a):encodeURIComponent(a);H(68);return escape(a)}function I(a){a=a.split("+").join(" ");if(decodeURIComponent instanceof Function)try{return decodeURIComponent(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)};\n+function Ia(a,b){if(a){var c=J.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;c.id=b;var d=J.getElementsByTagName("script")[0];d.parentNode.insertBefore(c,d);return c}}function K(a){return a&&0<a.length?a[0]:""}function L(a){var b=a?a.length:0;return 0<b?a[b-1]:""}var nf=function(){this.prefix="ga.";this.values={}};nf.prototype.set=function(a,b){this.values[this.prefix+a]=b};nf.prototype.get=function(a){return this.values[this.prefix+a]};\n+nf.prototype.contains=function(a){return void 0!==this.get(a)};function Ka(a){0==a.indexOf("www.")&&(a=a.substring(4));return a.toLowerCase()}\n+function La(a,b){var c,d={url:a,protocol:"http",host:"",path:"",R:new nf,anchor:""};if(!a)return d;c=a.indexOf("://");0<=c&&(d.protocol=a.substring(0,c),a=a.substring(c+3));c=a.search("/|\\\\?|#");if(0<=c)d.host=a.substring(0,c).toLowerCase(),a=a.substring(c);else return d.host=a.toLowerCase(),d;c=a.indexOf("#");0<=c&&(d.anchor=a.substring(c+1),a=a.substring(0,c));c=a.indexOf("?");0<=c&&(Na(d.R,a.substring(c+1)),a=a.substring(0,c));d.anchor&&b&&Na(d.R,d.anchor);a&&"/"==a.charAt(0)&&(a=a.substring(1));\n+d.path=a;return d}\n+function Oa(a,b){function c(a){var b=(a.hostname||"").split(":")[0].toLowerCase(),c=(a.protocol||"").toLowerCase(),c=1*a.port||("http:"==c?80:"https:"==c?443:"");a=a.pathname||"";0==a.indexOf("/")||(a="/"+a);return[b,""+c,a]}var d=b||J.createElement("a");d.href=J.location.href;var e=(d.protocol||"").toLowerCase(),f=c(d),Be=d.search||"",k=e+"//"+f[0]+(f[1]?":"+f[1]:"");0==a.indexOf("//")?a=e+a:0==a.indexOf("/")?a=k+a:a&&0!=a.indexOf("?")?0>a.split("/")[0].indexOf(":")&&(a=k+f[2].substring(0,f[2].lastIndexOf("/"))+\n+"/"+a):a=k+f[2]+(a||Be);d.href=a;e=c(d);return{protocol:(d.protocol||"").toLowerCase(),host:e[0],port:e[1],path:e[2],Oa:d.search||"",url:a||""}}function Na(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b).push(c)}for(var d=Da(b).split("&"),e=0;e<d.length;e++)if(d[e]){var f=d[e].indexOf("=");0>f?c(d[e],"1"):c(d[e].substring(0,f),d[e].substring(f+1))}}\n+function Pa(a,b){if(F(a)||"["==a.charAt(0)&&"]"==a.charAt(a.length-1))return"-";var c=J.domain;return a.indexOf(c+(b&&"/"!=b?b:""))==(0==a.indexOf("http://")?7:0==a.indexOf("https://")?8:0)?"0":a};var Qa=0;function Ra(a,b,c){1<=Qa||1<=100*Math.random()||ld()||(a=["utmt=error","utmerr="+a,"utmwv=5.6.7","utmn="+Ea(),"utmsp=1"],b&&a.push("api="+b),c&&a.push("msg="+G(c.substring(0,100))),M.w&&a.push("aip=1"),Sa(a.join("&")),Qa++)};var Ta=0,Ua={};function N(a){return Va("x"+Ta++,a)}function Va(a,b){Ua[a]=!!b;return a}\n+var Wa=N(),Xa=Va("anonymizeIp"),Ya=N(),$a=N(),ab=N(),bb=N(),O=N(),P=N(),cb=N(),db=N(),eb=N(),fb=N(),gb=N(),hb=N(),ib=N(),jb=N(),kb=N(),lb=N(),nb=N(),ob=N(),pb=N(),qb=N(),rb=N(),sb=N(),tb=N(),ub=N(),vb=N(),wb=N(),xb=N(),yb=N(),zb=N(),Ab=N(),Bb=N(),Cb=N(),Db=N(),Eb=N(),Fb=N(!0),Gb=Va("currencyCode"),Hb=Va("page"),Ib=Va("title"),Jb=N(),Kb=N(),Lb=N(),Mb=N(),Nb=N(),Ob=N(),Pb=N(),Qb=N(),Rb=N(),Q=N(!0),Sb=N(!0),Tb=N(!0),Ub=N(!0),Vb=N(!0),Wb=N(!0),Zb=N(!0),$b=N(!0),ac=N(!0),bc=N(!0),cc=N(!0),R='..b'a,c),te(a,c)),c=[c.toString()];else if("event"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","event"),xe(a,c),ve(a,c),we(a,c),b||(ue(a,c),te(a,c)),\n+c=[c.toString()];else if("var"==c)c=new qe,re(a,b),se(a,c),c.add("utmt","var"),!b&&te(a,c),c=[c.toString()];else if("trans"==c)for(var c=[],d=a.get(Cb),e=0;e<d.length;++e){c.push(ye(a,d[e],b));for(var f=d[e].items_,Be=0;Be<f.length;++Be)c.push(ze(a,f[Be],b))}else"social"==c?b?c=[]:(c=new qe,re(a,b),se(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ac),!0),c.add("utmsa",a.get(Bc),!0),c.add("utmsid",a.get(Cc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):"feedback"==c?b?c=[]:(c=new qe,\n+re(a,b),se(a,c),c.add("utmt","feedback"),c.add("utmfbid",a.get(Gc),!0),c.add("utmfbpr",a.get(Hc),!0),xe(a,c),ve(a,c),we(a,c),ue(a,c),te(a,c),c=[c.toString()]):c=[];return c},oe=function(a){var b,c=a.get(xb),d=a.get(uc),e=d&&d.Ua,f=0;if(0==c||2==c){var Be=a.get(wb)+"?";b=Ae(a,!0);for(var k=0,Ja=b.length;k<Ja;k++)Sa(b[k],e,Be,!0),f++}if(1==c||2==c)for(b=Ae(a),a=a.c(Jc,""),k=0,Ja=b.length;k<Ja;k++)try{Sa(b[k],e,a),f++}catch(t){t&&Ra(t.name,void 0,t.message)}d&&(d.fb=f)};var Ne=function(){return"https:"==J.location.protocol||M.G?"https://ssl.google-analytics.com":"http://www.google-analytics.com"},Ce=function(a){this.name="len";this.message=a+"-8192"},De=function(a){this.name="ff2post";this.message=a+"-2036"},Sa=function(a,b,c,d){b=b||Fa;if(d||2036>=a.length)gf(a,b,c);else if(8192>=a.length){if(0<=W.navigator.userAgent.indexOf("Firefox")&&![].reduce)throw new De(a.length);df(a,b)||ef(a,b)||Ee(a,b)||b()}else throw new Ce(a.length);},gf=function(a,b,c){c=c||Ne()+"/__utm.gif?";\n+var d=new Image(1,1);d.src=c+a;d.onload=function(){d.onload=null;d.onerror=null;b()};d.onerror=function(){d.onload=null;d.onerror=null;b()}},ef=function(a,b){if(0!=Ne().indexOf(J.location.protocol))return!1;var c;c=W.XDomainRequest;if(!c)return!1;c=new c;c.open("POST",Ne()+"/p/__utm.gif");c.onerror=function(){b()};c.onload=b;c.send(a);return!0},df=function(a,b){var c=W.XMLHttpRequest;if(!c)return!1;var d=new c;if(!("withCredentials"in d))return!1;d.open("POST",Ne()+"/p/__utm.gif",!0);d.withCredentials=\n+!0;d.setRequestHeader("Content-Type","text/plain");d.onreadystatechange=function(){4==d.readyState&&(b(),d=null)};d.send(a);return!0},Ee=function(a,b){if(!J.body)return We(function(){Ee(a,b)},100),!0;a=encodeURIComponent(a);try{var c=J.createElement(\'<iframe name="\'+a+\'"></iframe>\')}catch(d){c=J.createElement("iframe"),c.name=a}c.height="0";c.width="0";c.style.display="none";c.style.visibility="hidden";var e=Ne()+"/u/post_iframe.html";Ga(W,"beforeunload",function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)});\n+setTimeout(b,1E3);J.body.appendChild(c);c.src=e;return!0};var qf=function(){this.G=this.w=!1;0==Ea()%1E4&&(H(142),this.G=!0);this.C={};this.D=[];this.U=0;this.S=[["www.google-analytics.com","","/plugins/"]];this._gasoCPath=this._gasoDomain=this.bb=void 0;Re();Se()};E=qf.prototype;E.oa=function(a,b){return this.hb(a,void 0,b)};E.hb=function(a,b,c){b&&H(23);c&&H(67);void 0==b&&(b="~"+M.U++);a=new U(b,a,c);M.C[b]=a;M.D.push(a);return a};E.u=function(a){a=a||"";return M.C[a]||M.hb(void 0,a)};E.pa=function(){return M.D.slice(0)};E.ab=function(){return M.D.length};\n+E.aa=function(){this.w=!0};E.la=function(){this.G=!0};var Fe=function(a){if("prerender"==J.visibilityState)return!1;a();return!0};var M=new qf;var Ha=W._gat;Ha&&Ba(Ha._getTracker)?M=Ha:W._gat=M;var Z=new Y;(function(a){if(!Fe(a)){H(123);var b=!1,c=function(){if(!b&&Fe(a)){b=!0;var d=J,e=c;d.removeEventListener?d.removeEventListener("visibilitychange",e,!1):d.detachEvent&&d.detachEvent("onvisibilitychange",e)}};Ga(J,"visibilitychange",c)}})(function(){var a=W._gaq,b=!1;if(a&&Ba(a.push)&&(b="[object Array]"==Object.prototype.toString.call(Object(a)),!b)){Z=a;return}W._gaq=Z;b&&Z.push.apply(Z,a)});function Yc(a){var b=1,c=0,d;if(a)for(b=0,d=a.length-1;0<=d;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=0!=c?b^c>>21:b;return b};})();\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/journal_header.gif
b
Binary file get_data/cfg_array/info/Selected Primary Screens_files/journal_header.gif has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/jquery-1.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/jquery-1.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,4 @@\n+/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */\n+(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outer'..b'ent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style=\'position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;\'><div></div></div><table style=\'position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;\' cellpadding=\'0\' cellspacing=\'0\'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/jquery-1_002.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/jquery-1_002.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,8316 @@\n+/*!\n+ * jQuery JavaScript Library v1.5.1\n+ * http://jquery.com/\n+ *\n+ * Copyright 2011, John Resig\n+ * Dual licensed under the MIT or GPL Version 2 licenses.\n+ * http://jquery.org/license\n+ *\n+ * Includes Sizzle.js\n+ * http://sizzlejs.com/\n+ * Copyright 2011, The Dojo Foundation\n+ * Released under the MIT, BSD, and GPL Licenses.\n+ *\n+ * Date: Wed Feb 23 13:55:29 2011 -0500\n+ */\n+(function( window, undefined ) {\n+\n+// Use the correct document accordingly with window argument (sandbox)\n+var document = window.document;\n+var jQuery = (function() {\n+\n+// Define a local copy of jQuery\n+var jQuery = function( selector, context ) {\n+\t\t// The jQuery object is actually just the init constructor \'enhanced\'\n+\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\n+\t},\n+\n+\t// Map over jQuery in case of overwrite\n+\t_jQuery = window.jQuery,\n+\n+\t// Map over the $ in case of overwrite\n+\t_$ = window.$,\n+\n+\t// A central reference to the root jQuery(document)\n+\trootjQuery,\n+\n+\t// A simple way to check for HTML strings or ID strings\n+\t// (both of which we optimize for)\n+\tquickExpr = /^(?:[^<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]+)$)/,\n+\n+\t// Check if a string has a non-whitespace character in it\n+\trnotwhite = /\\S/,\n+\n+\t// Used for trimming whitespace\n+\ttrimLeft = /^\\s+/,\n+\ttrimRight = /\\s+$/,\n+\n+\t// Check for digits\n+\trdigit = /\\d/,\n+\n+\t// Match a standalone tag\n+\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>)?$/,\n+\n+\t// JSON RegExp\n+\trvalidchars = /^[\\],:{}\\s]*$/,\n+\trvalidescape = /\\\\(?:["\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,\n+\trvalidtokens = /"[^"\\\\\\n\\r]*"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,\n+\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\n+\n+\t// Useragent RegExp\n+\trwebkit = /(webkit)[ \\/]([\\w.]+)/,\n+\tropera = /(opera)(?:.*version)?[ \\/]([\\w.]+)/,\n+\trmsie = /(msie) ([\\w.]+)/,\n+\trmozilla = /(mozilla)(?:.*? rv:([\\w.]+))?/,\n+\n+\t// Keep a UserAgent string for use with jQuery.browser\n+\tuserAgent = navigator.userAgent,\n+\n+\t// For matching the engine and version of the browser\n+\tbrowserMatch,\n+\n+\t// Has the ready events already been bound?\n+\treadyBound = false,\n+\n+\t// The deferred used on DOM ready\n+\treadyList,\n+\n+\t// Promise methods\n+\tpromiseMethods = "then done fail isResolved isRejected promise".split( " " ),\n+\n+\t// The ready event handler\n+\tDOMContentLoaded,\n+\n+\t// Save a reference to some core methods\n+\ttoString = Object.prototype.toString,\n+\thasOwn = Object.prototype.hasOwnProperty,\n+\tpush = Array.prototype.push,\n+\tslice = Array.prototype.slice,\n+\ttrim = String.prototype.trim,\n+\tindexOf = Array.prototype.indexOf,\n+\n+\t// [[Class]] -> type pairs\n+\tclass2type = {};\n+\n+jQuery.fn = jQuery.prototype = {\n+\tconstructor: jQuery,\n+\tinit: function( selector, context, rootjQuery ) {\n+\t\tvar match, elem, ret, doc;\n+\n+\t\t// Handle $(""), $(null), or $(undefined)\n+\t\tif ( !selector ) {\n+\t\t\treturn this;\n+\t\t}\n+\n+\t\t// Handle $(DOMElement)\n+\t\tif ( selector.nodeType ) {\n+\t\t\tthis.context = this[0] = selector;\n+\t\t\tthis.length = 1;\n+\t\t\treturn this;\n+\t\t}\n+\n+\t\t// The body element only exists once, optimize finding it\n+\t\tif ( selector === "body" && !context && document.body ) {\n+\t\t\tthis.context = document;\n+\t\t\tthis[0] = document.body;\n+\t\t\tthis.selector = "body";\n+\t\t\tthis.length = 1;\n+\t\t\treturn this;\n+\t\t}\n+\n+\t\t// Handle HTML strings\n+\t\tif ( typeof selector === "string" ) {\n+\t\t\t// Are we dealing with HTML string or an ID?\n+\t\t\tmatch = quickExpr.exec( selector );\n+\n+\t\t\t// Verify a match, and that no context was specified for #id\n+\t\t\tif ( match && (match[1] || !context) ) {\n+\n+\t\t\t\t// HANDLE: $(html) -> $(array)\n+\t\t\t\tif ( match[1] ) {\n+\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\n+\t\t\t\t\tdoc = (context ? context.ownerDocument || context : document);\n+\n+\t\t\t\t\t// If a single string is passed in and it\'s a single tag\n+\t\t\t\t\t// just do a createElement and skip the rest\n+\t\t\t\t\tret = rsingleTag.exec( selector );\n+\n+\t\t\t\t\tif ( ret ) {\n+\t\t\t\t\t\tif ( jQuery.isPlainObject( context ) ) {\n+\t\t\t\t\t\t\tselector = [ document.createElement( ret[1] ) ];\n+\t\t\t\t\t\t\tjQuery.fn.attr.ca'..b'set.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;\n+\t\toffset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;\n+\n+\t\t// Add offsetParent borders\n+\t\tparentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;\n+\t\tparentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;\n+\n+\t\t// Subtract the two offsets\n+\t\treturn {\n+\t\t\ttop:  offset.top  - parentOffset.top,\n+\t\t\tleft: offset.left - parentOffset.left\n+\t\t};\n+\t},\n+\n+\toffsetParent: function() {\n+\t\treturn this.map(function() {\n+\t\t\tvar offsetParent = this.offsetParent || document.body;\n+\t\t\twhile ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {\n+\t\t\t\toffsetParent = offsetParent.offsetParent;\n+\t\t\t}\n+\t\t\treturn offsetParent;\n+\t\t});\n+\t}\n+});\n+\n+\n+// Create scrollLeft and scrollTop methods\n+jQuery.each( ["Left", "Top"], function( i, name ) {\n+\tvar method = "scroll" + name;\n+\n+\tjQuery.fn[ method ] = function(val) {\n+\t\tvar elem = this[0], win;\n+\n+\t\tif ( !elem ) {\n+\t\t\treturn null;\n+\t\t}\n+\n+\t\tif ( val !== undefined ) {\n+\t\t\t// Set the scroll offset\n+\t\t\treturn this.each(function() {\n+\t\t\t\twin = getWindow( this );\n+\n+\t\t\t\tif ( win ) {\n+\t\t\t\t\twin.scrollTo(\n+\t\t\t\t\t\t!i ? val : jQuery(win).scrollLeft(),\n+\t\t\t\t\t\ti ? val : jQuery(win).scrollTop()\n+\t\t\t\t\t);\n+\n+\t\t\t\t} else {\n+\t\t\t\t\tthis[ method ] = val;\n+\t\t\t\t}\n+\t\t\t});\n+\t\t} else {\n+\t\t\twin = getWindow( elem );\n+\n+\t\t\t// Return the scroll offset\n+\t\t\treturn win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :\n+\t\t\t\tjQuery.support.boxModel && win.document.documentElement[ method ] ||\n+\t\t\t\t\twin.document.body[ method ] :\n+\t\t\t\telem[ method ];\n+\t\t}\n+\t};\n+});\n+\n+function getWindow( elem ) {\n+\treturn jQuery.isWindow( elem ) ?\n+\t\telem :\n+\t\telem.nodeType === 9 ?\n+\t\t\telem.defaultView || elem.parentWindow :\n+\t\t\tfalse;\n+}\n+\n+\n+\n+\n+// Create innerHeight, innerWidth, outerHeight and outerWidth methods\n+jQuery.each([ "Height", "Width" ], function( i, name ) {\n+\n+\tvar type = name.toLowerCase();\n+\n+\t// innerHeight and innerWidth\n+\tjQuery.fn["inner" + name] = function() {\n+\t\treturn this[0] ?\n+\t\t\tparseFloat( jQuery.css( this[0], type, "padding" ) ) :\n+\t\t\tnull;\n+\t};\n+\n+\t// outerHeight and outerWidth\n+\tjQuery.fn["outer" + name] = function( margin ) {\n+\t\treturn this[0] ?\n+\t\t\tparseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :\n+\t\t\tnull;\n+\t};\n+\n+\tjQuery.fn[ type ] = function( size ) {\n+\t\t// Get window width or height\n+\t\tvar elem = this[0];\n+\t\tif ( !elem ) {\n+\t\t\treturn size == null ? null : this;\n+\t\t}\n+\n+\t\tif ( jQuery.isFunction( size ) ) {\n+\t\t\treturn this.each(function( i ) {\n+\t\t\t\tvar self = jQuery( this );\n+\t\t\t\tself[ type ]( size.call( this, i, self[ type ]() ) );\n+\t\t\t});\n+\t\t}\n+\n+\t\tif ( jQuery.isWindow( elem ) ) {\n+\t\t\t// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode\n+\t\t\t// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat\n+\t\t\tvar docElemProp = elem.document.documentElement[ "client" + name ];\n+\t\t\treturn elem.document.compatMode === "CSS1Compat" && docElemProp ||\n+\t\t\t\telem.document.body[ "client" + name ] || docElemProp;\n+\n+\t\t// Get document width or height\n+\t\t} else if ( elem.nodeType === 9 ) {\n+\t\t\t// Either scroll[Width/Height] or offset[Width/Height], whichever is greater\n+\t\t\treturn Math.max(\n+\t\t\t\telem.documentElement["client" + name],\n+\t\t\t\telem.body["scroll" + name], elem.documentElement["scroll" + name],\n+\t\t\t\telem.body["offset" + name], elem.documentElement["offset" + name]\n+\t\t\t);\n+\n+\t\t// Get or set width or height on the element\n+\t\t} else if ( size === undefined ) {\n+\t\t\tvar orig = jQuery.css( elem, type ),\n+\t\t\t\tret = parseFloat( orig );\n+\n+\t\t\treturn jQuery.isNaN( ret ) ? orig : ret;\n+\n+\t\t// Set the width or height on the element (default to pixels if value is unitless)\n+\t\t} else {\n+\t\t\treturn this.css( type, typeof size === "string" ? size : size + "px" );\n+\t\t}\n+\t};\n+\n+});\n+\n+\n+window.jQuery = window.$ = jQuery;\n+})(window);\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/jquery.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/jquery.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,294 @@\n+/*\n+ * jQuery Tooltip plugin 1.3\n+ *\n+ * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/\n+ * http://docs.jquery.com/Plugins/Tooltip\n+ *\n+ * Copyright (c) 2006 - 2008 J\xc3\xb6rn Zaefferer\n+ *\n+ * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $\n+ * \n+ * Dual licensed under the MIT and GPL licenses:\n+ *   http://www.opensource.org/licenses/mit-license.php\n+ *   http://www.gnu.org/licenses/gpl.html\n+ */\n+ \n+;(function($) {\n+\t\n+\t\t// the tooltip element\n+\tvar helper = {},\n+\t\t// the current tooltipped element\n+\t\tcurrent,\n+\t\t// the title of the current element, used for restoring\n+\t\ttitle,\n+\t\t// timeout id for delayed tooltips\n+\t\ttID,\n+\t\t// IE 5.5 or 6\n+\t\tIE = $.browser.msie && /MSIE\\s(5\\.5|6\\.)/.test(navigator.userAgent),\n+\t\t// flag for mouse tracking\n+\t\ttrack = false;\n+\t\n+\t$.tooltip = {\n+\t\tblocked: false,\n+\t\tdefaults: {\n+\t\t\tdelay: 200,\n+\t\t\tfade: false,\n+\t\t\tshowURL: true,\n+\t\t\textraClass: "",\n+\t\t\ttop: 15,\n+\t\t\tleft: 15,\n+\t\t\tid: "tooltip"\n+\t\t},\n+\t\tblock: function() {\n+\t\t\t$.tooltip.blocked = !$.tooltip.blocked;\n+\t\t}\n+\t};\n+\t\n+\t$.fn.extend({\n+\t\ttooltip: function(settings) {\n+\t\t\tsettings = $.extend({}, $.tooltip.defaults, settings);\n+\t\t\tcreateHelper(settings);\n+\t\t\treturn this.each(function() {\n+\t\t\t\t\t$.data(this, "tooltip", settings);\n+\t\t\t\t\tthis.tOpacity = helper.parent.css("opacity");\n+\t\t\t\t\t// copy tooltip into its own expando and remove the title\n+\t\t\t\t\tthis.tooltipText = this.title;\n+\t\t\t\t\t$(this).removeAttr("title");\n+\t\t\t\t\t// also remove alt attribute to prevent default tooltip in IE\n+\t\t\t\t\tthis.alt = "";\n+\t\t\t\t})\n+\t\t\t\t.mouseover(save)\n+\t\t\t\t.mouseout(hide)\n+\t\t\t\t.click(hide);\n+\t\t},\n+\t\tfixPNG: IE ? function() {\n+\t\t\treturn this.each(function () {\n+\t\t\t\tvar image = $(this).css(\'backgroundImage\');\n+\t\t\t\tif (image.match(/^url\\(["\']?(.*\\.png)["\']?\\)$/i)) {\n+\t\t\t\t\timage = RegExp.$1;\n+\t\t\t\t\t$(this).css({\n+\t\t\t\t\t\t\'backgroundImage\': \'none\',\n+\t\t\t\t\t\t\'filter\': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src=\'" + image + "\')"\n+\t\t\t\t\t}).each(function () {\n+\t\t\t\t\t\tvar position = $(this).css(\'position\');\n+\t\t\t\t\t\tif (position != \'absolute\' && position != \'relative\')\n+\t\t\t\t\t\t\t$(this).css(\'position\', \'relative\');\n+\t\t\t\t\t});\n+\t\t\t\t}\n+\t\t\t});\n+\t\t} : function() { return this; },\n+\t\tunfixPNG: IE ? function() {\n+\t\t\treturn this.each(function () {\n+\t\t\t\t$(this).css({\'filter\': \'\', backgroundImage: \'\'});\n+\t\t\t});\n+\t\t} : function() { return this; },\n+\t\thideWhenEmpty: function() {\n+\t\t\treturn this.each(function() {\n+\t\t\t\t$(this)[ $(this).html() ? "show" : "hide" ]();\n+\t\t\t});\n+\t\t},\n+\t\turl: function() {\n+\t\t\treturn this.attr(\'href\') || this.attr(\'src\');\n+\t\t}\n+\t});\n+\t\n+\tfunction createHelper(settings) {\n+\t\t// there can be only one tooltip helper\n+\t\tif( helper.parent )\n+\t\t\treturn;\n+\t\t// create the helper, h3 for title, div for url\n+\t\thelper.parent = $(\'<div id="\' + settings.id + \'"><h3></h3><div class="body"></div><div class="url"></div></div>\')\n+\t\t\t// add to document\n+\t\t\t.appendTo(document.body)\n+\t\t\t// hide it at first\n+\t\t\t.hide();\n+\t\t\t\n+\t\t// apply bgiframe if available\n+\t\tif ( $.fn.bgiframe )\n+\t\t\thelper.parent.bgiframe();\n+\t\t\n+\t\t// save references to title and url elements\n+\t\thelper.title = $(\'h3\', helper.parent);\n+\t\thelper.body = $(\'div.body\', helper.parent);\n+\t\thelper.url = $(\'div.url\', helper.parent);\n+\t}\n+\t\n+\tfunction settings(element) {\n+\t\treturn $.data(element, "tooltip");\n+\t}\n+\t\n+\t// main event handler to start showing tooltips\n+\tfunction handle(event) {\n+\t\t// show helper, either with timeout or on instant\n+\t\tif( settings(this).delay )\n+\t\t\ttID = setTimeout(show, settings(this).delay);\n+\t\telse\n+\t\t\tshow();\n+\t\t\n+\t\t// if selected, update the helper position when the mouse moves\n+\t\ttrack = !!settings(this).track;\n+\t\t$(document.body).bind(\'mousemove\', update);\n+\t\t\t\n+\t\t// update at least once\n+\t\tupdate(event);\n+\t}\n+\t\n+\t// save elements title before the tooltip is displayed\n+\tfunction save() {\n+\t\t// if this is the current source, or it has no title (occurs with click event), stop\n+\t\tif ( $.tooltip.blocked |'..b'helper.body.html( bodyContent );\n+\t\t\t}\n+\t\t\thelper.body.show();\n+\t\t} else if ( settings(this).showBody ) {\n+\t\t\tvar parts = title.split(settings(this).showBody);\n+\t\t\thelper.title.html(parts.shift()).show();\n+\t\t\thelper.body.empty();\n+\t\t\tfor(var i = 0, part; (part = parts[i]); i++) {\n+\t\t\t\tif(i > 0)\n+\t\t\t\t\thelper.body.append("<br/>");\n+\t\t\t\thelper.body.append(part);\n+\t\t\t}\n+\t\t\thelper.body.hideWhenEmpty();\n+\t\t} else {\n+\t\t\thelper.title.html(title).show();\n+\t\t\thelper.body.hide();\n+\t\t}\n+\t\t\n+\t\t// if element has href or src, add and show it, otherwise hide it\n+\t\tif( settings(this).showURL && $(this).url() )\n+\t\t\thelper.url.html( $(this).url().replace(\'http://\', \'\') ).show();\n+\t\telse \n+\t\t\thelper.url.hide();\n+\t\t\n+\t\t// add an optional class for this tip\n+\t\thelper.parent.addClass(settings(this).extraClass);\n+\n+\t\t// fix PNG background for IE\n+\t\tif (settings(this).fixPNG )\n+\t\t\thelper.parent.fixPNG();\n+\t\t\t\n+\t\thandle.apply(this, arguments);\n+\t}\n+\t\n+\t// delete timeout and show helper\n+\tfunction show() {\n+\t\ttID = null;\n+\t\tif ((!IE || !$.fn.bgiframe) && settings(current).fade) {\n+\t\t\tif (helper.parent.is(":animated"))\n+\t\t\t\thelper.parent.stop().show().fadeTo(settings(current).fade, current.tOpacity);\n+\t\t\telse\n+\t\t\t\thelper.parent.is(\':visible\') ? helper.parent.fadeTo(settings(current).fade, current.tOpacity) : helper.parent.fadeIn(settings(current).fade);\n+\t\t} else {\n+\t\t\thelper.parent.show();\n+\t\t}\n+\t\tupdate();\n+\t}\n+\t\n+\t/**\n+\t * callback for mousemove\n+\t * updates the helper position\n+\t * removes itself when no current element\n+\t */\n+\tfunction update(event)\t{\n+\t\tif($.tooltip.blocked)\n+\t\t\treturn;\n+\t\t\n+\t\tif (event && event.target.tagName == "OPTION") {\n+\t\t\treturn;\n+\t\t}\n+\t\t\n+\t\t// stop updating when tracking is disabled and the tooltip is visible\n+\t\tif ( !track && helper.parent.is(":visible")) {\n+\t\t\t$(document.body).unbind(\'mousemove\', update)\n+\t\t}\n+\t\t\n+\t\t// if no current element is available, remove this listener\n+\t\tif( current == null ) {\n+\t\t\t$(document.body).unbind(\'mousemove\', update);\n+\t\t\treturn;\t\n+\t\t}\n+\t\t\n+\t\t// remove position helper classes\n+\t\thelper.parent.removeClass("viewport-right").removeClass("viewport-bottom");\n+\t\t\n+\t\tvar left = helper.parent[0].offsetLeft;\n+\t\tvar top = helper.parent[0].offsetTop;\n+\t\tif (event) {\n+\t\t\t// position the helper 15 pixel to bottom right, starting from mouse position\n+\t\t\tleft = event.pageX + settings(current).left;\n+\t\t\ttop = event.pageY + settings(current).top;\n+\t\t\tvar right=\'auto\';\n+\t\t\tif (settings(current).positionLeft) {\n+\t\t\t\tright = $(window).width() - left;\n+\t\t\t\tleft = \'auto\';\n+\t\t\t}\n+\t\t\thelper.parent.css({\n+\t\t\t\tleft: left,\n+\t\t\t\tright: right,\n+\t\t\t\ttop: top\n+\t\t\t});\n+\t\t}\n+\t\t\n+\t\tvar v = viewport(),\n+\t\t\th = helper.parent[0];\n+\t\t// check horizontal position\n+\t\tif (v.x + v.cx < h.offsetLeft + h.offsetWidth) {\n+\t\t\tleft -= h.offsetWidth + 20 + settings(current).left;\n+\t\t\thelper.parent.css({left: left + \'px\'}).addClass("viewport-right");\n+\t\t}\n+\t\t// check vertical position\n+\t\tif (v.y + v.cy < h.offsetTop + h.offsetHeight) {\n+\t\t\ttop -= h.offsetHeight + 20 + settings(current).top;\n+\t\t\thelper.parent.css({top: top + \'px\'}).addClass("viewport-bottom");\n+\t\t}\n+\t}\n+\t\n+\tfunction viewport() {\n+\t\treturn {\n+\t\t\tx: $(window).scrollLeft(),\n+\t\t\ty: $(window).scrollTop(),\n+\t\t\tcx: $(window).width(),\n+\t\t\tcy: $(window).height()\n+\t\t};\n+\t}\n+\t\n+\t// hide helper and restore added classes and the title\n+\tfunction hide(event) {\n+\t\tif($.tooltip.blocked)\n+\t\t\treturn;\n+\t\t// clear timeout if possible\n+\t\tif(tID)\n+\t\t\tclearTimeout(tID);\n+\t\t// no more current element\n+\t\tcurrent = null;\n+\t\t\n+\t\tvar tsettings = settings(this);\n+\t\tfunction complete() {\n+\t\t\thelper.parent.removeClass( tsettings.extraClass ).hide().css("opacity", "");\n+\t\t}\n+\t\tif ((!IE || !$.fn.bgiframe) && tsettings.fade) {\n+\t\t\tif (helper.parent.is(\':animated\'))\n+\t\t\t\thelper.parent.stop().fadeTo(tsettings.fade, 0, complete);\n+\t\t\telse\n+\t\t\t\thelper.parent.stop().fadeOut(tsettings.fade, complete);\n+\t\t} else\n+\t\t\tcomplete();\n+\t\t\n+\t\tif( settings(this).fixPNG )\n+\t\t\thelper.parent.unfixPNG();\n+\t}\n+\t\n+})(jQuery);\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/jquery_002.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/jquery_002.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,53 @@
+/*
+
+highlight v3
+
+Highlights arbitrary terms.
+
+<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
+
+MIT license.
+
+Johann Burkard
+<http://johannburkard.de>
+<mailto:jb@eaio.com>
+
+*/
+
+jQuery.fn.highlight = function(pat) {
+ function innerHighlight(node, pat) {
+  var skip = 0;
+  if (node.nodeType == 3) {
+   var pos = node.data.toUpperCase().indexOf(pat);
+   if (pos >= 0) {
+    var spannode = document.createElement('span');
+    spannode.className = 'highlight';
+    var middlebit = node.splitText(pos);
+    var endbit = middlebit.splitText(pat.length);
+    var middleclone = middlebit.cloneNode(true);
+    spannode.appendChild(middleclone);
+    middlebit.parentNode.replaceChild(spannode, middlebit);
+    skip = 1;
+   }
+  }
+  else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
+   for (var i = 0; i < node.childNodes.length; ++i) {
+    i += innerHighlight(node.childNodes[i], pat);
+   }
+  }
+  return skip;
+ }
+ return this.each(function() {
+  innerHighlight(this, pat.toUpperCase());
+ });
+};
+
+jQuery.fn.removeHighlight = function() {
+ return this.find("span.highlight").each(function() {
+  this.parentNode.firstChild.nodeName;
+  with (this.parentNode) {
+   replaceChild(this.firstChild, this);
+   normalize();
+  }
+ }).end();
+};
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/jquery_003.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/jquery_003.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,1112 @@\n+/*\n+ * jQuery validation plug-in pre-1.5.2\n+ *\n+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/\n+ * http://docs.jquery.com/Plugins/Validation\n+ *\n+ * Copyright (c) 2006 - 2008 J\xc3\xb6rn Zaefferer\n+ *\n+ * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $\n+ *\n+ * Dual licensed under the MIT and GPL licenses:\n+ *   http://www.opensource.org/licenses/mit-license.php\n+ *   http://www.gnu.org/licenses/gpl.html\n+ */\n+\n+(function($) {\n+\n+$.extend($.fn, {\n+\t// http://docs.jquery.com/Plugins/Validation/validate\n+\tvalidate: function( options ) {\n+\t\t\n+\t\t// if nothing is selected, return nothing; can\'t chain anyway\n+\t\tif (!this.length) {\n+\t\t\toptions && options.debug && window.console && console.warn( "nothing selected, can\'t validate, returning nothing" );\n+\t\t\treturn;\n+\t\t}\n+\t\t\n+\t\t// check if a validator for this form was already created\n+\t\tvar validator = $.data(this[0], \'validator\');\n+\t\tif ( validator ) {\n+\t\t\treturn validator;\n+\t\t}\n+\t\t\n+\t\tvalidator = new $.validator( options, this[0] );\n+\t\t$.data(this[0], \'validator\', validator); \n+\t\t\n+\t\tif ( validator.settings.onsubmit ) {\n+\t\t\n+\t\t\t// allow suppresing validation by adding a cancel class to the submit button\n+\t\t\tthis.find("input, button").filter(".cancel").click(function() {\n+\t\t\t\tvalidator.cancelSubmit = true;\n+\t\t\t});\n+\t\t\n+\t\t\t// validate the form on submit\n+\t\t\tthis.submit( function( event ) {\n+\t\t\t\tif ( validator.settings.debug )\n+\t\t\t\t\t// prevent form submit to be able to see console output\n+\t\t\t\t\tevent.preventDefault();\n+\t\t\t\t\t\n+\t\t\t\tfunction handle() {\n+\t\t\t\t\tif ( validator.settings.submitHandler ) {\n+\t\t\t\t\t\tvalidator.settings.submitHandler.call( validator, validator.currentForm );\n+\t\t\t\t\t\treturn false;\n+\t\t\t\t\t}\n+\t\t\t\t\treturn true;\n+\t\t\t\t}\n+\t\t\t\t\t\n+\t\t\t\t// prevent submit for invalid forms or custom submit handlers\n+\t\t\t\tif ( validator.cancelSubmit ) {\n+\t\t\t\t\tvalidator.cancelSubmit = false;\n+\t\t\t\t\treturn handle();\n+\t\t\t\t}\n+\t\t\t\tif ( validator.form() ) {\n+\t\t\t\t\tif ( validator.pendingRequest ) {\n+\t\t\t\t\t\tvalidator.formSubmitted = true;\n+\t\t\t\t\t\treturn false;\n+\t\t\t\t\t}\n+\t\t\t\t\treturn handle();\n+\t\t\t\t} else {\n+\t\t\t\t\tvalidator.focusInvalid();\n+\t\t\t\t\treturn false;\n+\t\t\t\t}\n+\t\t\t});\n+\t\t}\n+\t\t\n+\t\treturn validator;\n+\t},\n+\t// http://docs.jquery.com/Plugins/Validation/valid\n+\tvalid: function() {\n+        if ( $(this[0]).is(\'form\')) {\n+            return this.validate().form();\n+        } else {\n+            var valid = false;\n+            var validator = $(this[0].form).validate();\n+            this.each(function() {\n+\t\t\t\tvalid |= validator.element(this);\n+            });\n+            return valid;\n+        }\n+    },\n+\t// attributes: space seperated list of attributes to retrieve and remove\n+\tremoveAttrs: function(attributes) {\n+\t\tvar result = {},\n+\t\t\t$element = this;\n+\t\t$.each(attributes.split(/\\s/), function(index, value) {\n+\t\t\tresult[value] = $element.attr(value);\n+\t\t\t$element.removeAttr(value);\n+\t\t});\n+\t\treturn result;\n+\t},\n+\t// http://docs.jquery.com/Plugins/Validation/rules\n+\trules: function(command, argument) {\n+\t\tvar element = this[0];\n+\t\t\n+\t\tif (command) {\n+\t\t\tvar settings = $.data(element.form, \'validator\').settings;\n+\t\t\tvar staticRules = settings.rules;\n+\t\t\tvar existingRules = $.validator.staticRules(element);\n+\t\t\tswitch(command) {\n+\t\t\tcase "add":\n+\t\t\t\t$.extend(existingRules, $.validator.normalizeRule(argument));\n+\t\t\t\tstaticRules[element.name] = existingRules;\n+\t\t\t\tif (argument.messages)\n+\t\t\t\t\tsettings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );\n+\t\t\t\tbreak;\n+\t\t\tcase "remove":\n+\t\t\t\tif (!argument) {\n+\t\t\t\t\tdelete staticRules[element.name];\n+\t\t\t\t\treturn existingRules;\n+\t\t\t\t}\n+\t\t\t\tvar filtered = {};\n+\t\t\t\t$.each(argument.split(/\\s/), function(index, method) {\n+\t\t\t\t\tfiltered[method] = existingRules[method];\n+\t\t\t\t\tdelete existingRules[method];\n+\t\t\t\t});\n+\t\t\t\treturn filtered;\n+\t\t\t}\n+\t\t}\n+\t\t\n+\t\tvar data = $.validator.normalizeRules(\n+\t\t$.extend(\n+\t\t\t{},\n+\t\t\t$.validator.metadataRules(element),\n+\t\t\t$.validator.classRules(element),\n+\t\t\t$.'..b'ion(value, element) {\n+\t\t\treturn this.optional(element) || /^\\d\\d?\\.\\d\\d?\\.\\d\\d\\d?\\d?$/.test(value);\n+\t\t},\n+\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/number\n+\t\tnumber: function(value, element) {\n+\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:,\\d{3})+)(?:\\.\\d+)?$/.test(value);\n+\t\t},\n+\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/numberDE\n+\t\tnumberDE: function(value, element) {\n+\t\t\treturn this.optional(element) || /^-?(?:\\d+|\\d{1,3}(?:\\.\\d{3})+)(?:,\\d+)?$/.test(value);\n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/digits\n+\t\tdigits: function(value, element) {\n+\t\t\treturn this.optional(element) || /^\\d+$/.test(value);\n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/creditcard\n+\t\t// based on http://en.wikipedia.org/wiki/Luhn\n+\t\tcreditcard: function(value, element) {\n+\t\t\tif ( this.optional(element) )\n+\t\t\t\treturn "dependency-mismatch";\n+\t\t\t// accept only digits and dashes\n+\t\t\tif (/[^0-9-]+/.test(value))\n+\t\t\t\treturn false;\n+\t\t\tvar nCheck = 0,\n+\t\t\t\tnDigit = 0,\n+\t\t\t\tbEven = false;\n+\n+\t\t\tvalue = value.replace(/\\D/g, "");\n+\n+\t\t\tfor (n = value.length - 1; n >= 0; n--) {\n+\t\t\t\tvar cDigit = value.charAt(n);\n+\t\t\t\tvar nDigit = parseInt(cDigit, 10);\n+\t\t\t\tif (bEven) {\n+\t\t\t\t\tif ((nDigit *= 2) > 9)\n+\t\t\t\t\t\tnDigit -= 9;\n+\t\t\t\t}\n+\t\t\t\tnCheck += nDigit;\n+\t\t\t\tbEven = !bEven;\n+\t\t\t}\n+\n+\t\t\treturn (nCheck % 10) == 0;\n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/accept\n+\t\taccept: function(value, element, param) {\n+\t\t\tparam = typeof param == "string" ? param : "png|jpe?g|gif";\n+\t\t\treturn this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); \n+\t\t},\n+\t\t\n+\t\t// http://docs.jquery.com/Plugins/Validation/Methods/equalTo\n+\t\tequalTo: function(value, element, param) {\n+\t\t\treturn value == $(param).val();\n+\t\t}\n+\t\t\n+\t}\n+\t\n+});\n+\n+})(jQuery);\n+\n+// ajax mode: abort\n+// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});\n+// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() \n+;(function($) {\n+\tvar ajax = $.ajax;\n+\tvar pendingRequests = {};\n+\t$.ajax = function(settings) {\n+\t\t// create settings for compatibility with ajaxSetup\n+\t\tsettings = $.extend(settings, $.extend({}, $.ajaxSettings, settings));\n+\t\tvar port = settings.port;\n+\t\tif (settings.mode == "abort") {\n+\t\t\tif ( pendingRequests[port] ) {\n+\t\t\t\tpendingRequests[port].abort();\n+\t\t\t}\n+\t\t\treturn (pendingRequests[port] = ajax.apply(this, arguments));\n+\t\t}\n+\t\treturn ajax.apply(this, arguments);\n+\t};\n+})(jQuery);\n+\n+// provides cross-browser focusin and focusout events\n+// IE has native support, in other browsers, use event caputuring (neither bubbles)\n+\n+// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation\n+// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target \n+\n+// provides triggerEvent(type: String, target: Element) to trigger delegated events\n+;(function($) {\n+\t$.each({\n+\t\tfocus: \'focusin\',\n+\t\tblur: \'focusout\'\t\n+\t}, function( original, fix ){\n+\t\t$.event.special[fix] = {\n+\t\t\tsetup:function() {\n+\t\t\t\tif ( $.browser.msie ) return false;\n+\t\t\t\tthis.addEventListener( original, $.event.special[fix].handler, true );\n+\t\t\t},\n+\t\t\tteardown:function() {\n+\t\t\t\tif ( $.browser.msie ) return false;\n+\t\t\t\tthis.removeEventListener( original,\n+\t\t\t\t$.event.special[fix].handler, true );\n+\t\t\t},\n+\t\t\thandler: function(e) {\n+\t\t\t\targuments[0] = $.event.fix(e);\n+\t\t\t\targuments[0].type = fix;\n+\t\t\t\treturn $.event.handle.apply(this, arguments);\n+\t\t\t}\n+\t\t};\n+\t});\n+\t$.extend($.fn, {\n+\t\tdelegate: function(type, delegate, handler) {\n+\t\t\treturn this.bind(type, function(event) {\n+\t\t\t\tvar target = $(event.target);\n+\t\t\t\tif (target.is(delegate)) {\n+\t\t\t\t\treturn handler.apply(target, arguments);\n+\t\t\t\t}\n+\t\t\t});\n+\t\t},\n+\t\ttriggerEvent: function(type, target) {\n+\t\t\treturn this.triggerHandler(type, [$.event.fix({ type: type, target: target })]);\n+\t\t}\n+\t})\n+})(jQuery);\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/openWindow.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/openWindow.js Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,5 @@
+
+function openWindow(loc)
+{
+ var w= window.open(loc);
+}
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/openWindow_002.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/openWindow_002.js Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,21 @@
+var popupWin
+Stamp = new Date();
+var Hours;
+var Mins;
+var Seconds;
+var uniqueWindow;
+Hours = Stamp.getHours();
+Minutes = Stamp.getMinutes();
+Seconds = Stamp.getSeconds();
+uniqueWindow = "popupWin_" + Hours + Minutes + Seconds;
+function openWindow(page) {
+    if (!popupWin || popupWin.closed) {
+        popupWin = window.open(page, uniqueWindow, "width=1200,height=600,resizable,scrollbars");
+
+    }
+    else {
+        popupWin = window.open(page, uniqueWindow, "width=1200,height=600,resizable,scrollbars");
+
+        popupWin.focus();
+    }
+}
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/popupWin.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/popupWin.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,249 @@
+var popupWin
+
+Stamp = new Date();
+var Hours;
+var Mins;
+var Seconds;
+var uniqueWindow;
+Hours = Stamp.getHours();
+Minutes = Stamp.getMinutes();
+Seconds = Stamp.getSeconds();
+uniqueWindow = "popupWin_" + Hours + Minutes + Seconds;
+var win;
+
+//Function for opening a new window of given width or height
+function openWindow(page, wid, hei) {
+    if (wid == null) {
+        wid = 1200;
+    }
+    if (hei == null) {
+        hei = 600;
+    }
+    if (!popupWin || popupWin.closed) {
+        popupWin = window.open(page, uniqueWindow, "width=" + wid + ",height=" + hei + ",resizable=yes,scrollbars=yes");
+        popupWin.moveTo(250, 250);
+        popupWin.focus();
+    } else {
+        /*popupWin.close(); */
+        popupWin = window.open(page, uniqueWindow, "width=" + wid + ",height=" + hei + ",resizable=yes,scrollbars=yes");
+        popupWin.focus();
+    }
+}
+
+//Opening a new window
+function showPopup(some_url)
+{
+    win = window.open(some_url, 'popup', 'width=500,height=220,scrollbars=no,menubar=no');
+    win.moveTo(x + 20, y - 5);
+    return true;
+}
+
+//Closing a popup window.
+function closePopup()
+{
+    win.close();
+    return true;
+}
+//end hide --></script></head>
+
+//
+function closeMe(url) {
+    var wopener = url;
+
+ if(window.opener)  {
+        window.opener.location.href = wopener;
+     window.close();
+    } else {
+     window.location.href = wopener;
+    }
+}
+function move_box(an, box) {
+    var cleft = 0;
+    var ctop = 0;
+    var obj = an;
+    while (obj.offsetParent) {
+        cleft += obj.offsetLeft;
+        ctop += obj.offsetTop;
+        obj = obj.offsetParent;
+    }
+    //box.style.left = cleft + 'px';
+    box.style.left = 0 + 'px';
+    ctop += an.offsetHeight + 8;
+    if (document.body.currentStyle &&
+        document.body.currentStyle['marginTop']) {
+        ctop += parseInt(
+                document.body.currentStyle['marginTop']);
+    }
+    //box.style.top = ctop + 'px';
+    box.style.top = 0 + 'px';
+}
+//
+//function move_box( box, left, top) {
+//
+//    box.style.left = x + left + 'px';
+// box.style.top = y + top + 'px';
+//}
+
+//
+function fixed_box(box, left, top)
+{
+    //box.style.left = left + 'px';
+    //box.style.top = top + 'px';
+    box.style.left = 0 + 'px';
+    box.style.top = 0 + 'px';
+}
+
+function show_hide_box(an, width, height, borderStyle) {
+    hide("br");
+    var href = an.href;
+    var boxdiv = document.getElementById("br");
+
+    if (boxdiv != null) {
+        if (boxdiv.style.display == 'none') {
+            move_box(an, boxdiv, 0, 0);
+            boxdiv.style.display = 'block';
+        } else
+            boxdiv.style.display = 'none';
+        return false;
+    }
+
+    boxdiv = document.createElement('div');
+    boxdiv.setAttribute('id', "br");
+    // "br"
+
+    boxdiv.style.display = 'block';
+    boxdiv.style.position = 'absolute';
+    boxdiv.style.width = width + 'px';
+    boxdiv.style.height = height + 'px';
+    boxdiv.style.border = borderStyle;
+    boxdiv.style.backgroundColor = '#fff';
+
+    var contents = document.createElement('iframe');
+
+
+    contents.scrolling = 'no';
+    contents.frameBorder = '0';
+    contents.style.width = width + 'px';
+    contents.style.height = height + 'px';
+    contents.style.backgroundColor = "#ccc"
+    contents.src = href;
+
+    boxdiv.appendChild(contents);
+
+    document.body.appendChild(boxdiv);
+    move_box(an, boxdiv, 0, 0);
+
+    return false;
+}
+
+//
+function hide(an) {
+    //var href = an;
+    var boxdiv = document.getElementById(an);
+    if (boxdiv != null) {
+        if (boxdiv.style.display == 'block')
+            boxdiv.style.display = 'none';
+    }
+}
+
+function hide2() {
+    //var href = an;
+    var boxdiv = document.getElementById("br");
+    var select = document.getElementById("select")
+
+    if (boxdiv.style.display == 'block')
+        boxdiv.style.display = 'none';
+
+    if (select.style.display == 'block')
+        select.style.display = 'none';
+
+}
+
+
+function show(an, width, height, borderStyle) {
+    //selected();
+    hide(href);
+    //hide("select");
+
+    //selected();
+    var href = an.href;
+    // alert(href);
+    var boxdiv = document.getElementById(href);
+    //var selected = document.getElementById("select");
+    // if (boxdiv != null) {
+    // if (boxdiv.style.display == 'none') {
+    //           // move_box(an,boxdiv);
+    // fixed_box(boxdiv, 800, 50);
+    // boxdiv.style.display = 'block';
+    // } else
+    // boxdiv.style.display = 'none';
+    //
+    // return false;
+    // }
+
+    boxdiv = document.createElement('div');
+
+    boxdiv.setAttribute('id', href);
+    boxdiv.style.display = 'block';
+    boxdiv.style.position = 'absolute';
+    boxdiv.style.width = width + 'px';
+    boxdiv.style.height = height + 'px';
+    boxdiv.style.border = borderStyle;
+    boxdiv.style.backgroundColor = '#fff';
+
+    var contents = document.createElement('iframe');
+    contents.scrolling = 'no';
+    // contents.autoHideEnabled='yes'
+    contents.frameBorder = '0';
+    contents.style.width = width + 'px';
+    contents.style.height = height + 'px';
+
+
+    contents.src = href;
+
+    boxdiv.appendChild(contents);
+    document.body.appendChild(boxdiv);
+    fixed_box(boxdiv, 800, 50);
+
+
+    //selected = document.createElement('div');
+
+    //selected.setAttribute('id', "select");
+
+    //
+    // selected.style.display = 'block';
+    // selected.style.position = 'absolute';
+    //
+    // selected.style.width = 20 + 'px';
+    // selected.style.height = 10 + 'px';
+    // selected.style.backgroundColor = '#fff';
+    // selected.innerHTML = "<html><table><tr><td  class=\"webSiteBodyGreenText\"><img src=\"/glycomics/common/images/red_arrow_up.gif\" width=\"12\" height=\"16\"/></td></td></table><html>";
+    // document.body.appendChild(selected);
+    //move_box(an, selected, -10, 5);
+
+    return false;
+}
+
+function SwitchMenu(obj) {
+    if (document.getElementById) { //DynamicDrive.com change
+        document.write('<style \n')
+        document.write('.submenu{display: none;}\n')
+        document.write('</style>\n')
+    }
+
+    if (document.getElementById) {
+        var el = document.getElementById(obj);
+        var ar = document.getElementById("masterdiv").getElementsByTagName("span");
+        //DynamicDrive.com change
+        if (el.style.display != "block") { //DynamicDrive.com change
+
+            if (ar.className == "submenu") //DynamicDrive.com change
+                ar.style.display = "none";
+
+            el.style.display = "block";
+        } else {
+            el.style.display = "none";
+        }
+    }
+}
+
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/summary_inactive.jpg
b
Binary file get_data/cfg_array/info/Selected Primary Screens_files/summary_inactive.jpg has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/switchImg.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/switchImg.js Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,49 @@
+var Pic = new Array
+
+Pic[0] = '/glycomics/common/images/presentation/expt_active.jpg'
+Pic[1] = '/glycomics/common/images/presentation/expt_inactive.jpg'
+Pic[2] = '/glycomics/common/images/presentation/summary_active.jpg'
+Pic[3] = '/glycomics/common/images/presentation/summary_inactive.jpg'
+Pic[4] = '/glycomics/common/images/presentation/data_active.jpg'
+Pic[5] = '/glycomics/common/images/presentation/data_inactive.jpg'
+Pic[6] = '/glycomics/common/images/presentation/summary_active.jpg'
+Pic[7] = '/glycomics/common/images/presentation/summary_inactive.jpg'
+Pic[8] = '/glycomics/common/images/presentation/array_active.jpg'
+Pic[9] = '/glycomics/common/images/presentation/array_inactive.jpg'
+Pic[10] = '/glycomics/common/images/presentation/excel_active.jpg'
+Pic[11] = '/glycomics/common/images/presentation/excel_inactive.jpg'
+Pic[12] = '/glycomics/common/images/presentation/data_active.jpg'
+Pic[13] = '/glycomics/common/images/presentation/data_inactive.jpg'
+Pic[14] = '/glycomics/common/images/presentation/search_active.gif'
+Pic[15] = '/glycomics/common/images/presentation/search_inactive.gif'
+Pic[16] = '/glycomics/common/images/presentation/data_active.jpg'
+Pic[17] = '/glycomics/common/images/presentation/data_inactive.jpg'
+Pic[18] = '/glycomics/common/images/presentation/rma_active.gif'
+Pic[19] = '/glycomics/common/images/presentation/rma_inactive.gif'
+Pic[20] = '/glycomics/common/images/presentation/download_active.gif'
+Pic[21] = '/glycomics/common/images/presentation/download_inactive.gif'
+Pic[22] = '/glycomics/common/images/presentation/link_active.gif'
+Pic[23] = '/glycomics/common/images/presentation/link_inactive.gif'
+Pic[24] = '/glycomics/common/images/presentation/rma_active.gif'
+Pic[25] = '/glycomics/common/images/presentation/rma_inactive.gif'
+Pic[26] = '/glycomics/common/images/presentation/link_active.gif'
+Pic[27] = '/glycomics/common/images/presentation/link_inactive.gif'
+Pic[28] = '/glycomics/common/images/presentation/cdf_active.gif'
+Pic[29] = '/glycomics/common/images/presentation/cdf_inactive.gif'
+Pic[30] = '/glycomics/common/images/presentation/desc_active.gif'
+Pic[31] = '/glycomics/common/images/presentation/desc_inactive.gif'
+
+
+var p = Pic.length
+var preLoadImg = new Array()
+var i = 0;
+for (i = 0; i < p; i++) {
+    preLoadImg[i] = new Image()
+    preLoadImg[i].src = Pic[i]
+}
+
+
+function switchPresentationImage(whichImage, imageNumber) {
+    document.images[whichImage].src = preLoadImg[imageNumber].src
+}
+
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/switcher.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/switcher.html Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,1 @@
+<html><head><title>JBoss Web/2.1.3.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /glycomics/common/javascript/switcher.js</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/glycomics/common/javascript/switcher.js</u></p><p><b>description</b> <u>The requested resource (/glycomics/common/javascript/switcher.js) is not available.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/2.1.3.GA</h3></body></html>
\ No newline at end of file
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/info/Selected Primary Screens_files/webtrends.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/info/Selected Primary Screens_files/webtrends.js Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,760 @@\n+// WebTrends SmartSource Data Collector Tag\n+// Version: 8.6.0     \n+// Tag Builder Version: 2.1.0\n+// Created: 04/17/2009 4:49:40\n+// Updated: 04/06/2010\n+\n+function WebTrends(){\n+\tvar that=this;\n+\t// begin: user modifiable\n+\tthis.dcsid="dcsc2bh0q10000cprjxnf6sz5_6h4b";\n+\tthis.domain="statse.webtrendslive.com";\n+\tthis.timezone=-5;\n+\tthis.fpcdom="";\n+\tthis.onsitedoms="www.nature.com, blog-msb.embo.org, blogs.nature.com,cmckb.cellmigration.org, connotea.org, functionalglycomics.com, go.nature.com, guide.labanimal.com, kb.psi-structuralgenomics.org, lipidmaps.org, nature.com, natureasia.com, naturechina.com.cn, network.nature.com, neuroscience-gateway.org, pid.nci.nih.gov, precedings.nature.com, scintilla.nature.com, secure.nature.com, signaling-gateway.org, spotlight.nature.com, npg.nature.com, press.nature.com , palgrave-connect.com, www.cellmigration.org, www.connotea.org, www.econolog.net, www.functionalglycomics.org, www.labanimal.com, www.lipidmaps.org, www.natureasia.com, www.neuroscience-gateway.org, www.palgrave-journals.com, www.rikenresearch.riken.jp, www.scitable.com, www.signaling-gateway.org, cmkb.cellmigration.org, nrgwiki.nature.com, www.iaor-palgrave.com, www.natureprotocols.com, media.nature.com";\n+\tthis.downloadtypes="xls,doc,pdf,ris,txt,csv,zip,mp3,mp4,mov,AVI,bin,bmp,BMP,cdx,cml,CSS,css,dat,db,exe,Exe,GIF,gif,gz,HTM,jar,java,jpg,mol,pkg,png,ppt,psd,rss,sgml,tab,TAB,tgz,ttf,TXT,utf,xml,rdf";\n+\tthis.metanames="Access, citation_title, citation_journal_title, citation_date,citation_volume,citation_issue,citation_doi";\n+\tthis.trackevents=true;\n+\tthis.enabled=true;\n+\tthis.i18n=false;\n+\tthis.fpc="WT_FPC";\n+\t// end: user modifiable\n+\tthis.DCS={};\n+\tthis.WT={};\n+\tthis.DCSext={};\n+\tthis.images=[];\n+\tthis.index=0;\n+\tthis.qp=[];\n+\tthis.exre=(function(){return(window.RegExp?new RegExp("dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)","i"):"");})();\n+\tthis.re=(function(){return(window.RegExp?(that.i18n?{"%25":/\\%/g}:{"%09":/\\t/g,"%20":/ /g,"%23":/\\#/g,"%26":/\\&/g,"%2B":/\\+/g,"%3F":/\\?/g,"%5C":/\\\\/g,"%22":/\\"/g,"%7F":/\\x7F/g,"%A0":/\\xA0/g}):"");})();\n+}\n+WebTrends.prototype.dcsGetId=function(){\n+\tif (this.enabled&&(document.cookie.indexOf(this.fpc+"=")==-1)&&(document.cookie.indexOf("WTLOPTOUT=")==-1)){\n+\t\tdocument.write("<scr"+"ipt type=\'text/javascript\' src=\'"+"http"+(window.location.protocol.indexOf(\'https:\')==0?\'s\':\'\')+"://"+this.domain+"/"+this.dcsid+"/wtid.js"+"\'><\\/scr"+"ipt>");\n+\t}\n+}\n+WebTrends.prototype.dcsGetCookie=function(name){\n+\tvar cookies=document.cookie.split("; ");\n+\tvar cmatch=[];\n+\tvar idx=0;\n+\tvar i=0;\n+\tvar namelen=name.length;\n+\tvar clen=cookies.length;\n+\tfor (i=0;i<clen;i++){\n+\t\tvar c=cookies[i];\n+\t\tif ((c.substring(0,namelen+1))==(name+"=")){\n+\t\t\tcmatch[idx++]=c;\n+\t\t}\n+\t}\n+\tvar cmatchCount=cmatch.length;\n+\tif (cmatchCount>0){\n+\t\tidx=0;\n+\t\tif ((cmatchCount>1)&&(name==this.fpc)){\n+\t\t\tvar dLatest=new Date(0);\n+\t\t\tfor (i=0;i<cmatchCount;i++){\n+\t\t\t\tvar lv=parseInt(this.dcsGetCrumb(cmatch[i],"lv"));\n+\t\t\t\tvar dLst=new Date(lv);\n+\t\t\t\tif (dLst>dLatest){\n+\t\t\t\t\tdLatest.setTime(dLst.getTime());\n+\t\t\t\t\tidx=i;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t\treturn unescape(cmatch[idx].substring(namelen+1));\n+\t}\n+\telse{\n+\t\treturn null;\n+\t}\n+}\n+WebTrends.prototype.dcsGetCrumb=function(cval,crumb,sep){\n+\tvar aCookie=cval.split(sep||":");\n+\tfor (var i=0;i<aCookie.length;i++){\n+\t\tvar aCrumb=aCookie[i].split("=");\n+\t\tif (crumb==aCrumb[0]){\n+\t\t\treturn aCrumb[1];\n+\t\t}\n+\t}\n+\treturn null;\n+}\n+WebTrends.prototype.dcsGetIdCrumb=function(cval,crumb){\n+\tvar id=cval.substring(0,cval.indexOf(":lv="));\n+\tvar aCrumb=id.split("=");\n+\tfor (var i=0;i<aCrumb.length;i++){\n+\t\tif (crumb==aCrumb[0]){\n+\t\t\treturn aCrumb[1];\n+\t\t}\n+\t}\n+\treturn null;\n+}\n+WebTrends.prototype.dcsIsFpcSet=function(name,id,lv,ss){\n+\tvar c=this.dcsGetCookie(name);\n+\tif (c){\n+\t\treturn ((id==this.dcsGetIdCrumb(c,"id"))&&(lv==this.dcsGetCrumb(c,"lv"))&&(ss==this.dcsGetCrumb(c,"ss")))?0:3;\n+\t}\n+\treturn 2;\n+}\n+WebTrends.prototype.dcsFPC=f'..b'bTrends.prototype.dcsMeta=function(){\n+\tvar elems;\n+\tif (document.all){\n+\t\telems=document.all.tags("meta");\n+\t}\n+\telse if (document.documentElement){\n+\t\telems=document.getElementsByTagName("meta");\n+\t}\n+\tif (typeof(elems)!="undefined"){\n+\t\tvar length=elems.length;\n+\t\tfor (var i=0;i<length;i++){\n+\t\t\tvar name=elems.item(i).name;\n+\t\t\tvar content=elems.item(i).content;\n+\t\t\tvar equiv=elems.item(i).httpEquiv;\n+\t\t\tif (name.length>0){\n+\t\t\t\tif (name.toUpperCase().indexOf("WT.")==0){\n+\t\t\t\t\tthis.WT[name.substring(3)]=content;\n+\t\t\t\t}\n+\t\t\t\telse if (name.toUpperCase().indexOf("DCSEXT.")==0){\n+\t\t\t\t\tthis.DCSext[name.substring(7)]=content;\n+\t\t\t\t}\n+\t\t\t\telse if (name.toUpperCase().indexOf("DCS.")==0){\n+\t\t\t\t\tthis.DCS[name.substring(4)]=content;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t}\n+}\n+WebTrends.prototype.dcsTag=function(){\n+\tif (document.cookie.indexOf("WTLOPTOUT=")!=-1){\n+\t\treturn;\n+\t}\n+\tvar WT=this.WT;\n+\tvar DCS=this.DCS;\n+\tvar DCSext=this.DCSext;\n+\tvar i18n=this.i18n;\n+\tvar P="http"+(window.location.protocol.indexOf(\'https:\')==0?\'s\':\'\')+"://"+this.domain+(this.dcsid==""?\'\':\'/\'+this.dcsid)+"/dcs.gif?";\n+\tif (i18n){\n+\t\tWT.dep="";\n+\t}\n+\tfor (var N in DCS){\n+ \t\tif (DCS[N]&&(typeof DCS[N]!="function")){\n+\t\t\tP+=this.dcsA(N,DCS[N]);\n+\t\t}\n+\t}\n+\tvar keys=["co_f","vtid","vtvs","vt_f_tlv"];\n+\tfor (var i=0;i<keys.length;i++){\n+\t\tvar key=keys[i];\n+\t\tif (WT[key]){\n+\t\t\tP+=this.dcsA("WT."+key,WT[key]);\n+\t\t\tdelete WT[key];\n+\t\t}\n+\t}\n+\tfor (N in WT){\n+\t\tif (WT[N]&&(typeof WT[N]!="function")){\n+\t\t\tP+=this.dcsA("WT."+N,WT[N]);\n+\t\t}\n+\t}\n+\tfor (N in DCSext){\n+\t\tif (DCSext[N]&&(typeof DCSext[N]!="function")){\n+\t\t\tif (i18n){\n+\t\t\t\tWT.dep=(WT.dep.length==0)?N:(WT.dep+";"+N);\n+\t\t\t}\n+\t\t\tP+=this.dcsA(N,DCSext[N]);\n+\t\t}\n+\t}\n+\tif (i18n&&(WT.dep.length>0)){\n+\t\tP+=this.dcsA("WT.dep",WT.dep);\n+\t}\n+\tif (P.length>2048&&navigator.userAgent.indexOf(\'MSIE\')>=0){\n+\t\tP=P.substring(0,2040)+"&WT.tu=1";\n+\t}\n+\tthis.dcsCreateImage(P);\n+\tthis.WT.ad="";\n+}\n+WebTrends.prototype.dcsDebug=function(){\n+\tvar t=this;\n+\tvar i=t.images[0].src;\n+\tvar q=i.indexOf("?");\n+\tvar r=i.substring(0,q).split("/");\n+\tvar m="<b>Protocol</b><br><code>"+r[0]+"<br></code>";\n+\tm+="<b>Domain</b><br><code>"+r[2]+"<br></code>";\n+\tm+="<b>Path</b><br><code>/"+r[3]+"/"+r[4]+"<br></code>";\n+\tm+="<b>Query Params</b><code>"+i.substring(q+1).replace(/\\&/g,"<br>")+"</code>";\n+\tm+="<br><b>Cookies</b><br><code>"+document.cookie.replace(/\\;/g,"<br>")+"</code>";\n+\tif (t.w&&!t.w.closed){\n+\t\tt.w.close();\n+\n+\t}\n+\tt.w=window.open("","dcsDebug","width=500,height=650,scrollbars=yes,resizable=yes");\n+\tt.w.document.write(m);\n+\tt.w.focus();\n+}\n+\n+WebTrends.prototype.isonsiteHelper=function(host)\n+{\n+    var osda=this.onsitedoms.split(",");\n+    var len=osda.length;\n+    for (x=0; x<len; x++)\n+    {\n+    \tvar o=osda[x].trim();\n+    \tif (host.indexOf(o.toLowerCase())==0)\n+    \t{\n+    \t\treturn true;\n+    \t}\n+    }\n+    return false;\t\n+}\n+WebTrends.prototype.dcsCollect=function(){\n+    if (this.enabled){\n+        this.dcsVar();\n+        this.dcsMeta();\n+        this.dcsAdv();\n+        this.dcsTag();\n+    }\n+}\n+\n+//custom function to get window host\n+WebTrends.prototype.getHost=function(){\n+    host = window.location.hostname.toLowerCase();\n+    //if host starts with www.nature.com but also includes gatway domain (is longer than 14 char)\n+    if ((host.substr(0,14)=="www.nature.com")&&(host.length>14)) {\n+        _tag.DCSext.gateway=host.substr(14,host.length);\n+        //return trimed version of host name\n+        return host.substr(0,14);\n+    } else {\n+        //else return full host\n+        return host;\n+    }\n+}\n+\n+function dcsMultiTrack(){\n+\tif (typeof(_tag)!="undefined"){\n+\t\treturn(_tag.dcsMultiTrack());\n+\t}\n+}\n+\n+function dcsDebug(){\n+\tif (typeof(_tag)!="undefined"){\n+\t\treturn(_tag.dcsDebug());\n+\t}\n+}\n+\n+Function.prototype.wtbind = function(obj){\n+\tvar method=this;\n+\tvar temp=function(){\n+\t\treturn method.apply(obj,arguments);\n+\t};\n+\treturn temp;\n+}\n+\n+String.prototype.trim = function () {\n+    return this.replace(/^\\s*/, "").replace(/\\s*$/, "");\n+}\n'
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/templates/base.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/templates/base.html Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <title> {{title}} </title>
+    <meta charset="UTF-8">
+</head>
+<body>
+
+<h1>msa files for</h1>
+<h2> Species : {{species}} </h2>
+<h2> PI: {{investigator}} </h2>
+<h2> Glycan type : {{glycan}} </h2>
+<h2> Cell type : {{cell}}</h2> 
+
+<ul>
+    {% for item in items %}
+    <li><a href="{{ item.href }}">{{ item.caption }}</a></li>
+    {% endfor %}
+</ul>
+
+
+</body>
+</html>
b
diff -r 000000000000 -r 89592faa2875 get_data/cfg_array/templates/base_array.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/cfg_array/templates/base_array.html Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <title> {{title}} </title>
+    <meta charset="UTF-8">
+</head>
+<body>
+
+<h1>xls glycan array files for</h1>
+<h2> Sample  : {{sample}} </h2>
+<h2> Array version: {{arrayversion}} </h2>
+
+<h3> Conclusive Data</h3>
+<ul>
+    {% for item in items %}
+    {% if item.conclusive  %}
+    <li><a href="{{ item.href }}">{{ item.caption }}</a></li>
+    {% endif %}
+    {% endfor %}
+</ul>
+
+{% if keepinconclusive  %}
+
+<h3> Inconclusive Data</h3>
+<ul>
+    {% for item in items %}
+    {% if not item.conclusive  %}
+    <li><a href="{{ item.href }}">{{ item.caption }}</a></li>
+    {% endif %}
+    {% endfor %}
+</ul>
+{% endif %}
+
+</body>
+</html>
+
b
diff -r 000000000000 -r 89592faa2875 get_data/glycogenedb/getglycogene_entry.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/glycogenedb/getglycogene_entry.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,90 @@
+__author__ = 'cbarnett'
+__license__ = "MIT"
+
+
+def helper_get_G(lineentry):
+    if "G" in lineentry.upper():
+        splitline = lineentry.split()
+        for item in splitline:
+            if "G" in item:
+                return item
+    return None
+
+def get_acceptor_keggids(entry):
+    """
+    :param entry. entry from glycogene db
+    :return: txt keggids
+    """
+    import StringIO
+    import xml.etree.cElementTree as ET
+    #handle = StringIO.StringIO(''.join(entry))
+    handle = StringIO.StringIO(entry)
+    tree = ET.parse(handle)
+    #print tree.findtext("acceptors")
+    root = tree.getroot()
+    print root, root.tag, root.attrib
+    for elem in root.findall('./gts/acceptors/acceptor_ref'):
+        print "acceptors ", elem.tag, elem.attrib
+        a=dict(elem.attrib)
+        for key in a.keys():
+            print key, a[key]
+
+
+def get_entry_from_glycogene(gene):
+    """
+    :param gene. Gene name
+    :return: xml of entry information
+    """
+    import urllib2
+    #import xml.etree.cElementTree as ET
+
+
+    #tree = ET.parse()
+
+    uri = 'http://jcggdb.jp/rcmg/wsglycodb/ggdb/entry/'
+    #if inputstream is None or inputstream == []:
+    #    raise IOError("empty input stream")
+    gene = "ST3GAL1"
+    try: 
+        dbresponse = urllib2.urlopen(uri + gene).read()
+    except Exception as e:
+        raise urllib2.HTTPError(e.url, e.code, e.msg, e.hdrs, e.fp)
+    return dbresponse
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+#    usage = "usage: python %prog [options]\n"
+#    parser = OptionParser(usage=usage)
+#    parser.add_option("-i", action="store", type="string", dest="i", default="input",
+#                      help="single or double column text file containing GL entries")
+#    parser.add_option("-k", action="store", type="string", dest="k", default="kcf.output",
+#                      help="kcf output file name")
+#    parser.add_option("-d", action="store", type="string", dest="d", default="db.output",
+#                      help="KEGG db entry in text format output file name")
+#    (options, args) = parser.parse_args()
+#    try:
+#        instream = file(options.i, 'r')
+#    except Exception as e:
+#        raise IOError(e, "the input file specified does not exist. Use -h flag for help")
+    entry =  get_entry_from_glycogene("ST3GAL1")
+    print entry
+    #instream = file("xml.xml",'r')
+    #entry = instream.read()
+    #print entry
+    get_acceptor_keggids(entry)
+    #out = file("xml.xml",'w')
+    #out.write(entry)
+    #out.close()
+#    try:
+#        kcfout = file(options.k, 'w')
+#        dbout = file(options.d, 'w')
+#    except Exception as e:
+#        raise IOError(e, "cannot open output files. -h flag for help")
+#
+#    kcfout.write("".join(kcf))
+#    dbout.write("".join(db))
+#    kcfout.close()
+#    dbout.close()
+
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/.swp
b
Binary file get_data/kegg_glycan/.swp has changed
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/README_KEGG.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/README_KEGG.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,106 @@
+
+[TOC]
+
+# 1. findKEGG.py
+ **find entries with matching query keywords or other query data in a given database**
+
+## Works with Galaxy?
+Yes. see [findKEGG.xml](findKEGG.xml)
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python findKEGG.py
+```
+
+This will use the default settings for dbname, searchpattern and output
+To specify these :
+```
+../../virtualpy/bin/activate
+findKEGG.py -d $dbname -q $searchpattern -o $output
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python findKEGG.py -h
+```
+
+## Unit Testing?
+Yes. Use test_findKEGG.py
+
+```
+../../virtualpy/bin/activate
+python  test_findKEGG.py
+```
+
+# 2. getkcfKEGG,py
+ **get â€“ retrieves given database entries _but only for GLYCANS_**
+
+
+## Works with Galaxy?
+Yes. see [getkcfKEGG.xml](getkcfKEGG.xml)
+
+## Command line usage
+
+```
+../../virtualpy/bin/activate
+cat "G00092" > input
+python getkcfKEGG.py
+```
+
+This will use the default settings for input, kcfout and dbout
+To specify these :
+```
+../../virtualpy/bin/activate
+    getkcfKEGG.py -i $input -k $kcfout -d $dbout
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python getkcfKEGG.py -h
+```
+
+## Unit Testing?
+Yes. Use test_getkcfKEGG.py
+
+```
+../../virtualpy/bin/activate
+python  test_getkcfKEGG.py
+```
+
+# 3. linkKEGG.py
+ **link â€“ find related entries by using database cross-references**
+
+## Works with Galaxy?
+Yes. see [linkKEGG.xml](linkKEGG.xml)
+
+## Command line usage
+```
+../../virtualpy/bin/activate
+python linkKEGG.py
+```
+
+This will use the default settings for targetdb, source and output
+linkKEGG.py -t $targetdb -s $source -o $output
+To specify these :
+```
+../../virtualpy/bin/activate
+linkKEGG.py -t $targetdb -s $source -o $output
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python linkKEGG.py -h
+```
+
+## Unit Testing?
+Yes. Use test_linkKEGG.py
+
+```
+../../virtualpy/bin/activate
+python  test_linkKEGG.py
+```
+
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/findKEGG.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/findKEGG.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,56 @@
+__author__ = 'cbarnett'
+__license__ = "MIT"
+__version__ = "0.3"
+# http://www.kegg.jp/kegg/rest/keggapi.html
+
+
+def find_entries_in_KEGG(db, query):
+    """
+    :param db: db to search by default is glycan
+    :param query:
+    :return: string  of linked entries
+    """
+    import urllib2
+
+    if db == [] or db == "" or db is None:
+        raise IOError("no db given")
+    if query == [] or query == "" or query is None:
+        raise IOError("no query given")
+    query = query.replace('\n', ' ')  # in case of new lines
+    query = query.replace('\r', ' ')  # in case of new lines
+    uri = 'http://rest.kegg.jp/find/'
+    fulluri = uri + db + "/" + query
+    try:
+        response = urllib2.urlopen(fulluri).read()
+    except Exception as e:
+        raise urllib2.HTTPError(e.url, e.code, e.msg, e.hdrs, e.fp)
+    if str(response.strip()) == "":
+        return None
+    return response
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-d", action="store", type="string", dest="d", default="glycan",
+                      help="db name, options are: pathway | brite | module | ko | genome | <org> | compound | glycan | reaction | rpair | rclass | enzyme | disease | drug | dgroup | environ")
+    parser.add_option("-q", action="store", type="string", dest="q", default="glucose",
+                      help="query e.g. glucose")
+    parser.add_option("-o", action="store", type="string", dest="o", default="found_entries.txt",
+                      help="entries from search output in text format")
+    (options, args) = parser.parse_args()
+    try:
+        outstream = file(options.o, 'w')
+    except Exception as e:
+        raise IOError(e, "the output file cannot be opened. Use -h flag for help")
+    results = find_entries_in_KEGG(db=options.d, query=options.q)
+    try:
+        outstream.write(results)
+    except Exception as e:
+        raise IOError(e, "cannot open output files. -h flag for help")
+    finally:
+        outstream.close()
+
+
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/findKEGG.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/findKEGG.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,76 @@
+<tool id="glytools_kegg_find" name="GAP Find KEGG glycans " version="0.3.1">
+    <description> using the KEGG  database</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[ findKEGG.py -d $dbname -q $searchpattern -o $output ]]></command>
+    <inputs>
+        <param name="dbname" type="select" label="Database">
+          <option value="glycan" selected="true"> search KEGG glycan database</option>
+          <option value="pathway" selected="false"> search KEGG pathway database</option>
+          <option value="brite" selected="false"> search KEGG brite database</option>
+          <option value="module" selected="false"> search KEGG module database</option>
+          <option value="ko" selected="false"> search KEGG ko database</option>
+          <option value="genome" selected="false"> search KEGG genome database</option>
+          <option value="compound" selected="false"> search KEGG compound database</option>
+          <option value="reaction" selected="false"> search KEGG reaction database</option>
+          <option value="rpair" selected="false"> search KEGG rpair database</option>
+          <option value="rclass" selected="false"> search KEGG rclass database</option>
+          <option value="enzyme" selected="false"> search KEGG enzyme database</option>
+          <option value="disease" selected="false"> search KEGG disease database</option>
+          <option value="drug" selected="false"> search KEGG drug database</option>
+          <option value="dgroup" selected="false"> search KEGG dgroup database</option>
+          <option value="environ" selected="false"> search KEGG environ database</option>
+        </param>
+        <param name="searchpattern" type="text" value="glucose" optional="false" label="Query" help="Type in a query for example glucose"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="output" label="entries from KEGG database search"/>
+    </outputs>
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1002/0471250953.bi0112s38</citation>
+ </citations>
+ <tests>
+    <test>
+      <param name="dbname" value="glycan" />
+      <param name="searchpattern" value="gl:G00357" />
+      <output name="output" file="find_test1.txt" />     
+  </test>
+  </tests>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool searches the KEGG database with your text query .
+
+.. class:: infomark
+
+**Input**
+
+Text.
+
+----
+
+.. class:: infomark
+
+**Example**
+
+Query sequence::
+
+ glucose
+
+output sequence::
+
+ gl:G00357       Laminaribiose; Laminariobiose; 3-O-beta-D-Glucopyranosyl-D-glucose; (Glc)2; Glycolipid; Others Glycoprotein; O-Glycan Glycoside Polysaccharide
+ gl:G10608       UDP-D-glucose; UDP-glucose; Uridine diphosphate glucose; (UDP-Glc)1
+ gl:G11108       GDP-glucose; (GDP-Glc)1
+ gl:G11109       ADP-glucose; Adenosine diphosphoglucose; (ADP-Glc)1
+ gl:G11728       Acarviosine-glucose; (Avc)1 (Glc)1
+
+]]>
+</help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/getkcfKEGG.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/getkcfKEGG.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,67 @@
+__author__ = 'cbarnett'
+__license__ = "MIT"
+__version = "0.3"
+
+
+def helper_get_G(lineentry):
+    if "G" in lineentry.upper():
+        splitline = lineentry.split()
+        for item in splitline:
+            if "G" in item:
+                return item
+    return None
+
+
+def get_kcf_from_kegg(inputstream):
+    """
+    :param inputstream: input stream containing gl entries
+    :return: list of kcf output and list of db entry output or empty list
+    """
+    import urllib2
+
+    uri = 'http://rest.kegg.jp/get/'
+    if inputstream is None or inputstream == []:
+        raise IOError("empty input stream")
+    dbresponses = []
+    kcfresponses = []
+    for line in inputstream:
+        glentry = helper_get_G(line)
+        if glentry is not None:
+            try:
+                dbresponse = urllib2.urlopen(uri + glentry).read()
+                kcfresponse = urllib2.urlopen(uri + glentry + "/kcf").read()
+            except Exception as e:
+                raise urllib2.HTTPError(e.url, e.code, e.msg, e.hdrs, e.fp)
+            dbresponses.append(dbresponse)
+            kcfresponses.append(kcfresponse)
+    return kcfresponses, dbresponses
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input",
+                      help="single or double column text file containing GL entries")
+    parser.add_option("-k", action="store", type="string", dest="k", default="kcf.output",
+                      help="kcf output file name")
+    parser.add_option("-d", action="store", type="string", dest="d", default="db.output",
+                      help="KEGG db entry in text format output file name")
+    (options, args) = parser.parse_args()
+    try:
+        instream = file(options.i, 'r')
+    except Exception as e:
+        raise IOError(e, "the input file specified does not exist. Use -h flag for help")
+    kcf, db = get_kcf_from_kegg(instream)
+    try:
+        kcfout = file(options.k, 'w')
+        dbout = file(options.d, 'w')
+    except Exception as e:
+        raise IOError(e, "cannot open output files. -h flag for help")
+
+    kcfout.write("".join(kcf))
+    dbout.write("".join(db))
+    kcfout.close()
+    dbout.close()
+
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/getkcfKEGG.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/getkcfKEGG.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,101 @@
+<tool id="glytools_kegg_get" name="GAP Get KEGG glycans " version="0.3">
+    <description> download kcf entries from KEGG</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[ getkcfKEGG.py -i $input -k $kcfout -d $dbout ]]></command>
+    <inputs>
+        <param format="txt" name="input" type="data"  label="single or double column text file containing GL entries"/>
+    </inputs>
+    <outputs>
+        <data format="kcf" name="kcfout" label="KEGG kcf output for $input.name"/>
+        <data format="txt" name="dbout" label="KEGG db entry - $input.name"/>
+    </outputs>
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1002/0471250953.bi0112s38</citation>
+  </citations>
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool will return both KCF and a text version of the KEGG database entry.
+
+.. class:: infomark
+
+**Input**
+
+Text containing GL entries, for example as returned by a KEGG find result from the glycan DB.
+
+----
+
+.. class:: infomark
+
+**Example**
+
+Query sequence::
+
+ gl:G00357       Laminaribiose; Laminariobiose; 3-O-beta-D-Glucopyranosyl-D-glucose; (Glc)2; Glycolipid; Others Glycoprotein; O-Glycan Glycoside Polysaccharide
+ gl:G10608       UDP-D-glucose; UDP-glucose; Uridine diphosphate glucose; (UDP-Glc)1
+
+kcf output sequence::
+
+ ENTRY       G00357                      Glycan
+ NODE        2
+             1   Glc         0     0
+             2   Glc       -10     0
+ EDGE        1
+             1     2:b1    1:3  
+ ///
+ ENTRY       G10608                      Glycan
+ NODE        1
+             1   UDP-Glc  -0.3     0
+ EDGE        0
+ ///
+
+db output sequence:: 
+
+ ENTRY       G00357                      Glycan
+ NAME        Laminaribiose;
+             Laminariobiose;
+             3-O-beta-D-Glucopyranosyl-D-glucose
+ COMPOSITION (Glc)2
+ MASS        342.3
+ CLASS       Glycolipid; Others
+             Glycoprotein; O-Glycan
+             Glycoside
+             Polysaccharide
+ REMARK      Same as: C02048
+ REACTION    R06058
+ ENZYME      2.4.1.31
+ DBLINKS     CCSD: 3178 12230 17443 23581 28110 31447 32478 34039 36773 37192 38902 39794 39796 39797 39802 39804 40258 41633 41704 43790 44865 45671 47897 48035 48399
+             GlycomeDB: 2361
+             JCGGDB: JCGG-STR014653
+ NODE        2
+             1   Glc         0     0
+             2   Glc       -10     0
+ EDGE        1
+             1     2:b1    1:3  
+ ///
+ ENTRY       G10608                      Glycan
+ NAME        UDP-D-glucose;
+             UDP-glucose;
+             Uridine diphosphate glucose
+ COMPOSITION (UDP-Glc)1
+ REMARK      Same as: C00029
+ REACTION    R06020 R06023 R06036 R06043 R06045 R06051 R06062 R06073 
+             R06181 R06226 R06275 R09315 R09316
+ ENZYME      2.4.1.11        2.4.1.12        2.4.1.13        2.4.1.14        
+             2.4.1.15        2.4.1.34        2.4.1.53        2.4.1.80        
+             2.4.1.183       2.4.1.188       2.4.1.-
+ NODE        1
+             1   UDP-Glc  -0.3     0
+             EDGE        0
+
+ ///
+
+]]>
+</help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/linkKEGG.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/linkKEGG.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,50 @@
+__author__ = 'cbarnett'
+__license__ = "MIT"
+__version = "0.3"
+# http://www.kegg.jp/kegg/rest/keggapi.html
+
+
+def linked_entries_from_kegg(targetdb="glycan", sourcedb="pathway"):
+    """
+    :param targetdb:
+    :param sourcedb:
+    :return: string  of linked entries
+    """
+    import urllib2
+
+    uri = 'http://rest.kegg.jp/link/'
+    fulluri = uri + targetdb + "/" + sourcedb
+    try:
+        response = urllib2.urlopen(fulluri).read()
+    except Exception as e:
+        raise urllib2.HTTPError(e.url, e.code, e.msg, e.hdrs, e.fp)
+    if str(response.strip()) == "":
+        return ""
+    return response
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-t", action="store", type="string", dest="t", default="glycan",
+                      help="target db name pathway | brite | module | ko | genome | <org> | compound | glycan | reaction | rpair | rclass | enzyme | disease | drug | dgroup | environ")
+    parser.add_option("-s", action="store", type="string", dest="s", default="pathway",
+                      help="source db name or db entry e.g. map00010")
+    parser.add_option("-o", action="store", type="string", dest="o", default="linked_entries.txt",
+                      help="linked entries output in text format")
+    (options, args) = parser.parse_args()
+    try:
+        outstream = file(options.o, 'w')
+    except Exception as e:
+        raise IOError(e, "the output file cannot be opened. Use -h flag for help")
+    linked = linked_entries_from_kegg(targetdb=options.t, sourcedb=options.s)
+    try:
+        outstream.write(linked)
+    except Exception as e:
+        raise IOError(e, "cannot open output files. -h flag for help")
+    finally:
+        outstream.close()
+
+
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/linkKEGG.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/linkKEGG.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,117 @@
+<tool id="glytools_kegg_link" name="GAP Cross-reference with KEGG databases " version="0.3.1">
+    <description> searches KEGG for related database entries</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[linkKEGG.py -t $targetdb -s $source -o $output ]]></command>
+    <inputs>
+        <param name="targetdb" type="select" label="Target Database">
+          <option value="glycan" selected="true"> target KEGG glycan database</option>
+          <option value="pathway" selected="false"> target KEGG pathway database</option>
+          <option value="brite" selected="false"> target KEGG brite database</option>
+          <option value="module" selected="false"> target KEGG module database</option>
+          <option value="ko" selected="false"> target KEGG ko database</option>
+          <option value="genome" selected="false"> target KEGG genome database</option>
+          <option value="compound" selected="false"> target KEGG compound database</option>
+          <option value="reaction" selected="false"> target KEGG reaction database</option>
+          <option value="rpair" selected="false"> target KEGG rpair database</option>
+          <option value="rclass" selected="false"> target KEGG rclass database</option>
+          <option value="enzyme" selected="false"> target KEGG enzyme database</option>
+          <option value="disease" selected="false"> target KEGG disease database</option>
+          <option value="drug" selected="false"> target KEGG drug database</option>
+          <option value="dgroup" selected="false"> target KEGG dgroup database</option>
+          <option value="environ" selected="false"> target KEGG environ database</option>
+        </param>
+        <param name="source" type="text" value="ec:2.4.1.11" optional="false" label="Source database or entry" help="Source database or db entry to use to search target db. Example dbsource is genome. Example db entry is map00010"/>
+    </inputs>
+    <outputs>
+        <data format="txt" name="output" label="linked entries from KEGG database search"/>
+    </outputs>
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1002/0471250953.bi0112s38</citation>
+  </citations>
+ <tests>
+    <test>
+      <param name="targetdb" value="glycan" />
+      <param name="source" value="ec:2.4.1.11"" />
+      <output name="output" file="link_test1.txt" />     
+  </test>
+  </tests>
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool find connections between entries or db's found at KEGG. For instance which enzymes work on UDP-Glucose, or which reactions is UDP-Glucose involved in,
+or which glycans are acted by an enzyme that acts on UDP-Glucose (ec:2.4.1.11).
+
+----
+
+.. class:: infomark
+
+**Example 1**
+
+target and source sequence::
+
+ enzyme
+ gl:G10608 
+
+output sequence::
+
+ gl:G10608    ec:2.4.1.11
+ gl:G10608    ec:2.4.1.12
+ gl:G10608    ec:2.4.1.13
+ gl:G10608    ec:2.4.1.14
+ gl:G10608    ec:2.4.1.15
+ gl:G10608    ec:2.4.1.183
+ gl:G10608    ec:2.4.1.188
+ gl:G10608    ec:2.4.1.34
+ gl:G10608    ec:2.4.1.53
+ gl:G10608    ec:2.4.1.80

+.. class:: infomark
+
+**Example 2**
+
+target and source sequence::
+
+ reaction
+ gl:G10608 
+
+output sequence::
+
+ gl:G10608    rn:R06020
+ gl:G10608    rn:R06023
+ gl:G10608    rn:R06036
+ gl:G10608    rn:R06043
+ gl:G10608    rn:R06045
+ gl:G10608    rn:R06051
+ gl:G10608    rn:R06062
+ gl:G10608    rn:R06073
+ gl:G10608    rn:R06181
+ gl:G10608    rn:R06226
+ gl:G10608    rn:R06275
+ gl:G10608    rn:R09315
+ gl:G10608    rn:R09316
+
+.. class:: infomark
+
+**Example 3**
+
+target and source sequence::
+
+ glycan
+ ec:2.4.1.11
+
+output sequence::
+
+ ec:2.4.1.11    gl:G10495
+ ec:2.4.1.11    gl:G10608
+ ec:2.4.1.11    gl:G10619
+
+]]>
+
+</help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/test-data/find_test1.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/test-data/find_test1.txt Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,1 @@
+gl:G00357 Laminaribiose; Laminariobiose; 3-O-beta-D-Glucopyranosyl-D-glucose; (Glc)2; Glycolipid; Others Glycoprotein; O-Glycan Glycoside Polysaccharide
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/test-data/link_test1.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/test-data/link_test1.txt Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,3 @@
+ec:2.4.1.11 gl:G10495
+ec:2.4.1.11 gl:G10608
+ec:2.4.1.11 gl:G10619
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/test_findKEGG.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/test_findKEGG.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,60 @@
+__license__ = "MIT"
+
+import unittest
+import findKEGG as fk
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_no_db_specified(self):
+        """should raise error"""
+        with self.assertRaises(IOError):
+            m = fk.find_entries_in_KEGG([], " ")
+        with self.assertRaises(IOError):
+            m = fk.find_entries_in_KEGG("", " ")
+        with self.assertRaises(IOError):
+            m = fk.find_entries_in_KEGG(None, " ")
+
+    def test_no_query_specified(self):
+        """should raise error"""
+        with self.assertRaises(IOError):
+            m = fk.find_entries_in_KEGG("glycan", "")
+        with self.assertRaises(IOError):
+            m = fk.find_entries_in_KEGG("glycan", [])
+        with self.assertRaises(IOError):
+            m = fk.find_entries_in_KEGG("glycan", None)
+
+
+    def test_bad_db(self):
+        """should raise error"""
+        import urllib2
+
+        with self.assertRaises(urllib2.HTTPError):
+            m = fk.find_entries_in_KEGG("john", "glucose")
+
+    def test_unfindable_entry(self):
+        """should return None"""
+        m = fk.find_entries_in_KEGG("glycan", "sally")
+        self.assertIsNone(m)
+
+    def test_find_example(self):
+        m = fk.find_entries_in_KEGG("glycan", "glucose")
+        self.assertIsNotNone(m)
+        self.assertIn("GDP-glucose", m)
+
+    def test_query_has_newlines(self):
+        """
+        should be fine and return entries
+        """
+        m = fk.find_entries_in_KEGG("glycan", "glucose\n UDP")
+        self.assertIsNotNone(m)
+        self.assertIn("UDP-D-glucose", m)
+
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/test_getkcfKEGG.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/test_getkcfKEGG.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,74 @@
+__license__ = "MIT"
+
+import unittest
+import getkcfKEGG as gk
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_empty_stream(self):
+        """ if empty stream then should return None"""
+        with self.assertRaises(IOError):
+            m = gk.get_kcf_from_kegg(None)
+        with self.assertRaises(IOError):
+            m = gk.get_kcf_from_kegg([])
+
+    def test_no_matching_entry(self):
+        """
+        if non G* entry  then return empty lists
+        """
+        import StringIO
+        import urllib2
+
+        glycanindex = "X00092"
+        handle = StringIO.StringIO(''.join(glycanindex))
+        m, n = gk.get_kcf_from_kegg(handle)
+        self.assertEqual(m, [])
+        self.assertEqual(n, [])
+
+    def test_malformed_entry(self):
+        """
+        if malformed entry that looks like "G*" then return HTTPError
+        """
+        import StringIO
+        import urllib2
+
+        glycanindex = "GL00092"
+        handle = StringIO.StringIO(''.join(glycanindex))
+        with self.assertRaises(urllib2.HTTPError):
+            m, n = gk.get_kcf_from_kegg(handle)
+
+    def test_glycan(self):
+        """
+        """
+        import StringIO
+
+        glycanindex = "G00092"
+        handle = StringIO.StringIO(''.join(glycanindex))
+        m, n = gk.get_kcf_from_kegg(handle)
+        self.assertIsNotNone(m)
+        self.assertIsNotNone(n)
+        self.assertEqual(1, len(m))
+        self.assertEqual(1, len(n))
+
+    def test_several_glycans(self):
+        """
+        """
+        import StringIO
+
+        glycanindex = "G00092\nG00091\nG00093"
+        handle = StringIO.StringIO(''.join(glycanindex))
+        m, n = gk.get_kcf_from_kegg(handle)
+        self.assertIsNotNone(m)
+        self.assertIsNotNone(n)
+        self.assertEqual(3, len(m))
+        self.assertEqual(3, len(n))
+
b
diff -r 000000000000 -r 89592faa2875 get_data/kegg_glycan/test_linkKEGG.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/get_data/kegg_glycan/test_linkKEGG.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,42 @@
+__license__ = "MIT"
+
+import unittest
+import linkKEGG as lk
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_no_db_specified(self):
+        """should return default glycan path example"""
+        m = lk.linked_entries_from_kegg()
+        self.assertIn("path", m)
+        self.assertIn("G00001", m)
+
+
+    def test_bad_db(self):
+        """"""
+        import urllib2
+
+        with self.assertRaises(urllib2.HTTPError):
+            m = lk.linked_entries_from_kegg("john", "sally")
+
+    def test_bad_dbentry(self):
+        """"""
+        import urllib2
+
+        with self.assertRaises(urllib2.HTTPError):
+            m = lk.linked_entries_from_kegg("ko", "map000")
+
+    def test_no_links_btn_dbs(self):
+        """ should return an empty string, cannot write None to file"""
+        m = lk.linked_entries_from_kegg("br", "gl:G10496")
+        self.assertEquals(m,"")
+
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/glycan_set_operations/README_set.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/glycan_set_operations/README_set.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,32 @@
+[TOC]
+
+# glycan_sets.py
+This tool reads two sets of glycans and return their union, intersection and difference.
+At present works best with kcf data.
+
+
+## Works with Galaxy?
+Yes. see [glycan_sets.xml](glycan_sets.xml)
+
+## Command line usage
+
+```
+../../virtualpy/bin/activate
+python glycan_sets.py --setA $inputa --setB $inputb --uniqueA=$outputa --uniqueB=$outputb --union=$outputu --intersect=$outputi --differenceAB=$outputab --differenceBA=$outputba
+```
+
+
+## Help
+
+```
+../../virtualpy/bin/activate
+python glycan_sets.py -h
+```
+
+## Unit Testing?
+Yes.
+
+```
+../../virtualpy/bin/activate
+python  test_sets.py
+```
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/glycan_set_operations/glycan.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/glycan_set_operations/glycan.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,293 @@\n+__author__ = \'cbarnett\'\n+__license__ = "MIT"\n+\n+\n+class Glycan(object):\n+    """rudimentary glycan class - alpha"""\n+\n+    def __init__(self):\n+        self._sequence = None\n+\n+    def readsequence(self, filename, is_handle=False):\n+        """ try read this file and populate _sequence{}"""\n+        if not is_handle:\n+            try:\n+                with open(filename):\n+                    pass\n+            except IOError:\n+                print \'Oh dear.\', filename, \' doesn\\\'t exist\'\n+                return None\n+        self._sequence = {}\n+        # # record file name\n+        self.sequence["sourcename"] = filename\n+        # # slurp up sequence data from file\n+        if not is_handle:\n+            self.sequence["sourcedata"] = open(str(filename)).read()\n+        else:\n+            filename.seek(0)\n+            self.sequence["sourcedata"] = filename.read()\n+        # # identify type\n+        self.sequence["sourcetype"] = self.file_typer(filename, is_handle)\n+        # interesting way to have a case statement for functions\n+        #  options = {\'kcf\': self.kcf, \'glycoct\': self.glycoct, \'unknown\': self.unknown}\n+        #  self.sequence["internaltype"] = \'kcf\'\n+        options = {\'kcf\': self.kcf, \'glycoct\': self.glycoct, \'glydeii\': self.glydeii, \'unknown\': self.unknown}\n+        self.sequence["internaltype"] = options[self.sequence["sourcetype"]](filename, is_handle)\n+        options = {\'kcf\': self.kcfdata, \'glycoct\': self.glycoct, \'glydeii\': self.glydeii, \'unknown\': self.unknown}\n+        self.sequence["internaltypedata"] = options[self.sequence["sourcetype"]](filename, is_handle)\n+        return self.sequence\n+\n+    @staticmethod\n+    def file_typer(filename, is_handle=False):\n+        """\n+type the glycan formats (inspired by Galaxy)\n+\n+        """\n+        firstline = ""\n+        secondline = ""\n+        try:\n+            if not is_handle:\n+                f = open(filename, "r")\n+            else:\n+                f = filename\n+                f.seek(0)\n+            firstline = f.readline().upper()  # note we are uppercasing here to avoid CasE SenSitIVity\n+            secondline = f.readline().upper()  # note we are uppercasing here to avoid CasE SenSitIVity\n+        except IOError:\n+            print \'Oh dear.\', filename, \' doesn\\\'t exist\'\n+        if "ENTRY" in firstline and "GLYCAN" in firstline:\n+            return \'kcf\'\n+        elif "xml".upper() in firstline:\n+            if "glydeii".upper() in secondline:\n+                return \'glydeii\'\n+            elif "sugar".upper() in secondline:\n+                return \'glycoct\'\n+            else:\n+                return \'unknown\'\n+        else:\n+            return \'unknown\'\n+\n+    @staticmethod\n+    def pretty_print_stats(statname, stats):\n+        print(statname + \'\\n\')\n+        for key in stats:\n+            print(\' |_ Node %s \\n\' % key)\n+            for neighbour in stats[key]:\n+                results = [int(i) for i in stats[key][neighbour]]\n+                print(\'  |__ %s %s \\n\' % (neighbour, sum(results)))\n+\n+    @staticmethod\n+    def kcf(filename, is_handle=False, returntree=False):\n+        """\n+         original code written by S. Silubonde.\n+         improved KCF support by CB\n+        :param filename:\n+        :param is_handle:\n+        :return:\n+        """\n+        import nodes as nds\n+\n+        edgedict = {}\n+        nodedict = {}\n+        aclist = []\n+        nodelist = []\n+        alpbeta = []\n+        vertices_ = []\n+        edges_ = []\n+        if not is_handle:\n+            f = open(filename, "r")\n+        else:\n+            f = filename\n+            f.seek(0)\n+        try:\n+            for line in f:\n+                if "ENTRY" in line:\n+                    minimal_kcf = [line]\n+                elif "NODE" in line:\n+                    _, totalnodes = line.split()\n+                    totalnodes = int(totalnodes)\n+                    minimal_kcf.append(line)\n+                    for inodes in range(0, totalnodes):\n+       '..b'        raise e\n+\n+    @staticmethod\n+    def kcfdata(filename, is_handle=False):\n+        return Glycan.kcf(filename=filename, is_handle=is_handle, returntree=True)\n+\n+    @staticmethod\n+    def glycoct(filename, is_handle=False):\n+        return filename\n+\n+    @staticmethod\n+    def glydeii(filename, is_handle=False):\n+        return filename\n+\n+    @staticmethod\n+    def unknown(filename, is_handle=False):\n+        return filename\n+\n+    def analyse_monomers(self):\n+        if self.sequence is not None:\n+            nodes = self.sequence["internaltype"]["nodes"]\n+            analysed_nodes = {}\n+            for node in (set(nodes)):\n+                analysed_nodes[node] = str(nodes.count(node))\n+            jsond = []\n+            for node in analysed_nodes.keys():\n+                jsond.append(Glycan.jsonitup(node, analysed_nodes[node]))\n+            # print jsond\n+            return jsond\n+        else:\n+            return None\n+\n+    @staticmethod\n+    def jsonitup(ident, value):\n+        jsonobject = {\n+            \'label\': ident,\n+            \'value\': value\n+        }\n+        return jsonobject\n+\n+    def analyse_linkages(self):\n+        if self.sequence is not None:\n+            links = self.sequence["internaltype"]["edges"].keys()\n+            analysed_links = {}\n+            # first split the links for KEGG\n+            splitlinks = []\n+            for link in (set(links)):\n+                splitlink = link.split(\':\')  # need the last part of the link\n+                splitlinks.append(splitlink[1])\n+\n+            for link in (set(splitlinks)):\n+                analysed_links[link] = str(splitlinks.count(link))\n+            jsond = []\n+            for link in analysed_links.keys():\n+                jsond.append(Glycan.jsonitup(link, analysed_links[link]))\n+            # return analysed_links\n+            return jsond\n+        else:\n+            return None\n+\n+    @staticmethod\n+    def jsonify(filetype, numnodes, numedges, nodes, edges):\n+        jsonobject = {\n+            \'filetype\': filetype,\n+            \'numnodes\': numnodes,\n+            \'numedges\': numedges,\n+            \'nodes\': nodes,\n+            \'edges\': edges\n+        }\n+        return jsonobject\n+\n+    def write(self):\n+        if self.sequence is not None:  # repeated code\n+            return self  # cheat\n+        else:\n+            return None\n+\n+    @property\n+    def sequence(self):\n+        """\n+\n+\n+        :return:\n+        """\n+        return self._sequence\n+\n+    @sequence.setter\n+    def sequence(self, value):\n+        self._sequence = value\n+\n+    def analytics(self):\n+        import json\n+\n+        nodejson = [self.analytify(self.sequence["sourcename"], self.sequence["internaltype"][\'numnodes\'],\n+                                   self.sequence["internaltype"][\'numedges\'], self.sequence["internaltype"][\'nodes\'][0],\n+                                   self.analyse_monomers(), self.analyse_linkages())]\n+\n+        d2 = {"data": [key for key in nodejson]}\n+        return json.dumps(d2, indent=4)\n+\n+    def pretty_analytics(self):\n+        """\n+        return html viewable form of analytics data\n+        """\n+        return self\n+\n+    def __eq__(self, other):\n+        if self.sequence["sourcetype"] != \'kcf\' or other.sequence["sourcetype"] != \'kcf\':\n+            return False\n+\n+        if self.sequence["internaltypedata"].is_equal(other.sequence["internaltypedata"]):\n+            return True\n+        else:\n+            return False\n+\n+    def __hash__(self):\n+        if self.sequence["sourcetype"] != \'kcf\':\n+            return 0\n+        else:\n+            return self.sequence["internaltypedata"].hash()\n+\n+    @staticmethod\n+    def analytify(ident, numnodes, numlinkages, root, nodes, linkages):\n+        jsonobject = {\n+            \'id\': ident,\n+            \'numnodes\': numnodes,\n+            \'numlinkages\': numlinkages,\n+            \'root\': root,\n+            \'nodes\': nodes,\n+            \'linkages\': linkages\n+        }\n+        return jsonobject\n'
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/glycan_set_operations/glycan_sets.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/glycan_set_operations/glycan_sets.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,121 @@
+__license__ = "MIT"
+__version = "0.3.10"
+
+
+def read_meta_kcf(inputstream):
+    """
+    :param inputstream: the kcf file
+    :return: list of kcfs
+    """
+
+    if inputstream is None or inputstream == [] or inputstream == "":
+        raise IOError("empty input stream")
+
+    list_of_kcf_paragraphs = []
+    kcfpara = None
+    for line in inputstream:
+        if "ENTRY" in line:
+            kcfpara = [line]
+        elif "///" in line:
+            kcfpara.append(line)
+            list_of_kcf_paragraphs.append(kcfpara)
+        else:
+            if kcfpara is not None:
+                kcfpara.append(line)
+    # . sometimes kcf has no /// or final kcf in many has no ////, so add it
+    if kcfpara not in list_of_kcf_paragraphs:
+        list_of_kcf_paragraphs.append(kcfpara)
+
+    return list_of_kcf_paragraphs  # why this list. easier to deal with each glycan as an individual item in the list
+
+
+def read_meta_kcf_list_to_set(list_of_kcfs):
+    from glycan import Glycan
+
+    import StringIO
+
+    list_of_glycans = []
+    for item in list_of_kcfs:
+        glycan = Glycan()
+        handle = StringIO.StringIO(''.join(item))
+        glycan.readsequence(handle, True)
+        list_of_glycans.append(glycan)
+    return set(list_of_glycans)
+
+
+def glycan_set_to_kcf_meta_string(glycan_set):
+    kcflist = []
+    for gly in glycan_set:
+        kcflist.append(gly.sequence["sourcedata"])
+    return "".join(kcflist)
+
+
+def glycan_set_comparison(fileseta, filesetb):
+    """
+    :param fileseta:
+    :param filesetb:
+    :return: union, intersection, relative diffab and relative diff ba
+    """
+    import logging as logging
+
+    logging.basicConfig(filename="logfile", level=logging.DEBUG)
+    # logging.debug('These are the %s additional glycans', additional_glycans)
+    seta = read_meta_kcf_list_to_set(read_meta_kcf(fileseta))
+    setb = read_meta_kcf_list_to_set(read_meta_kcf(filesetb))
+    # for gly in setA:
+    # print gly, gly.sequence["sourcedata"]
+    unionab = seta.union(setb)
+    intersectionab = seta.intersection(setb)
+    rab = seta - setb
+    rba = setb - seta
+    return glycan_set_to_kcf_meta_string(seta), glycan_set_to_kcf_meta_string(setb), glycan_set_to_kcf_meta_string(
+        unionab), glycan_set_to_kcf_meta_string(intersectionab), glycan_set_to_kcf_meta_string(
+        rab), glycan_set_to_kcf_meta_string(rba)
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("--setA", action="store", type="string", dest="setA", default="setA.kcf",
+                      help="input glycan set in kcf format (this is set A)")
+    parser.add_option("--setB", action="store", type="string", dest="setB", default="setB.kcf",
+                      help="input glycan set in kcf format (this is set B)")
+    parser.add_option("--uniqueA", action="store", type="string", dest="uniqueA", default="uniquesetA.kcf",
+                      help="unique set A (kcf output) ")
+    parser.add_option("--uniqueB", action="store", type="string", dest="uniqueB", default="uniquesetB.kcf",
+                      help="unique set B (kcf output) ")
+    parser.add_option("--union", action="store", type="string", dest="union", default="ABunion.kcf",
+                      help="union of sets (kcf output) ")
+    parser.add_option("--intersect", action="store", type="string", dest="intersect", default="ABintersection.kcf",
+                      help="intersection of sets (kcf output) ")
+    parser.add_option("--differenceAB", action="store", type="string", dest="differenceAB", default="AminusB.kcf",
+                      help="relative difference of sets A - B (kcf output) ")
+    parser.add_option("--differenceBA", action="store", type="string", dest="differenceBA", default="BminusA.kcf",
+                      help="relative difference of sets B - A (kcf output) ")
+    (options, args) = parser.parse_args()
+
+    try:
+        inputA = options.setA
+        inputB = options.setB
+    except Exception as e:
+        raise Exception(e, "Please pass  2 kcf data files")
+    astream = file(inputA, 'r')
+    bstream = file(inputB, 'r')
+    try:
+        uniquesetA, uniquesetB, union, intersection, AB, BA = glycan_set_comparison(astream, bstream)
+        with open(options.uniqueA, "w") as f:
+            f.write(uniquesetA)
+        with open(options.uniqueB, "w") as f:
+            f.write(uniquesetB)
+        with open(options.union, "w") as f:
+            f.write(union)
+        with open(options.intersect, "w") as f:
+            f.write(intersection)
+        with open(options.differenceAB, "w") as f:
+            f.write(AB)
+        with open(options.differenceBA, "w") as f:
+            f.write(BA)
+    except Exception as e:
+        raise e
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/glycan_set_operations/glycan_sets.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/glycan_set_operations/glycan_sets.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,51 @@
+<tool id="glytools_sets"  name="GAP Join and compare glycan sets " version="0.3.10"> 
+    <description> the union, intersection and relative difference of glycan sets</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements>
+    <command interpreter="python"><![CDATA[ glycan_sets.py --setA $inputa --setB $inputb --uniqueA=$outputa --uniqueB=$outputb
+        --union=$outputu --intersect=$outputi --differenceAB=$outputab --differenceBA=$outputba ]]>
+    </command>
+    <inputs>
+        <param format="kcf" name="inputa" type="data"  label="KCF source file"/>
+        <param format="kcf" name="inputb" type="data" label="KCF source file"/>
+    </inputs>
+    <outputs>
+        <data format="kcf" name="outputa" label="Unique : [ data $inputa.name ]"/>
+        <data format="kcf" name="outputb" label="Unique : [ data $inputb.name ]"/>
+        <data format="kcf" name="outputu" label="Union : [${on_string}]"/>
+        <data format="kcf" name="outputi" label="Intersect : [${on_string}]"/>
+        <data format="kcf" name="outputab" label="Relative diff : [ data ${inputa.name} - data ${inputb.name} ]"/>
+        <data format="kcf" name="outputba" label="Relative diff : [ data ${inputb.name} - data ${inputa.name} ]"/>
+    </outputs>
+
+
+    <help> <![CDATA[ 
+.. class:: warningmark
+
+This tool requires *kcf* format.
+
+.. class:: infomark
+
+**What this tool does**
+
+This tool reads two sets of glycans and return their union, intersection and difference.
+At present works best with KCF data.
+
+.. class:: infomark
+
+**Input**
+
+Two glycan data sets in KCF format
+
+.. class:: infomark
+
+**Output**
+
+Unique, Union and Intersection of inputs in KCF format
+
+]]>
+    </help>
+
+</tool>
+
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/glycan_set_operations/nodes.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/glycan_set_operations/nodes.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,171 @@
+__license__ = "MIT"
+
+class node(object):
+    """ A tree-ish class. Each node instance contains children multiple children.
+    """
+    # init with no children
+    def __init__(self, id, name):
+        self.id = id
+        self.name = name
+        self.children = []
+        self.set_mapping_id(-1)
+        # self.mapping_id = int(-1)
+
+    # def __init__(self, id, children = []):
+    # self.id = id
+    # self.children = children
+
+    def add_child(self, newchild):
+        self.children.append(newchild)
+
+    def __repr__(self, level=0):
+        ret = "\t" * level + repr(str(self.id) + " " + str(self.name)) + "\n"
+        for child in self.children:
+            ret += child.__repr__(level + 1)
+        return ret
+
+    def iter(self, level=0):
+        #  ret = "\t" * level + repr(self.id + " " + self.name) + "\n"
+        ret = [self.id + self.name]
+        for child in self.children:
+            ret.append(child.name)
+        for child in self.children:
+            ret.append(child.iter(level + 1))
+        return ret
+
+    # Depth-first traversal
+    # by default preorder traversal (i.e. root, child, subchild)
+    # but post order traversal return as going deep first
+    # and return from deepest node first so prints subchild, child, root
+    def __iter__(self):
+        return next(self)
+
+    def next(self):
+        #  yield self
+        for i in self.children:
+            for ii in i:
+                yield ii
+        yield self
+
+    def bf_traverse(self):
+        thislevel = [self]
+        while thislevel:
+            nextlevel = list()
+            for n in thislevel:
+                print n.name, n.id
+                for children in n.children:
+                    nextlevel.append(children)
+                print
+            thislevel = nextlevel
+
+    def breadth_first(self):
+        """Traverse the nodes of a tree in breadth-first order.
+        The first argument should be the tree root; children
+        should be a function taking as argument a tree node and
+        returning an iterator of the node's children.
+         loosely based on http://code.activestate.com/recipes/231503-breadth-first-traversal-of-tree/
+        # note comments on the page that say this is not BFS, but it works for me
+        # checked vs my other bf_traverse() which prints
+        """
+        yield self
+        last = self
+        for node in self.breadth_first():
+            for child in node.children:
+                yield child
+                last = child
+            if last == node:
+                return
+
+    def return_id(self):
+        # assume id's are unique
+        return self.id
+
+    def return_name(self):
+        return self.name
+
+    # to allow my parent (who I don't know of) to set my mapping id
+    def set_mapping_id(self, id):
+        self.mapping_id = int(id)
+
+    def return_mapping_id(self):
+        return self.mapping_id
+
+    def return_child(self):
+        return self.children
+
+    def return_numchildren(self):
+        return len(self.children)
+
+    def len(self):
+        size = 0
+        for node in self.breadth_first():
+            size += 1
+        return size
+
+    def is_equal(self, tree):
+        # confirm both are node objects
+        if type(self) != type(tree):
+            return False
+        # at least should be the same size
+        if tree.len() != self.len():
+            return False
+        # iterate in parallel and test node name
+        # also test number of children (should also test names but too lazy)
+        for x, y in zip(self.breadth_first(), tree.breadth_first()):
+            if x.name != y.name:
+                return False
+            if x.return_numchildren() != y.return_numchildren():
+                return False
+
+        return True
+
+    def hash(self):
+        # simplistic hashing function
+        hashnum = 0
+        for node in self.breadth_first():
+            # convert each char in node.name to ascii integer equivalent
+            for index in range(len(node.name)):
+                try:
+                    hashnum += ord(node.name[index])
+                except:  # sometimes the character is considered length, ignoring this for now two https://docs.python.org/2/library/functions.html#ord
+                    pass
+        return hashnum
+
+
+if __name__ == '__main__':
+
+    root = node("1", "root")
+    child1 = node("2", "child1")
+    child2 = node("3", "child2")
+    schild1 = node("4", "schild1")
+    root.add_child(child1)
+    root.add_child(child2)
+    child1.add_child(schild1)
+
+    print root
+    print child1
+    print "Use Iterator"
+    for n in root:
+        print "Default Order Depth First -- ", n
+    print "BF traverse print example"
+    root.bf_traverse()
+    print "BF traverse yield example"
+    for n in root.breadth_first():
+        print "BF traversal via yield-- ", n.return_name()
+    print "Length"
+    print root.len()
+    print "Equality"
+    print root.is_equal(root)
+    root2 = node("1", "root")
+    child21 = node("2", "child1")
+    child22 = node("3", "child2")
+    schild21 = node("4", "schild1")
+    root2.add_child(child21)
+    root2.add_child(child22)
+    child21.add_child(schild21)
+    print root.is_equal(root2)
+    child21.add_child(schild21)
+    print root.is_equal(root2)
+    print root.hash()
+
+
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/glycan_set_operations/test_sets.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/glycan_set_operations/test_sets.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,559 @@\n+__license__ = "MIT"\n+\n+import unittest\n+import glycan_sets as gs\n+\n+\n+class SimpleUnitTest(unittest.TestCase):\n+    def setUp(self):\n+        import os\n+\n+        self.kcinput = {"ringsmcaw": """ENTRY       G04845                      Glycan\n+COMPOSITION (Gal)3 (Glc)1 (GlcNAc)2 (LFuc)2 (Neu5Ac)1\n+MASS        1656.5\n+DBLINKS     CCSD: 23949\n+            GlycomeDB: 20420\n+            JCGGDB: JCGG-STR011245\n+NODE        9\n+            1   Glc         0     0\n+            2   Gal       -10     0\n+            3   GlcNAc    -20    10\n+            4   GlcNAc    -20   -10\n+            5   Gal       -30    15\n+            6   LFuc      -30     5\n+            7   LFuc      -30    -5\n+            8   Gal       -30   -15\n+            9   Neu5Ac    -40    15\n+EDGE        8\n+            1     2:b1    1:4\n+            2     3:b1    2:6\n+            3     4:b1    2:3\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a1    4:4\n+            7     8:b1    4:3\n+            8     9:a2    5:3\n+///\n+ENTRY       G05108                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)1 (S)1\n+MASS        1266.2\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33353\n+            GlycomeDB: 20590\n+            JCGGDB: JCGG-STR011425\n+NODE        7\n+            1   GalNAc     20     1\n+            2   Gal        10     1\n+            3   GlcNAc      0     1\n+            4   S          -5     5\n+            5   Gal       -10     1\n+            6   LFuc      -10    -4\n+            7   Neu5Ac    -20     1\n+EDGE        6\n+            1     2:b1    1:3\n+            2     3:b1    2:3\n+            3     4       3:6\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G05121                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)2\n+MASS        1477.3\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33350\n+            GlycomeDB: 20599\n+            JCGGDB: JCGG-STR011433\n+NODE        7\n+            1   GalNAc      0     0\n+            2   Neu5Ac    -10     5\n+            3   Gal       -10    -5\n+            4   GlcNAc    -20    -5\n+            5   Gal       -30     0\n+            6   LFuc      -30   -10\n+            7   Neu5Ac    -40     0\n+EDGE        6\n+            1     2:a2    1:6\n+            2     3:b1    1:3\n+            3     4:b1    3:3\n+            4     5:b1    4:4\n+            5     6:a1    4:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G04183                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)5 (LFuc)1 (Man)3 (Neu5Ac)3\n+MASS        3026.8\n+CLASS       Glycoprotein; N-Glycan\n+DBLINKS     CCSD: 41981\n+            GlycomeDB: 19974\n+            JCGGDB: JCGG-STR010756\n+NODE        15\n+            1   GlcNAc      0     0\n+            2   GlcNAc    -10     0\n+            3   Man       -20     0\n+            4   Man       -30    10\n+            5   Man       -30   -10\n+            6   GlcNAc    -40    10\n+            7   GlcNAc    -40    -5\n+            8   GlcNAc    -40   -15\n+            9   Gal       -50    10\n+            10  Gal       -50     0\n+            11  LFuc      -50   -10\n+            12  Gal       -50   -15\n+            13  Neu5Ac    -60    10\n+            14  Neu5Ac    -60     0\n+            15  Neu5Ac    -60   -15\n+EDGE        14\n+            1     2:b1    1:4\n+            2     3:b1    2:4\n+            3     4:a1    3:6\n+            4     5:a1    3:3\n+            5     6:b1    4:2\n+            6     7:b1    5:4\n+            7     8:b1    5:2\n+            8     9:b1    6:4\n+            9    10:b1    7:4\n+            10   11:a1    7:3\n+            11   12:b1    8:4\n+            12   13:a2    9:6\n+            13   14:a2   10:3\n+            14   15:a2   12:6\n+///\n+\n+ENTRY       G04329                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)3 (LFuc)3 (Neu5Ac)1\n+MASS        1843.7\n+DBLINKS     CCSD: 36620\n+            GlycomeDB: 20084\n+            JCGGDB: JCGG-STR010'..b'  2:4\n+            3     4:b1    3:4\n+            4     5:a1    4:6\n+            5     6:a1    4:3\n+            6     7:b1    4:4\n+            7     8:b1    5:2\n+            8     9:b1    6:2\n+///\n+ENTRY       G00020                      Glycan\n+NODE        9\n+            1   Asn        20     3\n+            2   GlcNAc     11     3\n+            3   GlcNAc      2     3\n+            4   Man        -6     3\n+            5   Man       -13     9\n+            6   Man       -13    -3\n+            7   GlcNAc    -21     9\n+            8   GlcNAc    -21     2\n+            9   GlcNAc    -21    -8\n+EDGE        8\n+            1     2:b1    1\n+            2     3:b1    2:4\n+            3     4:b1    3:4\n+            4     5:a1    4:6\n+            5     6:a1    4:3\n+            6     7:b1    5:2\n+            7     8:b1    6:4\n+            8     9:b1    6:2\n+///\n+""", "ringsbroken": """ABCDEFGENTRY       G00015                      Glycan\n+NODE        8\n+            1   Asn        20     0\n+            2   GlcNAc     12     0\n+"""\n+        }\n+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:\n+        pass\n+\n+    def tearDown(self):\n+        pass\n+\n+    def test_broken_kcf(self):\n+        import StringIO\n+\n+        brk = self.kcinput["ringsbroken"]\n+        handle = StringIO.StringIO(\'\'.join(brk))\n+        with self.assertRaises(UnboundLocalError):\n+            gs.glycan_set_comparison(handle, handle)\n+\n+    def test_same_kcf(self):\n+        import StringIO\n+\n+        kcf = self.kcinput["ringsfinger"]\n+        handle = StringIO.StringIO(\'\'.join(kcf))\n+        handle2 = StringIO.StringIO(\'\'.join(kcf))\n+        uniquesetA, uniquesetB, union, intersection, AB, BA = gs.glycan_set_comparison(handle, handle2)\n+        self.assertEqual(uniquesetA, uniquesetB)\n+        self.assertEqual(union, intersection)\n+        self.assertEqual(AB, BA)\n+\n+    def test_diff_kcf(self):\n+        import StringIO\n+\n+        kcf = self.kcinput["ringsfinger"]\n+        kcf2 = self.kcinput["ringsmcaw"]\n+        handle = StringIO.StringIO(\'\'.join(kcf))\n+        handle2 = StringIO.StringIO(\'\'.join(kcf2))\n+        uniquesetA, uniquesetB, union, intersection, AB, BA = gs.glycan_set_comparison(handle, handle2)\n+        self.assertNotEqual(uniquesetA, uniquesetB)\n+        self.assertNotEqual(union, intersection)\n+        self.assertNotEqual(AB, BA)\n+\n+    def test_diff_kcf_modified(self):\n+        import StringIO\n+\n+        kcf = self.kcinput["ringsfinger"]\n+        kcf2 = self.kcinput["ringsmcaw_modified"]\n+        handle = StringIO.StringIO(\'\'.join(kcf))\n+        handle2 = StringIO.StringIO(\'\'.join(kcf2))\n+        uniquesetA, uniquesetB, union, intersection, AB, BA = gs.glycan_set_comparison(handle, handle2)\n+        self.assertNotEqual(uniquesetA, uniquesetB)\n+        self.assertNotEqual(union, intersection)\n+        self.assertNotEqual(AB, BA)\n+\n+#    def test_bug_read_kcf(self):\n+#        """\n+#        readkcf is not a full implementation. Fails on ringsmcaw test set\n+#        :return:\n+#        """\n+#        import StringIO\n+#\n+#        kcf = self.kcinput["ringsfinger"]\n+#        kcf2 = self.kcinput["ringsmcaw"]\n+#        handle = StringIO.StringIO(\'\'.join(kcf))\n+#        handle2 = StringIO.StringIO(\'\'.join(kcf2))\n+#        with self.assertRaises(ValueError):\n+#            uniquesetA, uniquesetB, union, intersection, AB, BA = gs.glycan_set_comparison(handle, handle2)\n+\n+    def test_empty_stream(self):\n+        with self.assertRaises(IOError):\n+            uniquesetA, uniquesetB, union, intersection, AB, BA = gs.glycan_set_comparison("", "")\n+        with self.assertRaises(IOError):\n+            uniquesetA, uniquesetB, union, intersection, AB, BA = gs.glycan_set_comparison([], [])\n+        with self.assertRaises(IOError):\n+            uniquesetA, uniquesetB, union, intersection, AB, BA = gs.glycan_set_comparison(None, None)\n+\n+\n+def run_tests():\n+    unittest.main()\n+\n+\n+if __name__ == \'__main__\':\n+    run_tests()\n'
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/join_html/README_html.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/join_html/README_html.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,20 @@
+[TOC]
+
+# html_combiner.py
+
+This code provides a vertical split view of two html files.
+
+
+## Works with Galaxy?
+Surprisingly yes. See [html_combiner.xml](html_combiner.xml)
+
+## Command line usage
+
+```
+../../virtualpy/bin/activate
+python html_combiner.py $input1 $input2 $output
+```
+
+## Unit Testing?
+No.
+
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/join_html/html_combiner.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/join_html/html_combiner.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,67 @@
+__license__ = "MIT"
+__version__ = "0.1"
+
+# really rudimentary way to compare two html files
+# Going to make a new html containing a 2 column, 2 row table. Left cell will contain contents of file1, right cell contents of file 2
+# Will strip <html>, </html> and tags by hand for now.
+
+if __name__ == "__main__":
+    import sys
+
+    try:
+        inone = file(sys.argv[1], "read").readlines()
+        for line in inone:
+            if "<html" in line or "</html" in line:
+                inone.remove(line)
+            elif "<head" in line or "</head" in line:
+                inone.remove(line)
+            elif "Content" in line:
+                inone.remove(line)
+            elif "<link" in line or "<title" in line or "<meta":
+                inone.remove(line)
+            elif "</link" in line or "</title" in line or "</meta":
+                inone.remove(line)
+        # print inone
+        intwo = file(sys.argv[2], "read").readlines()
+        for line in intwo:
+            if "<html" in line or "</html" in line:
+                intwo.remove(line)
+            elif "<head" in line or "</head" in line:
+                intwo.remove(line)
+            elif "Content" in line:
+                intwo.remove(line)
+            elif "<link" in line or "<title" in line or "<meta":
+                intwo.remove(line)
+            elif "</link" in line or "</title" in line or "</meta":
+                intwo.remove(line)
+        out = file(sys.argv[3], "w")
+        header = """
+<html>
+<head>
+<title>Compare html files </title>
+</head>
+<table style="width:700px border="1" padding:15px;>
+<thead>
+<tr>
+  <th><h1> File 1 </h1></th> <th> <h1> File 2 </h1> <th>
+</tr>
+</thead>
+<tr>
+  <th>"""
+        out.write(header)
+        out.write("".join(inone))
+        inbetween = """
+ </th> <th> """
+        out.write(inbetween)
+        out.write("".join(intwo))
+        footer = """
+</th>
+</tr>
+</table>  """
+        out.write(footer)
+
+    except Exception as e:
+        raise e
+    finally:
+        out.close()
+
b
diff -r 000000000000 -r 89592faa2875 join_subtract_group/join_html/html_combiner.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/join_subtract_group/join_html/html_combiner.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,37 @@
+<tool id="glytools_combine_html" name="GAP Merge html " version="0.1">
+    <description>files for comparison</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[html_combiner.py $input1 $input2 $output]]></command>
+    <inputs>
+        <param format="html" name="input1" type="data" />
+        <param format="html" name="input2" type="data" />
+    </inputs>
+    <outputs>
+        <data format="html" name="output"/>
+    </outputs>
+    <help> <![CDATA[ 
+
+.. class:: infomark
+
+**What this tool does**
+
+This tool provided a vertical split view of two html files. 
+
+.. class:: infomark
+
+**Input**
+
+Two html files.
+
+.. class:: infomark
+
+**Output**
+
+A single html file with a table containing the two original html files content.
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 manipulate/extend_linearcode/README_extend.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/extend_linearcode/README_extend.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,55 @@
+[TOC]
+
+# lc_extend.py
+This tool provides all permutations of linear code with uncertain leaves.
+
+*Buggy, not guaranteed to function properly...*
+
+## Works with Galaxy?
+Yes. see [lc_extend.xml](lc_extend.xml)
+
+## Command line usage
+
+```
+../../virtualpy/bin/activate
+python lc_extend.py -i $input -o $output -l $logfile $appendorextend
+```
+
+## Example input / output
+Query sequence
+
+```
+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)
+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+```
+
+Default Output sequence
+
+```
+((M??)X??)(Ma2Ma3(Ma3)(Ma6)Ma6)Mb4GNb4GN
+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+```
+
+Extended Output sequence _(not recommended)_
+
+```
+M??Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN
+Ma2Ma3(M??Ma3(Ma6)Ma6)Mb4GNb4GN
+Ma2Ma3(Ma3(M??Ma6)Ma6)Mb4GNb4GN
+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+```
+
+## Help
+```
+../../virtualpy/bin/activate
+python lc_extend.py -h
+```
+
+## Unit Testing?
+Yes.
+
+
+```
+../../virtualpy/bin/activate
+python  test_lc_extend.py
+```
b
diff -r 000000000000 -r 89592faa2875 manipulate/extend_linearcode/lc_extend.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/extend_linearcode/lc_extend.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,228 @@\n+__license__ = "MIT"\n+__version = "0.3"\n+\n+def splitkeepsep(s, sep):  # seems great but adds element to an awkward spot!\n+    """items and keep the separator i.e. a,b,c becomes [\'a,\', \'b,\', \'c\']"""\n+    import re\n+\n+    return reduce(lambda acc, elem: acc[:-1] + [acc[-1] + elem] if elem == sep else acc + [elem],\n+                  re.split("(%s)" % re.escape(sep), s), [])\n+\n+\n+def create_logger(logfile):\n+    import logging as logging\n+    # logging.basicConfig(filename=logfile, level=logging.DEBUG)\n+    logger = logging.getLogger()\n+    hdlr = logging.FileHandler(logfile)\n+    formatter = logging.Formatter(\'%(asctime)s %(levelname)s %(message)s\')\n+    hdlr.setFormatter(formatter)\n+    logger.addHandler(hdlr)  # technically calling this multiple times will not add additional loggers\n+    logger.setLevel(logging.DEBUG)\n+\n+\n+def create_permutations(num_branches, num_additions):\n+    """\n+    # create all permutations of placing num_additions monosaccharides on the end on a glycan with num_branches branch points\n+    """\n+    permute = []\n+    import itertools\n+\n+    a = range(0, num_branches)\n+    if num_additions > 12 or num_additions == 1:  # unsupported return None\n+        return []\n+    elif num_additions == 2:\n+        for r in itertools.product(a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1]))\n+    elif num_additions == 3:\n+        for r in itertools.product(a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2]))\n+    elif num_additions == 4:\n+        for r in itertools.product(a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3]))\n+    elif num_additions == 5:\n+        for r in itertools.product(a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4]))\n+    elif num_additions == 6:\n+        for r in itertools.product(a, a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4], r[5]))\n+    elif num_additions == 7:\n+        for r in itertools.product(a, a, a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4], r[5], r[6]))\n+    elif num_additions == 8:\n+        for r in itertools.product(a, a, a, a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7]))\n+    elif num_additions == 9:\n+        for r in itertools.product(a, a, a, a, a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]))\n+    elif num_additions == 10:\n+        for r in itertools.product(a, a, a, a, a, a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9]))\n+    elif num_additions == 11:\n+        for r in itertools.product(a, a, a, a, a, a, a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10]))\n+    elif num_additions == 12:\n+        for r in itertools.product(a, a, a, a, a, a, a, a, a, a, a, a):\n+            if len(set(r)) == num_additions:\n+                permute.append((r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11]))\n+    return permute\n+\n+\n+def read_linearcode(inputstream, logfile="logging.log", extend=False):\n+    """\n+     read linear code and either append or expand to provide all forms\n+     append mode, appends xylose and comma\'d glycans to the root\n+     extend mode create all permutations if the comma\'d glycan\n+     more on append: # . read linear code and append comma separated data as a new rooted branch with a xylose tag\n+     # example (A??GN??(A??GN??)Ma3(A'..b'                        tempgly = list(gly)  # make sure I make a new copy every time\n+                        tempgly[i] = additional_glycans[0] + tempgly[i]\n+                        linearcode_list.append("".join(tempgly))\n+                        logging.debug(\'This, %s,  is one of the  permutations\', "".join(tempgly))\n+                else:\n+                    perms = create_permutations(len(gly), len(additional_glycans))\n+                    logging.debug(\'There are %s permutations\', len(perms))\n+                    for itm in perms:\n+                        tempgly = list(gly)  # make sure I make a new copy every time\n+                        # .refactor\n+                        for idx in range(0, len(additional_glycans)):\n+                            tempgly[int(itm[idx])] = additional_glycans[idx] + tempgly[int(itm[idx])]\n+                        logging.debug(\'This, %s,  is one of the  permutations\', "".join(tempgly))\n+                        linearcode_list.append("".join(tempgly))\n+\n+            else:  # append xylose tag\n+                # create the additional branch and keep things sorted\n+                additional_branch = "("\n+                for subtype in sorted(set(additional_glycans)):\n+                    base = "("\n+                    for i in range(0, additional_glycans.count(subtype)):\n+                        base += subtype\n+                    base += ")"\n+                    additional_branch += base\n+                additional_branch += "X??)"\n+                logging.debug(\'These are the %s additional glycans after munging\', additional_branch)\n+                # How many branches\n+                gly = splitkeepsep(glycan[0], "(")\n+\n+                # . check if the branch needs brackets\n+                if ")(" not in gly[-2]:  # then need to bracket this\n+                    gly[-2] = gly[-2][:-1] + ")("  # bracket this\n+                    gly[0] = "(" + gly[0]\n+                    logging.debug(\'The glycan with brackets enclosing previous main branch%s\', gly)\n+                else:\n+                    # .. todo check all others until fails and bracket.\n+                    pass\n+\n+                # prepend the additional branch\n+                gly.insert(0, additional_branch)\n+                logging.debug(\'There are %s additional leaves\', len(gly))  # initial part + splits\n+                logging.debug(\'These are the %s additional leaves\', gly)\n+                linearcode_list.append("".join(gly))\n+        else:\n+            if line != "":\n+                linearcode_list.append(line)\n+    return linearcode_list\n+\n+\n+if __name__ == "__main__":\n+    from optparse import OptionParser\n+\n+    usage = "usage: python %prog [options]\\n"\n+    parser = OptionParser(usage=usage)\n+    parser.add_option("-i", action="store", type="string", dest="i", default="input",\n+                      help="input glycan linear code ")\n+    parser.add_option("-l", action="store", type="string", dest="l", default="linearcode.log",\n+                      help="log file name ")\n+    parser.add_option("-o", action="store", type="string", dest="o", default="output",\n+                      help="output file name (linear code) ")\n+    parser.add_option("-e", action="store_true", dest="e", default=False,\n+                      help="turn on extender, which creates all possible permutations . Append by default")\n+    (options, args) = parser.parse_args()\n+\n+    try:\n+        instream = file(options.i, \'r\')\n+    except Exception as e:\n+        raise IOError(e, "the input file specified does not exist. Use -h flag for help")\n+    print options.e\n+    allpermutes = read_linearcode(instream, options.l, options.e)\n+    try:\n+        out = file(options.o, "w")\n+    except Exception as e:\n+        raise IOError(e, "cannot write to output file. Use -h flag for help")\n+    try:\n+        for item in allpermutes:\n+            out.write(item + "\\r\\n")\n+    except Exception as e:\n+        raise e\n+    finally:\n+        out.close()\n'
b
diff -r 000000000000 -r 89592faa2875 manipulate/extend_linearcode/lc_extend.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/extend_linearcode/lc_extend.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,58 @@
+<tool id="glytools_lc_extend" name="GAP Permute Linearcode" version="0.3">
+    <description> and append or extend fragments on fuzzy linear code </description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[lc_extend.py -i $input -o $output -l $logfile $appendorextend ]]></command>
+    <inputs>
+        <param format="linearcode" name="input" type="data" label="Linear Code source file"/>
+        <param name="appendorextend" type="select" label="Behaviour">
+          <option value="" selected="true"> Default append behaviour</option>
+          <option value="-e">Create all possible linearcode combinations (not recommended)</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data format="linearcode" name="output" label="LC permutations of $input.name"/>
+        <data format="txt" name="logfile" label="debugging log file of $input.name"/>
+    </outputs>
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool provides all permutations of linear code with uncertain leaves i.e. that is it converts fuzzy glycans to unfuzzy glycans.
+
+.. class:: infomark
+
+**Inputs**
+
+This tool requires *LinearCode* format.
+
+----
+
+.. class:: infomark
+
+**Example**
+
+Query sequence::
+
+ (Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)
+ (A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+
+ Default Output sequence::
+
+ ((M??)X??)(Ma2Ma3(Ma3)(Ma6)Ma6)Mb4GNb4GN
+ (A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+
+ Extended Output sequence (not recommended)::
+
+ M??Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN
+ Ma2Ma3(M??Ma3(Ma6)Ma6)Mb4GNb4GN
+ Ma2Ma3(Ma3(M??Ma6)Ma6)Mb4GNb4GN
+ (A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+
+]]>
+
+</help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 manipulate/extend_linearcode/test_linearcode_extend.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/extend_linearcode/test_linearcode_extend.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,146 @@
+__license__ = "MIT"
+
+import unittest
+import lc_extend as lc
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        self.examplelc = """(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)
+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)
+(GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+(GN??(GN??)Ma3(GN??Ma6)Mb4GNb4GN)
+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)
+(A??GN??Ma3(GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4GN)
+(NN??A??GN??Ma3(Ma6)Mb4GNb4(Fa6)GN)
+(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M,M)
+(A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(A??GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4GN)
+(Ma2Ma2Ma3(Ma2Ma3(Ma2Ma6)Ma6)Mb4GNb4GN)
+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4GN)
+(GNb4(A??(Fa3)GN??Ma3)(GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)
+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(A??(Fa3)GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)
+(NN??A??GN??Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)
+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4GN)
+(GNb4(NN??A??GN??Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4GN)
+(NN??A??GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(A??(Fa3)GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??(Fa3)GN??Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)
+(GNb4(A??(Fa3)GN??(A??(Fa3)GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??(A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F,F)
+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)
+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??Ma6)Mb4GNb4(Fa6)GN,F)
+(GNb4(NN??A??GN??(A??GN??)Ma3)(A??GN??Ma6)Mb4GNb4(Fa6)GN,F,F)
+(NN??A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)
+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??Ma3(NN??A??GN??(NN??A??(Fa3)GN??)Ma6)Mb4GNb4(Fa6)GN)
+(GNb4(NN??A??GN??Ma3)(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)
+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)
+(NN??A??GN??(NN??A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,F)
+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,NN,A??GN)
+(NN??A??GN??(NN??A??GN??)Ma3(NN??A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F)
+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,F,NN,NN,A??GN)
+(NN??A??(Fa3)GN??(NN??A??GN??)Ma3(NN??A??GN??(NN??A??GN??)Ma6)Mb4GNb4(Fa6)GN)
+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,NN,NN,F,A??GN)
+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,NN,NN,NN,A??GN,F)
+(A??GN??(A??GN??)Ma3(A??GN??(A??GN??)Ma6)Mb4GNb4(Fa6)GN,NN,NN,NN,NN,A??GN,A??GN,F)
+"""
+        pass
+
+    def tearDown(self):
+        pass
+
+
+    def test_simple_lc(self):
+        import StringIO
+
+        lcinput = ["(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.read_linearcode(lchandle, "logging.log")
+        self.assertIsNotNone(m)
+        self.assertEqual(1, len(m))
+
+    def test_commad_lc_extend(self):
+        import StringIO
+
+        lcinput = ["(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.read_linearcode(lchandle, "logging.log", True)
+        self.assertIsNotNone(m)
+        self.assertEqual(3, len(m))
+        self.assertEqual(['M??Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN', 'Ma2Ma3(M??Ma3(Ma6)Ma6)Mb4GNb4GN', 'Ma2Ma3(Ma3(M??Ma6)Ma6)Mb4GNb4GN'],m)
+
+    def test_commad_lc_append(self):
+        import StringIO
+
+        lcinput = ["(Ma2Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN,M)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.read_linearcode(lchandle, "logging.log")
+        self.assertIsNotNone(m)
+        self.assertEqual(1, len(m))
+        self.assertEqual("((M??)X??)(Ma2Ma3(Ma3)(Ma6)Ma6)Mb4GNb4GN", m[0])
+
+    def test_empty_stream(self):
+        """
+        should raise IOError
+        """
+        with self.assertRaises(IOError):
+            m = lc.read_linearcode([], "logging.log")
+        with self.assertRaises(IOError):
+            m = lc.read_linearcode("", "logging.log")
+        with self.assertRaises(IOError):
+            m = lc.read_linearcode([], "logging.log")
+
+    def test_empty_logger(self):
+        """
+        should work as usual as logger is defined by default
+        """
+        import StringIO
+
+        lcinput = ["(Ma3(Ma3(Ma6)Ma6)Mb4GNb4GN)"]
+        lchandle = StringIO.StringIO('\n'.join(lcinput))
+        m = lc.read_linearcode(lchandle)
+        self.assertIsNotNone(m)
+
+    def test_many_lc_extend(self):
+        import StringIO
+
+        lchandle = StringIO.StringIO(''.join(self.examplelc))
+        m = lc.read_linearcode(lchandle, extend=True)
+        self.assertIsNotNone(m)
+        self.assertEqual(150, len(m))
+
+    def test_many_lc_append(self):
+        import StringIO
+
+        lchandle = StringIO.StringIO(''.join(self.examplelc))
+        m = lc.read_linearcode(lchandle)
+        self.assertIsNotNone(m)
+        self.assertEqual(52, len(m))  # that is equal to number of examples
+
+
+def run_tests():
+    unittest.main()
+
+
+if __name__ == '__main__':
+    run_tests()
+
+
b
diff -r 000000000000 -r 89592faa2875 manipulate/minimal_kcf/README_minimal.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/minimal_kcf/README_minimal.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,30 @@
+[TOC]
+
+# rename_kcf.py
+This tool reads kcf glycans and removes all additional data which may cause tools to malfunction. For instance REFERENCE, DBLINKS, MASS etc. Only ENTRY, NODE and EDGE entries are kept
+
+## Works with Galaxy?
+Yes. see [minimal_kcf.xml](minimal_kcf.xml)
+
+## Command line usage
+
+```
+../../virtualpy/bin/activate
+python minimal_kcf.py -i $input -o $kcfoutput
+```
+
+
+## Help
+```
+../../virtualpy/bin/activate
+python minimal_kcf.py -h
+```
+
+## Unit Testing?
+Yes.
+
+
+```
+../../virtualpy/bin/activate
+python  test_minimal_kcf.py
+```
b
diff -r 000000000000 -r 89592faa2875 manipulate/minimal_kcf/minimal_kcf.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/minimal_kcf/minimal_kcf.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,76 @@
+__author__ = "Chris Barnett"
+__version__ = "0.3"
+__license__ = "MIT"
+
+
+def read_meta_kcf(inputstream):
+    """
+    :param inputstream: the kcf file
+    read kcf file (which may contain multiple kcf entries) and only keep ENTRY, NODE and EDGE parts.
+    :return:
+    """
+    if inputstream is None or inputstream == [] or inputstream == "":
+        raise IOError("empty input stream")
+    list_of_kcf_paragraphs = []
+    kcfpara = None
+    for line in inputstream:
+        if "ENTRY" in line:
+            kcfpara = [line]
+        elif "NODE" in line:
+            _, totalnodes = line.split()
+            totalnodes = int(totalnodes)
+            kcfpara.append(line)
+            for inodes in range(0, totalnodes):
+                nodeline = inputstream.next()
+                kcfpara.append(nodeline)
+        elif "EDGE" in line:
+            _, totaledges = line.split()
+            kcfpara.append(line)
+            totaledges = int(totaledges)
+            for inodes in range(0, totaledges):
+                edgeline = inputstream.next()
+                kcfpara.append(edgeline)
+        elif "///" in line:
+            kcfpara.append(line)
+            list_of_kcf_paragraphs.append(kcfpara)
+    # . sometimes kcf has no /// or final kcf in many has no ////, so add it
+    if kcfpara not in list_of_kcf_paragraphs:
+        list_of_kcf_paragraphs.append(kcfpara)
+
+    return list_of_kcf_paragraphs  # why this list. easier to deal with each glycan as an individual item in the list
+
+
+def flatten_meta_kcf_list(metakcflist):
+    """
+
+    :param metakcflist:  a list containing lists of strings
+    :return: combined kcfs as a large string for saving to file
+    """
+    import itertools
+
+    return "".join(list(itertools.chain(*metakcflist)))
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input",
+                      help="input kcf file (input)")
+    parser.add_option("-o", action="store", type="string", dest="o", default="output",
+                      help="output kcf file (output)")
+    (options, args) = parser.parse_args()
+
+    try:
+        inputname = options.i
+        outputname = options.o
+    except Exception as e:
+        raise Exception(e, "Please pass an input (kcf) and output filename as arguments")
+    instream = file(inputname, 'r')
+    try:
+        convertedkcf = read_meta_kcf(instream)
+        with open(outputname, "w") as f:
+            f.write(flatten_meta_kcf_list(convertedkcf))
+    except Exception as e:
+        raise e
b
diff -r 000000000000 -r 89592faa2875 manipulate/minimal_kcf/minimal_kcf.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/minimal_kcf/minimal_kcf.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,42 @@
+<tool id="glytools_minimal_KCF" name="GAP Minimal KCF" version="0.3">
+    <description>Keep only ENTRY, NODE, EDGE content</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[ minimal_kcf.py -i $input -o $kcfoutput ]]></command>
+    <inputs>
+        <param format="kcf" name="input" type="data" label="KCF source file"/>
+    </inputs>
+    <outputs>
+        <data format="kcf" name="kcfoutput" label="Minimal KCF $input.name"/>
+    </outputs>
+
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1002/0471250953.bi0112s38</citation>
+  </citations>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool reads KCF glycans and removes all additional data which may cause tools to malfunction. For instance REFERENCE, DBLINKS, MASS etc. Only ENTRY, NODE and EDGE entries are kept
+
+
+.. class:: infomark
+
+**Input**
+
+*KCF*
+
+.. class:: infomark
+
+**Output**
+
+*KCF*
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 manipulate/minimal_kcf/test_minimal_kcf.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/minimal_kcf/test_minimal_kcf.py Wed Mar 23 14:35:56 2016 -0400
[
b'@@ -0,0 +1,709 @@\n+__license__ = "MIT"\n+\n+import unittest\n+import minimal_kcf as mk\n+\n+\n+class SimpleUnitTest(unittest.TestCase):\n+    def setUp(self):\n+        import os\n+        self.kcinput = {"ringsmcaw": """ENTRY       G04845                      Glycan\n+COMPOSITION (Gal)3 (Glc)1 (GlcNAc)2 (LFuc)2 (Neu5Ac)1\n+MASS        1656.5\n+DBLINKS     CCSD: 23949\n+            GlycomeDB: 20420\n+            JCGGDB: JCGG-STR011245\n+NODE        9\n+            1   Glc         0     0\n+            2   Gal       -10     0\n+            3   GlcNAc    -20    10\n+            4   GlcNAc    -20   -10\n+            5   Gal       -30    15\n+            6   LFuc      -30     5\n+            7   LFuc      -30    -5\n+            8   Gal       -30   -15\n+            9   Neu5Ac    -40    15\n+EDGE        8\n+            1     2:b1    1:4\n+            2     3:b1    2:6\n+            3     4:b1    2:3\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a1    4:4\n+            7     8:b1    4:3\n+            8     9:a2    5:3\n+///\n+ENTRY       G05108                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)1 (S)1\n+MASS        1266.2\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33353\n+            GlycomeDB: 20590\n+            JCGGDB: JCGG-STR011425\n+NODE        7\n+            1   GalNAc     20     1\n+            2   Gal        10     1\n+            3   GlcNAc      0     1\n+            4   S          -5     5\n+            5   Gal       -10     1\n+            6   LFuc      -10    -4\n+            7   Neu5Ac    -20     1\n+EDGE        6\n+            1     2:b1    1:3\n+            2     3:b1    2:3\n+            3     4       3:6\n+            4     5:b1    3:4\n+            5     6:a1    3:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G05121                      Glycan\n+COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)2\n+MASS        1477.3\n+CLASS       Glycoprotein; O-Glycan\n+DBLINKS     CCSD: 33350\n+            GlycomeDB: 20599\n+            JCGGDB: JCGG-STR011433\n+NODE        7\n+            1   GalNAc      0     0\n+            2   Neu5Ac    -10     5\n+            3   Gal       -10    -5\n+            4   GlcNAc    -20    -5\n+            5   Gal       -30     0\n+            6   LFuc      -30   -10\n+            7   Neu5Ac    -40     0\n+EDGE        6\n+            1     2:a2    1:6\n+            2     3:b1    1:3\n+            3     4:b1    3:3\n+            4     5:b1    4:4\n+            5     6:a1    4:3\n+            6     7:a2    5:3\n+///\n+\n+ENTRY       G04183                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)5 (LFuc)1 (Man)3 (Neu5Ac)3\n+MASS        3026.8\n+CLASS       Glycoprotein; N-Glycan\n+DBLINKS     CCSD: 41981\n+            GlycomeDB: 19974\n+            JCGGDB: JCGG-STR010756\n+NODE        15\n+            1   GlcNAc      0     0\n+            2   GlcNAc    -10     0\n+            3   Man       -20     0\n+            4   Man       -30    10\n+            5   Man       -30   -10\n+            6   GlcNAc    -40    10\n+            7   GlcNAc    -40    -5\n+            8   GlcNAc    -40   -15\n+            9   Gal       -50    10\n+            10  Gal       -50     0\n+            11  LFuc      -50   -10\n+            12  Gal       -50   -15\n+            13  Neu5Ac    -60    10\n+            14  Neu5Ac    -60     0\n+            15  Neu5Ac    -60   -15\n+EDGE        14\n+            1     2:b1    1:4\n+            2     3:b1    2:4\n+            3     4:a1    3:6\n+            4     5:a1    3:3\n+            5     6:b1    4:2\n+            6     7:b1    5:4\n+            7     8:b1    5:2\n+            8     9:b1    6:4\n+            9    10:b1    7:4\n+            10   11:a1    7:3\n+            11   12:b1    8:4\n+            12   13:a2    9:6\n+            13   14:a2   10:3\n+            14   15:a2   12:6\n+///\n+\n+ENTRY       G04329                      Glycan\n+COMPOSITION (Gal)3 (GlcNAc)3 (LFuc)3 (Neu5Ac)1\n+MASS        1843.7\n+DBLINKS     CCSD: 36620\n+            GlycomeDB: 20084\n+            JCGGDB: JCGG-STR01087'..b'      18   -10\n+            4   GlcNAc      9     0\n+            5   Gal         0     5\n+            6   LFuc        0    -5\n+            7   GlcNAc     -9     5\n+            8   Gal       -18    10\n+            9   LFuc      -18     0\n+            10  Neu5Ac    -27    10\n+EDGE        9\n+            1     2:b1    1:4\n+            2     3:a1    1:3\n+            3     4:b1    2:3\n+            4     5:b1    4:4\n+            5     6:a1    4:3\n+            6     7:b1    5:3\n+            7     8:b1    7:4\n+            8     9:a1    7:3\n+            9    10:a2    8:3\n+///\n+ENTRY       G04804                      Glycan\n+NODE        15\n+            1   GlcNAc   27.2   1.6\n+            2   GlcNAc   17.2   1.6\n+            3   Man       8.2   1.6\n+            4   Man       0.2   7.6\n+            5   Man       0.2  -4.4\n+            6   GlcNAc   -8.8   7.6\n+            7   GlcNAc   -8.8  -0.4\n+            8   GlcNAc   -8.8  -8.4\n+            9   Gal     -17.8   7.6\n+            10  Gal     -17.8   3.6\n+            11  LFuc    -17.8  -4.4\n+            12  Gal     -17.8  -8.4\n+            13  Neu5Ac  -26.8   7.6\n+            14  Neu5Ac  -26.8   3.6\n+            15  Neu5Ac  -26.8  -8.4\n+EDGE        14\n+            1     2:b1    1:4\n+            2     3:b1    2:4\n+            3     4:a1    3:6\n+            4     5:a1    3:3\n+            5     6:b1    4:2\n+            6     7:b1    5:4\n+            7     8:b1    5:2\n+            8     9:b1    6:4\n+            9    10:b1    7:4\n+            10   11:a1    7:3\n+            11   12:b1    8:4\n+            12   13:a2    9:3\n+            13   14:a2   10:3\n+            14   15:a2   12:6\n+///\n+"""}\n+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:\n+        pass\n+\n+    def tearDown(self):\n+        pass\n+\n+    def test_simple_kcf(self):\n+        import StringIO\n+\n+        kcinput = """ENTRY      X     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+"""\n+\n+        kchandle = StringIO.StringIO(\'\'.join(kcinput))\n+        h = mk.read_meta_kcf(kchandle)\n+        i = mk.flatten_meta_kcf_list(h)\n+        self.assertIn("ENTRY      X     Glycan\\n", i)\n+        self.assertIn("NODE        2\\n", i)\n+        self.assertIn("            1     2:1     1\\n", i)\n+\n+\n+\n+    def test_multiple_kcf(self):\n+        import StringIO\n+\n+        kcinput = """ENTRY      ((A??)AN)     Glycan\n+NODE        2\n+            1     galnac     0     0\n+            2     gal     -8     0\n+EDGE        1\n+            1     2:1     1\n+///\n+ENTRY       G00005                      Glycan\n+NODE        6\n+            1   PP-Dol     15     1\n+            2   GlcNAc      8     1\n+            3   GlcNAc      0     1\n+            4   Man        -9     1\n+            5   Man       -16     7\n+            6   Man       -16    -6\n+EDGE        5\n+            1     2:a1    1\n+            2     3:b1    2:4\n+            3     4:b1    3:4\n+            4     5:a1    4:6\n+            5     6:a1    4:3\n+///\n+"""\n+        kchandle = StringIO.StringIO(\'\'.join(kcinput))\n+        h = mk.read_meta_kcf(kchandle)\n+        i = mk.flatten_meta_kcf_list(h)\n+        self.assertIn("            1     2:1     1\\n", i)\n+        self.assertIn("            5     6:a1    4:3\\n", i)\n+\n+    def test_empty_stream(self):\n+        with self.assertRaises(IOError):\n+            m = mk.read_meta_kcf(None)\n+        with self.assertRaises(IOError):\n+            m = mk.read_meta_kcf([])\n+        with self.assertRaises(IOError):\n+            m = mk.read_meta_kcf("")\n+\n+    def test_mcaw_kcf(self):\n+        import StringIO\n+        kcf = self.kcinput["ringsmcaw"]\n+        handle = StringIO.StringIO(\'\'.join(kcf))\n+        h = mk.read_meta_kcf(handle)\n+        i = mk.flatten_meta_kcf_list(h)\n+        self.assertEqual(i,self.kcoutput["ringsmcaw"])\n+\n+def run_tests():\n+    unittest.main()\n+\n+\n+if __name__ == \'__main__\':\n+    run_tests()\n+\n+\n'
b
diff -r 000000000000 -r 89592faa2875 manipulate/rename_kcf/README_rename.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/rename_kcf/README_rename.md Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,31 @@
+[TOC]
+
+# rename_kcf.py
+This tool reads kcf glycans and sequentially renames them as GLY{$COUNT}. Why? Sometimes entry names have illegal chars e.g. "-" or sometimes they are linearcode.
+
+## Works with Galaxy?
+Yes. see [rename_kcf.xml](rename_kcf.xml)
+
+## Command line usage
+
+```
+../../virtualpy/bin/activate
+python rename_kcf.py -i $input -o $kcfoutput -p $prefix -c $counter
+```
+
+
+## Help
+```
+../../virtualpy/bin/activate
+python rename_kcf.py -h
+```
+
+## Unit Testing?
+Yes.
+
+
+
+```
+../../virtualpy/bin/activate
+python  test_rename_kcf.py
+```
b
diff -r 000000000000 -r 89592faa2875 manipulate/rename_kcf/rename_kcf.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/rename_kcf/rename_kcf.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,86 @@
+__author__ = "Chris Barnett"
+__version__ = "0.3"
+__license__ = "MIT"
+
+class id_generator():
+    def __init__(self, counterinit=0):
+        import itertools
+
+        self.generator = itertools.count(counterinit)
+
+    def next(self):
+        return self.generator.next()
+
+
+def read_meta_kcf(inputstream, prefix="GLY", counterinit=0):
+    """
+    :param inputstream: the kcf file
+    :param prefix: the prefix for the entry. GLY by default. keep it short
+    :param counterinit: entries are numbered starting at counterinit. 0 by default.
+    read kcf file (which may contain multiple kcf entries) and rename the ENTRY.
+    often the ENTRY is too long or linearcode (my fault for suggesting this) and kcf files then are not recognised properly
+    and/or are ignored in MCAW and other analysis tools
+    duplicates are not checked for. entries are named as GLY(x) where x is generated from a counter which by default starts at 0
+    :return:
+    """
+    if inputstream is None or inputstream == [] or inputstream == "":
+        raise IOError("empty input stream")
+    counter = id_generator(counterinit)
+    list_of_kcf_paragraphs = []
+    kcfpara = None
+    for line in inputstream:
+        if "ENTRY" in line:
+            # . could strip and split the line and remake it, but easier to supplant it
+            newline = "ENTRY      " + str(prefix) + str(counter.next()) + "    Glycan\n"
+            kcfpara = [newline]
+        elif "///" in line:
+            kcfpara.append(line)
+            list_of_kcf_paragraphs.append(kcfpara)
+        else:
+            if kcfpara is not None:
+                kcfpara.append(line)
+    # . sometimes kcf has no /// or final kcf in many has no ////, so add it
+    if kcfpara not in list_of_kcf_paragraphs:
+        list_of_kcf_paragraphs.append(kcfpara)
+
+    return list_of_kcf_paragraphs  # why this list. easier to deal with each glycan as an individual item in the list
+
+
+def flatten_meta_kcf_list(metakcflist):
+    """
+
+    :param metakcflist:  a list containing lists of strings
+    :return: combined kcfs as a large string for saving to file
+    """
+    import itertools
+
+    return "".join(list(itertools.chain(*metakcflist)))
+
+
+if __name__ == "__main__":
+    from optparse import OptionParser
+
+    usage = "usage: python %prog [options]\n"
+    parser = OptionParser(usage=usage)
+    parser.add_option("-i", action="store", type="string", dest="i", default="input",
+                      help="input kcf file (input)")
+    parser.add_option("-o", action="store", type="string", dest="o", default="output",
+                      help="output kcf file (output)")
+    parser.add_option("-p", action="store", type="string", dest="p", default="GLY",
+                      help="prefix for glycan entry name change")
+    parser.add_option("-c", action="store", type="int", dest="c", default=0,
+                      help="starting number for counter for glycan entry")
+    (options, args) = parser.parse_args()
+
+    try:
+        inputname = options.i
+        outputname = options.o
+    except Exception as e:
+        raise Exception(e, "Please pass an input (kcf) and output filename as arguments")
+    instream = file(inputname, 'r')
+    try:
+        convertedkcf = read_meta_kcf(instream,prefix=options.p, counterinit=options.c)
+        with open(outputname, "w") as f:
+            f.write(flatten_meta_kcf_list(convertedkcf))
+    except Exception as e:
+        raise e
b
diff -r 000000000000 -r 89592faa2875 manipulate/rename_kcf/rename_kcf.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/rename_kcf/rename_kcf.xml Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,43 @@
+<tool id="glytools_rename_KCF" name="GAP Rename KCF" version="0.3">
+    <description>rename the ENTRY tag in KCF file</description>
+    <requirements>
+        <requirement type="package" version="1.0">python_for_glycan_tools</requirement>
+    </requirements> 
+    <command interpreter="python"><![CDATA[ rename_kcf.py -i $input -o $kcfoutput -p $prefix -c $counter]]></command>
+    <inputs>
+        <param format="kcf" name="input" type="data" label="KCF source file"/>
+        <param name="prefix" type="text" value="GLY" optional="false" label="Prefix for renaming ENTRY" help="Type in a prefix for renaming entry"/>
+        <param name="counter" type="integer" value="0" min="0" max="10000" optional="false" label="Integer start counter for renaming ENTRY"/>
+    </inputs>
+    <outputs>
+        <data format="kcf" name="kcfoutput" label="Renamed KCF $input.name"/>
+    </outputs>
+
+ <citations>
+     <!--  -->
+     <citation type="doi">10.1002/0471250953.bi0112s38</citation>
+  </citations>
+
+    <help> <![CDATA[ 
+.. class:: infomark
+
+**What this tool does**
+
+This tool reads KCF glycans and sequentially renames them as GLY{$COUNT}. Why? Sometimes entry names have illegal chars e.g. "-" or sometimes they are linearcode. Which seems great but linearcode is too long and has too many illegals chars in it, meaning that other tools along the pipeline start to fail. 
+
+.. class:: infomark
+
+**Input**
+
+*KCF*
+
+.. class:: infomark
+
+**Output**
+
+*KCF*
+
+]]>
+    </help>
+
+</tool>
b
diff -r 000000000000 -r 89592faa2875 manipulate/rename_kcf/test_rename_kcf.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manipulate/rename_kcf/test_rename_kcf.py Wed Mar 23 14:35:56 2016 -0400
[
@@ -0,0 +1,141 @@
+__license__ = "MIT"
+
+import unittest
+import rename_kcf as rk
+
+
+class SimpleUnitTest(unittest.TestCase):
+    def setUp(self):
+        import os
+
+        os.environ["http_proxy"] = ""  # work around for IOError: [Errno url error] invalid proxy for http:
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_simple_kcf(self):
+        import StringIO
+
+        kcinput = """ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = rk.read_meta_kcf(kchandle)
+        i = rk.flatten_meta_kcf_list(h)
+        self.assertIn("ENTRY      GLY0    Glycan\n", i)
+
+    def test_simple_kcf_rename_newcount(self):
+        import StringIO
+
+        kcinput = """ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = rk.read_meta_kcf(kchandle, "FLY", 15)
+        i = rk.flatten_meta_kcf_list(h)
+        self.assertIn("ENTRY      FLY15    Glycan\n", i)
+
+    def test_initial_newline_simple_kcf(self):
+        import StringIO
+
+        kcinput = """
+ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = rk.read_meta_kcf(kchandle)
+        i = rk.flatten_meta_kcf_list(h)
+        self.assertIn("ENTRY      GLY0    Glycan\n", i)
+
+    def test_multiple_kcf(self):
+        import StringIO
+
+        kcinput = """ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+ENTRY       G00005                      Glycan
+NODE        6
+            1   PP-Dol     15     1
+            2   GlcNAc      8     1
+            3   GlcNAc      0     1
+            4   Man        -9     1
+            5   Man       -16     7
+            6   Man       -16    -6
+EDGE        5
+            1     2:a1    1
+            2     3:b1    2:4
+            3     4:b1    3:4
+            4     5:a1    4:6
+            5     6:a1    4:3
+///
+"""
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        h = rk.read_meta_kcf(kchandle)
+        i = rk.flatten_meta_kcf_list(h)
+        self.assertIn("ENTRY      GLY0    Glycan\n", i)
+        self.assertIn("ENTRY      GLY1    Glycan\n", i)
+        self.assertIn("ENTRY      GLY2    Glycan\n", i)
+
+    def test_empty_stream(self):
+        with self.assertRaises(IOError):
+            m = rk.read_meta_kcf(None)
+        with self.assertRaises(IOError):
+            m = rk.read_meta_kcf([])
+        with self.assertRaises(IOError):
+            m = rk.read_meta_kcf("")
+
+    def test_non_integer_counter(self):
+        import StringIO
+
+        kcinput = """ENTRY      ((A??)AN)     Glycan
+NODE        2
+            1     galnac     0     0
+            2     gal     -8     0
+EDGE        1
+            1     2:1     1
+///
+"""
+
+        kchandle = StringIO.StringIO(''.join(kcinput))
+        with self.assertRaises(TypeError):
+            h = rk.read_meta_kcf(kchandle, "FLY", "abc")
+
+
+def run_tests():
+    unittest.main()
+
+
+if __name__ == '__main__':
+    run_tests()
+
+
b
diff -r 000000000000 -r 89592faa2875 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Wed Mar 23 14:35:56 2016 -0400
b
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tool_dependency>
+        <package name="python_for_glycan_tools" version="1.0">
+            <install version="1.0">
+                <actions>
+                <action type="setup_virtualenv">pip==6.0
+BeautifulSoup==3.2.1
+numpy==1.9.1
+mechanize==0.2.5
+suds==0.4
+ete2==2.2.1072
+Jinja
+Jinja2
+                 </action>
+                 </actions>
+            </install>
+            <readme>Python package requirements for GlycanTools </readme>
+        </package>
+</tool_dependency>