Repository 'microarrays'
hg clone https://toolshed.g2.bx.psu.edu/repos/taoufik/microarrays

Changeset 0:cf862e6a6ddb (2018-12-27)
Next changeset 1:842f8effaf59 (2018-12-27)
Commit message:
Uploaded
added:
query_microarray_datasets/GetDatasets.R
query_microarray_datasets/Get_Datasets.xml
query_microarray_datasets/images/workflow.jpg
b
diff -r 000000000000 -r cf862e6a6ddb query_microarray_datasets/GetDatasets.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/query_microarray_datasets/GetDatasets.R Thu Dec 27 05:54:24 2018 -0500
[
@@ -0,0 +1,27 @@
+log_file=file("Query_Geo_Database.log", open = "wt")
+sink(log_file)
+sink(log_file, type = "out")
+suppressWarnings(suppressMessages(library("batch")))
+suppressWarnings(suppressMessages(library(GEOquery)))
+listArguments = parseCommandArgs(evaluate=FALSE)
+GeoCode=listArguments[["GeoCode"]]
+GeoCode=toupper(GeoCode)
+gethelp.df =tryCatch(eList <- getGEOSuppFiles(GeoCode), error = function(cond)"skip")
+if(is.null(gethelp.df)){
+  gethelp.df =tryCatch(eList <- getGEOSuppFiles(GeoCode), error = function(cond)"skip")
+}
+if(is.null(gethelp.df)){
+  print('GeoCode with no raw data, choose another code or retry.')
+}else{
+  if(is.data.frame(gethelp.df)==TRUE){
+    rawdata=rownames(eList)[grep('RAW',rownames(eList))][1]
+    untar(rawdata, exdir = 'CEL')
+  }else{
+    if(gethelp.df=="skip"){
+      print('Network Trouble Try Again Or Check your GeoCode')
+    }else{
+      print('GeoCode with no raw data, choose another code or retry.')
+    }
+  }
+}
+
b
diff -r 000000000000 -r cf862e6a6ddb query_microarray_datasets/Get_Datasets.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/query_microarray_datasets/Get_Datasets.xml Thu Dec 27 05:54:24 2018 -0500
[
@@ -0,0 +1,97 @@
+<tool id="Get_Datasets" name="Query GEO Database" version="20181028">
+    <description> Query Gene Expression Omnibus (GEO) Database using accession code. </description>    
+    <requirements>
+        <requirement type="package" version="3.4.1_0">r-base</requirement>
+        <requirement type="package" version="1.1_4">r-batch</requirement>
+        <requirement type="package" version="2.42.0">bioconductor-geoquery</requirement>
+    </requirements>
+    <command>
+        <![CDATA[
+        Rscript '$__tool_directory__/GetDatasets.R' GeoCode $GeoCode
+            ]]>
+    </command> 
+    <inputs>
+ <param name="GeoCode" size="40" type="text" value="GSE50628" label="GEO accession" help="Gene Expression Omnibus (GEO) accession code">
+      <sanitizer>
+        <valid initial="string.printable,string.digits">
+        </valid>
+      </sanitizer>
+    </param>
+    </inputs>
+    <outputs>
+    <data format="microarray" type="microarray" name="Geo Raw">
+      <discover_datasets pattern="(?P&lt;name&gt;.*)" ext="microarray" format="microarray" type="microarray" visible="true" assign_primary_output="true" directory="CEL" />
+    </data>
+    </outputs>
+    <stdio>
+        <exit_code range="1:" level="fatal" />
+    </stdio>
+    <help>
+
+.. class:: infomark
+
+**Authors**  Bensellak Taoufik bensellak.taoufik@gmail.com, El Messaoudi Idrissi Mohcine mohcine.elmessaoudi@gmail.com , Ahmed Moussa ahmed.moussa2@gmail.com . 
+
+---------------------------------------------------
+
+==================================================================
+Query Gene Expression Omnibus (GEO) Database.
+==================================================================
+
+-----------
+Description
+-----------
+
+This tool is used for querying Gene Expression Omnibus Database.
+
+**GEO accession**
+
+GEO Accession code 
+
+-----------------
+Workflow position
+-----------------
+
+**Upstream tools**
+
++------------------------+------------------+--------+-----------+
+| Name                   | output file      |format  | parameter |
++========================+==================+========+===========+
+| NA                     |  NA              | NA     | NA  |
++------------------------+------------------+--------+-----------+
+
+
+**Downstream tools**
+
++-----------------------------------------------+------------------------------------------------+------------+
+| Name                                          | Output file                                    | Format     |
++===============================================+================================================+============+
+| Create Desig                                  | DataSet.Design.tsv,DataSet.Informations.RData  | tsv,RData  |
++-----------------------------------------------+------------------------------------------------+------------+
+
+-----------
+Input files
+-----------
+
++---------------------------+------------+
+| Parameter : num + label   |   Format   |
++===========================+============+
+| GEO accession             |   String   |
++---------------------------+------------+
+
+------------
+Output files
+------------
+
+**Set of raw samples**
+
+------------------------------
+General schema of the workflow
+------------------------------
+
+.. image:: ./workflow.jpg 
+          :height: 800 
+          :width: 700
+
+   </help>
+</tool>
b
diff -r 000000000000 -r cf862e6a6ddb query_microarray_datasets/images/workflow.jpg
b
Binary file query_microarray_datasets/images/workflow.jpg has changed