changeset 38:608ab56a90d0 draft

Uploaded
author testtool
date Mon, 14 Aug 2017 09:21:07 -0400
parents ec7a1f7f9a94
children 5447fc8946ed
files 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 6 files changed, 72 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
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:21:07 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:21:07 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:21:07 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:21:07 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"