changeset 8:5e1d49abfc99 draft

Uploaded
author testtool
date Mon, 06 Feb 2017 05:17:56 -0500
parents 3eb1073638d7
children a376481b54b8
files getGSMdata/.Rhistory getGSMdata/._.DS_Store getGSMdata/getGSMdata.R getGSMdata/getGSMdata.xml getGSMdata/test-data/._.DS_Store getGSMdata/test-data/GSMTable.txt getGSMdata/tool_dependencies.xml
diffstat 7 files changed, 151 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getGSMdata/.Rhistory	Mon Feb 06 05:17:56 2017 -0500
@@ -0,0 +1,17 @@
+GSMTable <- ("test-data/GSMTable.txt")
+write.table(samples, GSMTable, row.names = FALSE, sep = "\t")
+?write.table
+GSE <- "GSE51547"
+search1 <- entrez_search(db = "gds", term = GSE, retmax = 1)
+require("rentrez", quietly = TRUE)
+search1 <- entrez_search(db = "gds", term = GSE, retmax = 1)
+rec2 <- entrez_summary(db = "gds",
+id = search1$ids,
+version = "2.0")
+extract <- extract_from_esummary(rec2,rownames(summary(rec2)))
+samples <- extract$samples
+colnames(samples)[which(names(samples) == "accession")] <- "ID"
+colnames(samples)[which(names(samples) == "title")] <-  "Phenotype"
+write.table(samples, GSMTable, row.names = FALSE, sep = "\t",quote = FALSE)
+write.table(samples, file=GSMTable.txt, row.names = FALSE, sep = "\t",quote = FALSE)
+write.table(samples, file="GSMTable.txt", row.names = FALSE, sep = "\t",quote = FALSE)
Binary file getGSMdata/._.DS_Store has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getGSMdata/getGSMdata.R	Mon Feb 06 05:17:56 2017 -0500
@@ -0,0 +1,20 @@
+require("rentrez", quietly = TRUE)
+
+args <- commandArgs(trailingOnly = TRUE)
+GSE = args[1]
+GSMTable = args[2]
+
+search1 <- entrez_search(db = "gds", term = GSE, retmax = 1)
+
+rec2 <- entrez_summary(db = "gds",
+                       id = search1$ids,
+                       version = "2.0")
+
+extract <- extract_from_esummary(rec2,rownames(summary(rec2)))
+
+samples <- extract$samples
+colnames(samples)[which(names(samples) == "accession")] <- "ID"
+colnames(samples)[which(names(samples) == "title")] <-  "Phenotype"
+
+write.table(samples, GSMTable, row.names = FALSE, sep = "\t",quote = FALSE)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getGSMdata/getGSMdata.xml	Mon Feb 06 05:17:56 2017 -0500
@@ -0,0 +1,37 @@
+<tool id="GSM" name="getGSMdata" version="1.16.2">
+  <requirements>
+<tool_dependency>
+    <package name="methyldata_1_16_2" version="1.16.2">
+        <repository name="methyldata_1_16_2" owner="testtool" prior_installation_required="True" />
+    </package>
+</tool_dependency>
+</requirements>
+<stdio>
+   <exit_code range="1:" />
+</stdio>
+  <command> Rscript $__tool_directory__/getGSMdata.R "$GSE" "$GSMTable" </command>
+  <inputs>
+     <param name="GSE" type="text" value="" label="Enter GSE ID." help="e.g. 'GSE51547'"/>
+  </inputs>
+  <outputs>
+    <data format="txt" name="GSMTable" label="GSMTable.txt"/>
+  </outputs>
+  <tests>
+    <test>
+      <param name="test">
+      <element name="test-data">
+          <collection type="data">
+                <element name="GSE" value="GSE51547"/>
+          </collection>
+        </element>
+        </param>
+        <output format="txt"  name="GSMTable" label="test-data/GSMTable.txt"/>
+        </test>
+    </tests>
+  <help>
+**Description**
+</help>
+<citations>
+GEO
+</citations>
+</tool>
Binary file getGSMdata/test-data/._.DS_Store has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getGSMdata/test-data/GSMTable.txt	Mon Feb 06 05:17:56 2017 -0500
@@ -0,0 +1,71 @@
+ID	Phenotype
+GSM1247797	genomic DNA from Sample HEM.d_gDNA_2
+GSM1247734	genomic DNA from Sample MM37
+GSM1247757	genomic DNA from Sample MM10
+GSM1247794	genomic DNA from Sample HEM.m_gDNA_1
+GSM1247771	genomic DNA from Sample MM52
+GSM1247765	genomic DNA from Sample MM93
+GSM1247768	genomic DNA from Sample MM08
+GSM1247752	genomic DNA from Sample MM17
+GSM1247749	genomic DNA from Sample MM25
+GSM1247789	genomic DNA from Sample HT144
+GSM1247792	genomic DNA from Sample HEM.l_gDNA_1
+GSM1247774	genomic DNA from Sample MM57
+GSM1247751	genomic DNA from Sample MM19
+GSM1247800	genomic DNA from Sample HDF.a_gDNA_1
+GSM1247777	genomic DNA from Sample MM78
+GSM1247760	genomic DNA from Sample MM80
+GSM1247754	genomic DNA from Sample MM01
+GSM1247763	genomic DNA from Sample MM68
+GSM1247786	genomic DNA from Sample MM383
+GSM1247784	genomic DNA from Sample SKMEL5
+GSM1247787	genomic DNA from Sample SKMEL3
+GSM1247747	genomic DNA from Sample MM71
+GSM1247741	genomic DNA from Sample MM60
+GSM1247778	genomic DNA from Sample MM50
+GSM1247744	genomic DNA from Sample MM09
+GSM1247755	genomic DNA from Sample MM58
+GSM1247781	genomic DNA from Sample MM53
+GSM1247758	genomic DNA from Sample MM94
+GSM1247742	genomic DNA from Sample MM43
+GSM1247795	genomic DNA from Sample HEM.m_gDNA_2
+GSM1247779	genomic DNA from Sample MM16
+GSM1247802	genomic DNA from Sample Blood
+GSM1247736	genomic DNA from Sample MM03
+GSM1247739	genomic DNA from Sample MM38
+GSM1247776	genomic DNA from Sample MM95
+GSM1247733	genomic DNA from Sample MM44
+GSM1247770	genomic DNA from Sample MM18
+GSM1247750	genomic DNA from Sample MM11
+GSM1247773	genomic DNA from Sample MM21
+GSM1247745	genomic DNA from Sample MM47
+GSM1247748	genomic DNA from Sample MM61
+GSM1247788	genomic DNA from Sample A7
+GSM1247791	genomic DNA from Sample CHL1
+GSM1247785	genomic DNA from Sample WM852
+GSM1247780	genomic DNA from Sample MM40
+GSM1247783	genomic DNA from Sample A2058
+GSM1247766	genomic DNA from Sample MM24
+GSM1247761	genomic DNA from Sample MM42
+GSM1247746	genomic DNA from Sample MM22
+GSM1247769	genomic DNA from Sample MM27
+GSM1247764	genomic DNA from Sample MM51
+GSM1247772	genomic DNA from Sample MM31
+GSM1247767	genomic DNA from Sample MM34
+GSM1247738	genomic DNA from Sample MM13
+GSM1247735	genomic DNA from Sample MM04
+GSM1247743	genomic DNA from Sample MM20
+GSM1247737	genomic DNA from Sample MM41
+GSM1247799	genomic DNA from Sample HEK.a_gDNA_2
+GSM1247740	genomic DNA from Sample MM81
+GSM1247793	genomic DNA from Sample HEM.l_gDNA_2
+GSM1247796	genomic DNA from Sample HEM.d_gDNA_1
+GSM1247790	genomic DNA from Sample WM239A
+GSM1247775	genomic DNA from Sample MM02
+GSM1247798	genomic DNA from Sample HEK.a_gDNA_1
+GSM1247801	genomic DNA from Sample HDF.a_gDNA_2
+GSM1247756	genomic DNA from Sample MM82
+GSM1247759	genomic DNA from Sample MM14
+GSM1247782	genomic DNA from Sample MM86
+GSM1247762	genomic DNA from Sample MM45
+GSM1247753	genomic DNA from Sample MM83
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getGSMdata/tool_dependencies.xml	Mon Feb 06 05:17:56 2017 -0500
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="methyldata_1_16_2" version="1.16.2">
+        <repository changeset_revision="ea44a0861444" name="methyldata_1_16_2" owner="testtool" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
+    </package>
+</tool_dependency>