changeset 71:81b5c08c21e1 draft

Uploaded
author testtool
date Mon, 14 Aug 2017 09:44:57 -0400
parents 759073309c9c
children cb14dbc2fd60
files GRsetFromGEO/.Rapp.history GRsetFromGEO/.Rhistory GRsetFromGEO/._.DS_Store GRsetFromGEO/GRsetFromGEO.R GRsetFromGEO/GRsetFromGEO.xml GRsetFromGEO/test-data/._.DS_Store GRsetFromGEO/test-data/out.RData getMETAdata/._.DS_Store getMETAdata/getMETAdata.R getMETAdata/getMETAdata.xml getMETAdata/test-data/._GSMTable.txt getMETAdata/test-data/GSMTable.txt getMETAdata/test-data/MetaData.txt
diffstat 12 files changed, 72 insertions(+), 62 deletions(-) [+]
line wrap: on
line diff
--- a/GRsetFromGEO/.Rhistory	Fri Jun 09 11:48:24 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-require("minfi", quietly = TRUE)
-?require
-require("minfi", quietly = TRUE)
-minfi
-as.data.frame(GRset)
-GRset <- getGenomicRatioSetFromGEO(GSE)
-getGenomicRatioSetFromGEO
-require("minfi", quietly = TRUE)
-options(warn = -1)
-options("download.file.method"="wget")
-args <- commandArgs(trailingOnly = TRUE)
-GSE = args[1]
-output = args[2]
-GRset <- getGenomicRatioSetFromGEO(GSE)
-save(GRset,file = output)
-sessionInfo()
Binary file GRsetFromGEO/._.DS_Store has changed
--- a/GRsetFromGEO/GRsetFromGEO.R	Fri Jun 09 11:48:24 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-require("minfi", quietly = TRUE)
-
-options(warn = -1)
-options("download.file.method"="wget")
-
-args <- commandArgs(trailingOnly = TRUE)
-GSE = args[1] 
-output = args[2] 
-
-GRset <- getGenomicRatioSetFromGEO(GSE)
-
-save(GRset,file = output)
--- a/GRsetFromGEO/GRsetFromGEO.xml	Fri Jun 09 11:48:24 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<tool id="GetGEO" name="GRsetFromGEO" version="1.16.2">
-  <requirements>
-          <requirement type="package" version="1.20.0">bioconductor-minfi</requirement>
-      </requirements>
-<stdio>
-   <exit_code range="1:" />
-</stdio>
-  <command> Rscript $__tool_directory__/GRsetFromGEO.R "$GSE" "$output" </command>
-  <inputs>
-     <param name="GSE" type="text" value="" label="Enter GSE ID." help="e.g. 'GSE51547'"/>
-  </inputs>
-  <outputs>
-    <data format="RDdata" name="output" label="GRsetFromGEO.RData"/>
-  </outputs>
-  <tests>
-    <test>
-      <param name="test">
-      <element name="test-data">
-          <collection type="data">
-                <element name="GSE" value="GSE51547"/>
-          </collection>
-        </element>
-        </param>
-        <output type="data" format="RData"  name="output" label="test-data/out.RData"/>
-        </test>
-    </tests>
-  <help>
-**Description**
-</help>
-<citations>
-GEO
-</citations>
-</tool>
Binary file GRsetFromGEO/test-data/._.DS_Store has changed
Binary file GRsetFromGEO/test-data/out.RData has changed
Binary file getMETAdata/._.DS_Store has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getMETAdata/getMETAdata.R	Mon Aug 14 09:44:57 2017 -0400
@@ -0,0 +1,25 @@
+require("data.table", quietly = TRUE)
+require("GEOquery", quietly = TRUE)
+
+
+options(warn = -1)
+options("download.file.method"="wget")
+args <- commandArgs(trailingOnly = TRUE)
+GSMTable = args[1]
+MetaTable = args[2]
+
+TAB = fread(GSMTable)
+
+
+if (is.null(TAB)) {
+  stop("Must specify input files")
+} else {
+  options(download.file.method.GEOquery = "wget") 
+
+
+  GEODataTable <- getGEO(TAB$ID[1], getGPL = FALSE)
+  MetaData <- data.frame(Meta(GEODataTable))
+
+  write.table(MetaData, MetaTable, row.names = FALSE, sep = "\t")
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getMETAdata/getMETAdata.xml	Mon Aug 14 09:44:57 2017 -0400
@@ -0,0 +1,41 @@
+<tool id="META" name="getMETAdata" version="1.0.0">
+  <requirements>
+    <requirement type="package" version="1.10.4">r-data.table</requirement>
+    <requirement type="package" version="2.38.4">bioconductor-geoquery</requirement>
+  </requirements>
+<stdio>
+   <exit_code range="1:" />
+</stdio>
+  <command> Rscript $__tool_directory__/getMETAdata.R "$GSMTable" "$MetaTable" </command>
+ <inputs>
+    <param optional="false" format="txt" name="GSMTable" type="data" value="" help="GSM ID and phenotype table." label="[required] GSMTable">
+      <validator type="empty_field" message="This field is required."/>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="txt" name="MetaTable" label="MetaData.txt"/>
+</outputs>
+  <tests>
+    <test>
+      <param name="test">
+      <element name="test-data">
+          <collection type="data">
+              <element name="GSMTable" value="test-data/GSMTable.txt" />
+          </collection>
+        </element>
+        </param>
+        <output format="txt" name="MetaTable" label="test-data/MetaTable.txt"/>
+        </test>
+    </tests>
+  <help>
+**What it does**
+  This R-based tool downloads data from GEO using getGEO from the GEOquery package
+**Input**
+ A table representing ID of GEO objects for download and parsing
+**Output**
+ Get a metadata table from NCBI 
+</help>
+<citations>
+<citation type="doi">10.1093/bioinformatics/btm254</citation>
+</citations>
+</tool>
Binary file getMETAdata/test-data/._GSMTable.txt has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getMETAdata/test-data/GSMTable.txt	Mon Aug 14 09:44:57 2017 -0400
@@ -0,0 +1,4 @@
+ID,Phenotype
+GSM1247787,melanoma
+GSM1247784,melanoma
+GSM1247733,healthy
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/getMETAdata/test-data/MetaData.txt	Mon Aug 14 09:44:57 2017 -0400
@@ -0,0 +1,2 @@
+"channel_count"	"characteristics_ch1"	"contact_address"	"contact_city"	"contact_country"	"contact_department"	"contact_institute"	"contact_name"	"contact_zip.postal_code"	"data_processing"	"data_row_count"	"description"	"extract_protocol_ch1"	"geo_accession"	"hyb_protocol"	"label_ch1"	"label_protocol_ch1"	"last_update_date"	"molecule_ch1"	"organism_ch1"	"platform_id"	"scan_protocol"	"series_id"	"source_name_ch1"	"status"	"submission_date"	"supplementary_file"	"taxid_ch1"	"title"	"type"
+"1"	"sample type: melanoma cell line"	"Barngatan 2B"	"Lund"	"Sweden"	"Dept of Oncology"	"Lund University"	"Martin,,Lauss"	"22185"	"Raw intensities for methylated (M) and unmethylated (U) signal were extracted from Illumina’s GenomeStudio. Beta-values were calculated as M/(M+U). A total of 496 missing values (melanomas) were imputed using k-nearest neighbor imputation (k=10). For each sample we performed a peak-based correction of Illumina I and II chemical assays. For both assays we smoothed the beta values (Epanechnikov smoothing kernel) to estimate unmethylated and methylated peaks, respectively; and the unmethylated peak was moved to 0 and the methylated peak to 1 using linear scaling, with beta-values in between stretched accordingly. Beta-values below 0 were set back to 0 and values above 1 were set to 1."	"485577"	"melanoma cell line"	"Genomic DNA was extracted from the biopsies using QIAamp DNA Mini Kit (Qiagen). A total of 500 ng of DNA were used for bisulfite treatment, using the EZ DNA Methylation Kit (Zymo). We hybridized 200 ng in 4 μl to the Infinium Human Methylation450 BeadChip array."	"GSM1247787"	"Bisulphite converted DNA was amplified, fragmented and hybridised to Illumina Infinium Human Methylation450 Beadchip using standard Illumina protocol"	"Cy5 and Cy3"	"Standard Illumina Protocol"	"May 17 2015"	"genomic DNA"	"Homo sapiens"	"GPL13534"	"Arrays were imaged using BeadArray Reader using standard recommended Illumina scanner setting"	"GSE51547"	"SKMEL3"	"Public on May 17 2015"	"Oct 22 2013"	"NONE"	"9606"	"genomic DNA from Sample SKMEL3"	"genomic"