Next changeset 1:2e1b256f732f (2018-01-03) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/annotatemyids commit 46271ad3015ee41a825860084b2ab9d8081ecab8 |
added:
annotateMyIDs.xml test-data/ensembl_ids.tab test-data/genelist.txt test-data/out.tab test-data/out_ensembl.tab test-data/out_gokegg.tab test-data/out_rscript.txt |
b |
diff -r 000000000000 -r 442e2d79b05c annotateMyIDs.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/annotateMyIDs.xml Wed Jan 03 15:25:26 2018 -0500 |
[ |
b'@@ -0,0 +1,222 @@\n+<tool id="annotateMyIDs" name="annotateMyIDs" version="3.5.0.0">\n+ <description>annotate a generic set of identifiers</description>\n+ <requirements>\n+ <requirement type="package" version="3.5.0">bioconductor-org.hs.eg.db</requirement>\n+ <requirement type="package" version="3.5.0">bioconductor-org.mm.eg.db</requirement>\n+ <requirement type="package" version="3.5.0">bioconductor-org.dm.eg.db</requirement>\n+ <requirement type="package" version="3.5.0">bioconductor-org.dr.eg.db</requirement>\n+ </requirements>\n+ <version_command><![CDATA[\n+echo $(R --version | grep version | grep -v GNU)", org.Hs.eg.db version" $(R --vanilla --slave -e "library(org.Hs.eg.db); cat(sessionInfo()\\$otherPkgs\\$org.Hs.eg.db\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Dr.eg.db version" $(R --vanilla --slave -e "library(org.Dr.eg.db); cat(sessionInfo()\\$otherPkgs\\$org.Dr.eg.db\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Dm.eg.db version" $(R --vanilla --slave -e "library(org.Dm.eg.db); cat(sessionInfo()\\$otherPkgs\\$org.Dm.eg.db\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", org.Mm.eg.db version" $(R --vanilla --slave -e "library(org.Mm.eg.db); cat(sessionInfo()\\$otherPkgs\\$org.Mm.eg.db\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", optparse version" $(R --vanilla --slave -e "library(optparse); cat(sessionInfo()\\$otherPkgs\\$optparse\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")\n+ ]]></version_command>\n+ <command detect_errors="exit_code"><![CDATA[\n+ #if $rscriptOpt:\n+ cp \'${annotatemyids_script}\' \'${out_rscript}\' &&\n+ #end if\n+ Rscript \'${annotatemyids_script}\'\n+ ]]>\n+ </command>\n+ <configfiles>\n+ <configfile name="annotatemyids_script"><![CDATA[\n+options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )\n+\n+# we need that to not crash galaxy with an UTF8 error on German LC settings.\n+loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")\n+\n+id_type <- "${id_type}"\n+organism <- "${organism}"\n+output_cols <- "${output_cols}"\n+file_has_header <- ${file_has_header}\n+\n+ids <- as.character(read.table(\'$id_file\', header=file_has_header)[,1])\n+\n+if(organism == "Hs"){\n+ suppressPackageStartupMessages(library(org.Hs.eg.db))\n+ db <- org.Hs.eg.db\n+} else if (organism == "Mm"){\n+ suppressPackageStartupMessages(library(org.Mm.eg.db))\n+ db <- org.Mm.eg.db\n+} else if (organism == "Dm"){\n+ suppressPackageStartupMessages(library(org.Dm.eg.db))\n+ db <- org.Dm.eg.db\n+} else if (organism == "Dr"){\n+ suppressPackageStartupMessages(library(org.Dr.eg.db))\n+ db <- org.Dr.eg.db\n+} else {\n+ cat(paste("Organism type not supported", organism))\n+}\n+\n+cols <- unlist(strsplit(output_cols, ","))\n+result <- select(db, keys=ids, keytype=id_type, columns=cols)\n+write.table(result, file=\'$out_tab\', sep="\\t", row.names=FALSE, quote=FALSE)\n+\n+ ]]></configfile>\n+ </configfiles>\n+ <inputs>\n+ <param name="id_file" type="data" format="tabular" label="File with IDs" help="A tabular file with the first column containing one of the supported types of identifier, see Help below." />\n+ <param name="file_has_header" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="File has header?" help="If this option is set to Yes, the tool will assume that the input file has a column header in the first row and the identifers commence on the second line. Default: No" />\n+ <param name="organism" type="select" label="Organism" help="Select the organism the identifiers are from">\n+ <option value="Hs" selected="true">Human</option>\n+ <option value="Mm">Mouse</option>\n+ <option value="Dm">Fruit fly</option>\n+ <option value="Dr">Zebrafish</option>\n+ </param>\n+ <param name="id_type" type="select" label="ID Type" help="Select the type of IDs in your input file">\n+ <option value="'..b'ween IDs e.g. Entrez, Ensembl, Symbols\n+* adding GO and KEGG identifiers\n+\n+.. _Bioconductor: https://www.bioconductor.org/\n+.. _here: http://bioconductor.org/packages/release/data/annotation/manuals/org.Hs.eg.db/man/org.Hs.eg.db.pdf\n+\n+-----\n+\n+**Inputs**\n+\n+A tab-delimited file with identifiers in the first column. If the file contains a header row, select the file has a header option in the tool form above.\n+\n+Example:\n+\n+ =============== =======================\n+ **GeneID** *Additional Columns...*\n+ --------------- -----------------------\n+ ENSG00000091831\n+ ENSG00000082175\n+ ENSG00000141736\n+ ENSG00000012048\n+ ENSG00000139618\n+ ENSG00000129514\n+ ENSG00000171862\n+ ENSG00000141510\n+ =============== =======================\n+\n+ ID types supported for input are:\n+\n+ * **ENSEMBL**: Ensembl gene IDs\n+ * **ENSEMBLPROT**: Ensembl protein IDs\n+ * **ENSEMBLTRANS**: Ensembl transcript IDs\n+ * **ENTREZID**: Entrez gene Identifiers\n+ * **FLYBASE**: FlyBase accession numbers\n+ * **GO**: GO Identifiers\n+ * **MGI**: Jackson Laboratory MGI gene accession numbers\n+ * **PATH**: KEGG Pathway Identifiers\n+ * **REFSEQ**: Refseq Identifiers\n+ * **SYMBOL**: The official gene symbol\n+ * **ZFIN**: Zfin accession numbers\n+\n+.. class:: warningmark\n+\n+This tool uses the ``select`` function from the Bioconductor AnnotationDBi_ package. Note that if you request columns that have multiple matches for your IDs, select will return *one row in the output for each possible match*. This has the effect that if you request multiple columns and some of them have a many-to-one relationship to the IDs, things will continue to multiply accordingly. So it\'s not a good idea to request a large number of columns unless you know what you are asking for should have a one-to-one relationship with the initial set of IDs. In general, if you need to retrieve a column like **GO** or **KEGG**, that has a many-to-one relationship to the original IDs, it is most useful to extract that separately.\n+\n+.. _AnnotationDBi: https://www.bioconductor.org/packages/devel/bioc/manuals/AnnotationDbi/man/AnnotationDbi.pdf\n+\n+-----\n+\n+**Outputs**\n+\n+If the input IDs are Ensembl, the default output will be similar to below, containing four columns. Other columns, such as GO and KEGG terms, can be selected above to be added as additional columns.\n+\n+Example:\n+\n+ =============== ============ ========== =================================\n+ **ENSEMBL** **ENTREZID** **SYMBOL** **GENENAME**\n+ --------------- ------------ ---------- ---------------------------------\n+ ENSG00000091831 2099 ESR1 estrogen receptor 1\n+ ENSG00000082175 5241 PGR progesterone receptor\n+ ENSG00000141736 2064 ERBB2 erb-b2 receptor tyrosine kinase 2\n+ ENSG00000012048 672 BRCA1 breast cancer 1\n+ ENSG00000139618 675 BRCA2 breast cancer 2\n+ ENSG00000129514 3169 FOXA1 forkhead box A1\n+ ENSG00000171862 5728 PTEN phosphatase and tensin homolog\n+ ENSG00000141510 7157 TP53 tumor protein p53\n+ =============== ============ ========== =================================\n+\n+ Columns available for output include many of the ID columns already described under Inputs above and also:\n+\n+ * **ALIAS**: Commonly used gene symbols\n+ * **DESCRIPTION**: The description of the associated gene\n+ * **EVIDENCE**: Evidence codes for GO associations with a gene of interest\n+ * **GENENAME**: The full gene name\n+ * **ONTOLOGY**: For GO Identifiers, which Gene Ontology (BP, CC, or MF)\n+\n+ ]]></help>\n+ <citations>\n+ <citation type="bibtex">\n+ @unpublished{None,\n+ author = {Mark Dunning},\n+ title = {annotateMyIDs},\n+ year = {2017},\n+ eprint = {None},\n+ url = {}\n+ }</citation>\n+ </citations>\n+</tool>\n' |
b |
diff -r 000000000000 -r 442e2d79b05c test-data/ensembl_ids.tab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/ensembl_ids.tab Wed Jan 03 15:25:26 2018 -0500 |
b |
@@ -0,0 +1,9 @@ +ENSG00000091831 +ENSG00000082175 +ENSG00000141736 +ENSG00000012048 +ENSG00000139618 +ENSG00000129514 +ENSG00000171862 +ENSG00000141510 + |
b |
diff -r 000000000000 -r 442e2d79b05c test-data/genelist.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/genelist.txt Wed Jan 03 15:25:26 2018 -0500 |
b |
@@ -0,0 +1,8 @@ +ESR1 +PGR +ERBB2 +BRCA1 +BRCA2 +FOXA1 +PTEN +TP53 \ No newline at end of file |
b |
diff -r 000000000000 -r 442e2d79b05c test-data/out.tab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out.tab Wed Jan 03 15:25:26 2018 -0500 |
b |
@@ -0,0 +1,9 @@ +SYMBOL ENSEMBL ENTREZID GENENAME +ESR1 ENSG00000091831 2099 estrogen receptor 1 +PGR ENSG00000082175 5241 progesterone receptor +ERBB2 ENSG00000141736 2064 erb-b2 receptor tyrosine kinase 2 +BRCA1 ENSG00000012048 672 BRCA1, DNA repair associated +BRCA2 ENSG00000139618 675 BRCA2, DNA repair associated +FOXA1 ENSG00000129514 3169 forkhead box A1 +PTEN ENSG00000171862 5728 phosphatase and tensin homolog +TP53 ENSG00000141510 7157 tumor protein p53 |
b |
diff -r 000000000000 -r 442e2d79b05c test-data/out_ensembl.tab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out_ensembl.tab Wed Jan 03 15:25:26 2018 -0500 |
b |
@@ -0,0 +1,9 @@ +ENSEMBL ENTREZID SYMBOL GENENAME +ENSG00000091831 2099 ESR1 estrogen receptor 1 +ENSG00000082175 5241 PGR progesterone receptor +ENSG00000141736 2064 ERBB2 erb-b2 receptor tyrosine kinase 2 +ENSG00000012048 672 BRCA1 BRCA1, DNA repair associated +ENSG00000139618 675 BRCA2 BRCA2, DNA repair associated +ENSG00000129514 3169 FOXA1 forkhead box A1 +ENSG00000171862 5728 PTEN phosphatase and tensin homolog +ENSG00000141510 7157 TP53 tumor protein p53 |
b |
diff -r 000000000000 -r 442e2d79b05c test-data/out_gokegg.tab --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out_gokegg.tab Wed Jan 03 15:25:26 2018 -0500 |
b |
b'@@ -0,0 +1,674 @@\n+ENSEMBL\tGO\tONTOLOGY\tEVIDENCE\n+ENSG00000091831\tGO:0000122\tBP\tIMP\n+ENSG00000091831\tGO:0000790\tCC\tIDA\n+ENSG00000091831\tGO:0000978\tMF\tIDA\n+ENSG00000091831\tGO:0001046\tMF\tIDA\n+ENSG00000091831\tGO:0001077\tMF\tIDA\n+ENSG00000091831\tGO:0001093\tMF\tIPI\n+ENSG00000091831\tGO:0001223\tMF\tIPI\n+ENSG00000091831\tGO:0001547\tBP\tIEA\n+ENSG00000091831\tGO:0002064\tBP\tIEA\n+ENSG00000091831\tGO:0003682\tMF\tIDA\n+ENSG00000091831\tGO:0003700\tMF\tNAS\n+ENSG00000091831\tGO:0003707\tMF\tTAS\n+ENSG00000091831\tGO:0005496\tMF\tISS\n+ENSG00000091831\tGO:0005515\tMF\tIPI\n+ENSG00000091831\tGO:0005634\tCC\tIDA\n+ENSG00000091831\tGO:0005654\tCC\tTAS\n+ENSG00000091831\tGO:0005737\tCC\tIDA\n+ENSG00000091831\tGO:0005794\tCC\tIEA\n+ENSG00000091831\tGO:0005886\tCC\tIDA\n+ENSG00000091831\tGO:0006338\tBP\tNAS\n+ENSG00000091831\tGO:0006351\tBP\tTAS\n+ENSG00000091831\tGO:0006355\tBP\tNAS\n+ENSG00000091831\tGO:0006357\tBP\tTAS\n+ENSG00000091831\tGO:0006366\tBP\tIDA\n+ENSG00000091831\tGO:0006367\tBP\tTAS\n+ENSG00000091831\tGO:0007165\tBP\tTAS\n+ENSG00000091831\tGO:0007200\tBP\tISS\n+ENSG00000091831\tGO:0007204\tBP\tISS\n+ENSG00000091831\tGO:0008013\tMF\tIPI\n+ENSG00000091831\tGO:0008134\tMF\tIPI\n+ENSG00000091831\tGO:0008209\tBP\tIEA\n+ENSG00000091831\tGO:0008270\tMF\tIEA\n+ENSG00000091831\tGO:0008584\tBP\tIEA\n+ENSG00000091831\tGO:0010629\tBP\tIDA\n+ENSG00000091831\tGO:0010863\tBP\tISS\n+ENSG00000091831\tGO:0016020\tCC\tNAS\n+ENSG00000091831\tGO:0016021\tCC\tIEA\n+ENSG00000091831\tGO:0016579\tBP\tTAS\n+ENSG00000091831\tGO:0017025\tMF\tIPI\n+ENSG00000091831\tGO:0019899\tMF\tIPI\n+ENSG00000091831\tGO:0019901\tMF\tIPI\n+ENSG00000091831\tGO:0030111\tBP\tTAS\n+ENSG00000091831\tGO:0030235\tMF\tNAS\n+ENSG00000091831\tGO:0030284\tMF\tIDA\n+ENSG00000091831\tGO:0030284\tMF\tNAS\n+ENSG00000091831\tGO:0030284\tMF\tTAS\n+ENSG00000091831\tGO:0030331\tMF\tIPI\n+ENSG00000091831\tGO:0030518\tBP\tISS\n+ENSG00000091831\tGO:0030520\tBP\tIDA\n+ENSG00000091831\tGO:0030520\tBP\tNAS\n+ENSG00000091831\tGO:0032355\tBP\tIDA\n+ENSG00000091831\tGO:0033146\tBP\tTAS\n+ENSG00000091831\tGO:0034056\tMF\tIDA\n+ENSG00000091831\tGO:0034121\tBP\tIEA\n+ENSG00000091831\tGO:0035327\tCC\tIDA\n+ENSG00000091831\tGO:0038052\tMF\tIDA\n+ENSG00000091831\tGO:0038052\tMF\tIGI\n+ENSG00000091831\tGO:0042802\tMF\tIPI\n+ENSG00000091831\tGO:0042981\tBP\tIEA\n+ENSG00000091831\tGO:0043124\tBP\tIDA\n+ENSG00000091831\tGO:0043234\tCC\tIMP\n+ENSG00000091831\tGO:0043433\tBP\tIDA\n+ENSG00000091831\tGO:0043627\tBP\tIDA\n+ENSG00000091831\tGO:0045893\tBP\tIDA\n+ENSG00000091831\tGO:0045899\tBP\tIDA\n+ENSG00000091831\tGO:0045944\tBP\tIDA\n+ENSG00000091831\tGO:0048146\tBP\tIEA\n+ENSG00000091831\tGO:0048863\tBP\tIEA\n+ENSG00000091831\tGO:0050727\tBP\tIEA\n+ENSG00000091831\tGO:0051091\tBP\tIDA\n+ENSG00000091831\tGO:0051117\tMF\tIDA\n+ENSG00000091831\tGO:0060065\tBP\tIEA\n+ENSG00000091831\tGO:0060068\tBP\tIEA\n+ENSG00000091831\tGO:0060523\tBP\tIEA\n+ENSG00000091831\tGO:0060527\tBP\tIEA\n+ENSG00000091831\tGO:0060687\tBP\tIEA\n+ENSG00000091831\tGO:0060745\tBP\tIEA\n+ENSG00000091831\tGO:0060749\tBP\tIEA\n+ENSG00000091831\tGO:0060750\tBP\tIEA\n+ENSG00000091831\tGO:0071168\tBP\tIMP\n+ENSG00000091831\tGO:0071391\tBP\tIEA\n+ENSG00000091831\tGO:0071392\tBP\tIDA\n+ENSG00000091831\tGO:0071392\tBP\tISS\n+ENSG00000091831\tGO:0097550\tCC\tIDA\n+ENSG00000091831\tGO:1903799\tBP\tIMP\n+ENSG00000082175\tGO:0000978\tMF\tIDA\n+ENSG00000082175\tGO:0001077\tMF\tIDA\n+ENSG00000082175\tGO:0001542\tBP\tIEA\n+ENSG00000082175\tGO:0002070\tBP\tIEA\n+ENSG00000082175\tGO:0003677\tMF\tTAS\n+ENSG00000082175\tGO:0003707\tMF\tIEA\n+ENSG00000082175\tGO:0004879\tMF\tIEA\n+ENSG00000082175\tGO:0005496\tMF\tIEA\n+ENSG00000082175\tGO:0005515\tMF\tIPI\n+ENSG00000082175\tGO:0005654\tCC\tTAS\n+ENSG00000082175\tGO:0005741\tCC\tIEA\n+ENSG00000082175\tGO:0005829\tCC\tTAS\n+ENSG00000082175\tGO:0006367\tBP\tTAS\n+ENSG00000082175\tGO:0007165\tBP\tTAS\n+ENSG00000082175\tGO:0007267\tBP\tTAS\n+ENSG00000082175\tGO:0008270\tMF\tIEA\n+ENSG00000082175\tGO:0010629\tBP\tIEP\n+ENSG00000082175\tGO:0019899\tMF\tIPI\n+ENSG00000082175\tGO:0038001\tBP\tIEA\n+ENSG00000082175\tGO:0042802\tMF\tIPI\n+ENSG00000082175\tGO:0045944\tBP\tIDA\n+ENSG00000082175\tGO:0048286\tBP\tIEA\n+ENSG00000082175\tGO:0050678\tBP\tIEA\n+ENSG00000082175\tGO:0050847\tBP\tIEA\n+ENSG00000082175\tGO:0051117\tMF\tIDA\n+ENSG00000082175\tGO:0060748\tBP\tIEA\n+ENSG00000141736\tGO:0000165\tBP\tTAS\n+ENSG00000141736\tGO:0001042\tMF\t'..b'4\tBP\tTAS\n+ENSG00000141510\tGO:0006289\tBP\tIMP\n+ENSG00000141510\tGO:0006355\tBP\tIDA\n+ENSG00000141510\tGO:0006355\tBP\tIMP\n+ENSG00000141510\tGO:0006366\tBP\tIEA\n+ENSG00000141510\tGO:0006461\tBP\tIDA\n+ENSG00000141510\tGO:0006914\tBP\tIMP\n+ENSG00000141510\tGO:0006974\tBP\tIDA\n+ENSG00000141510\tGO:0006977\tBP\tIMP\n+ENSG00000141510\tGO:0006977\tBP\tTAS\n+ENSG00000141510\tGO:0006978\tBP\tIDA\n+ENSG00000141510\tGO:0006978\tBP\tIMP\n+ENSG00000141510\tGO:0006983\tBP\tIDA\n+ENSG00000141510\tGO:0007050\tBP\tIDA\n+ENSG00000141510\tGO:0007050\tBP\tIMP\n+ENSG00000141510\tGO:0007265\tBP\tIEP\n+ENSG00000141510\tGO:0007275\tBP\tIMP\n+ENSG00000141510\tGO:0007569\tBP\tIMP\n+ENSG00000141510\tGO:0008104\tBP\tIDA\n+ENSG00000141510\tGO:0008134\tMF\tIPI\n+ENSG00000141510\tGO:0008270\tMF\tTAS\n+ENSG00000141510\tGO:0008283\tBP\tTAS\n+ENSG00000141510\tGO:0008285\tBP\tIDA\n+ENSG00000141510\tGO:0008285\tBP\tIMP\n+ENSG00000141510\tGO:0008285\tBP\tISS\n+ENSG00000141510\tGO:0008340\tBP\tISS\n+ENSG00000141510\tGO:0009299\tBP\tIMP\n+ENSG00000141510\tGO:0010165\tBP\tIBA\n+ENSG00000141510\tGO:0010332\tBP\tIMP\n+ENSG00000141510\tGO:0010628\tBP\tIDA\n+ENSG00000141510\tGO:0010628\tBP\tIMP\n+ENSG00000141510\tGO:0010628\tBP\tISS\n+ENSG00000141510\tGO:0016032\tBP\tIMP\n+ENSG00000141510\tGO:0016363\tCC\tIDA\n+ENSG00000141510\tGO:0016579\tBP\tTAS\n+ENSG00000141510\tGO:0016604\tCC\tIDA\n+ENSG00000141510\tGO:0016605\tCC\tIDA\n+ENSG00000141510\tGO:0019899\tMF\tIPI\n+ENSG00000141510\tGO:0019901\tMF\tIPI\n+ENSG00000141510\tGO:0019903\tMF\tIPI\n+ENSG00000141510\tGO:0030154\tBP\tTAS\n+ENSG00000141510\tGO:0030308\tBP\tIMP\n+ENSG00000141510\tGO:0030330\tBP\tIDA\n+ENSG00000141510\tGO:0030330\tBP\tIMP\n+ENSG00000141510\tGO:0030971\tMF\tIPI\n+ENSG00000141510\tGO:0031065\tBP\tIBA\n+ENSG00000141510\tGO:0031497\tBP\tIDA\n+ENSG00000141510\tGO:0031571\tBP\tIMP\n+ENSG00000141510\tGO:0031625\tMF\tIPI\n+ENSG00000141510\tGO:0032461\tBP\tIDA\n+ENSG00000141510\tGO:0034644\tBP\tIDA\n+ENSG00000141510\tGO:0035035\tMF\tIPI\n+ENSG00000141510\tGO:0035690\tBP\tIEP\n+ENSG00000141510\tGO:0042149\tBP\tIDA\n+ENSG00000141510\tGO:0042771\tBP\tIDA\n+ENSG00000141510\tGO:0042771\tBP\tIMP\n+ENSG00000141510\tGO:0042802\tMF\tIMP\n+ENSG00000141510\tGO:0042802\tMF\tIPI\n+ENSG00000141510\tGO:0042826\tMF\tIPI\n+ENSG00000141510\tGO:0042981\tBP\tIDA\n+ENSG00000141510\tGO:0042981\tBP\tTAS\n+ENSG00000141510\tGO:0043065\tBP\tIDA\n+ENSG00000141510\tGO:0043066\tBP\tIMP\n+ENSG00000141510\tGO:0043153\tBP\tISS\n+ENSG00000141510\tGO:0043161\tBP\tTAS\n+ENSG00000141510\tGO:0043234\tCC\tIDA\n+ENSG00000141510\tGO:0043234\tCC\tIMP\n+ENSG00000141510\tGO:0043525\tBP\tIBA\n+ENSG00000141510\tGO:0043621\tMF\tIPI\n+ENSG00000141510\tGO:0044212\tMF\tIDA\n+ENSG00000141510\tGO:0045892\tBP\tIDA\n+ENSG00000141510\tGO:0045892\tBP\tIMP\n+ENSG00000141510\tGO:0045892\tBP\tISS\n+ENSG00000141510\tGO:0045893\tBP\tIDA\n+ENSG00000141510\tGO:0045893\tBP\tIMP\n+ENSG00000141510\tGO:0045944\tBP\tIDA\n+ENSG00000141510\tGO:0045944\tBP\tIGI\n+ENSG00000141510\tGO:0045944\tBP\tIMP\n+ENSG00000141510\tGO:0046677\tBP\tIEP\n+ENSG00000141510\tGO:0046827\tBP\tTAS\n+ENSG00000141510\tGO:0046902\tBP\tTAS\n+ENSG00000141510\tGO:0046982\tMF\tIPI\n+ENSG00000141510\tGO:0047485\tMF\tIPI\n+ENSG00000141510\tGO:0048147\tBP\tIMP\n+ENSG00000141510\tGO:0048512\tBP\tISS\n+ENSG00000141510\tGO:0050731\tBP\tISS\n+ENSG00000141510\tGO:0051087\tMF\tIPI\n+ENSG00000141510\tGO:0051097\tBP\tTAS\n+ENSG00000141510\tGO:0051262\tBP\tTAS\n+ENSG00000141510\tGO:0051289\tBP\tIMP\n+ENSG00000141510\tGO:0051721\tMF\tIPI\n+ENSG00000141510\tGO:0051974\tBP\tIDA\n+ENSG00000141510\tGO:0070245\tBP\tISS\n+ENSG00000141510\tGO:0071158\tBP\tIDA\n+ENSG00000141510\tGO:0071158\tBP\tIMP\n+ENSG00000141510\tGO:0071456\tBP\tIEP\n+ENSG00000141510\tGO:0071479\tBP\tIMP\n+ENSG00000141510\tGO:0071480\tBP\tIDA\n+ENSG00000141510\tGO:0072331\tBP\tIDA\n+ENSG00000141510\tGO:0072332\tBP\tIMP\n+ENSG00000141510\tGO:0072717\tBP\tIDA\n+ENSG00000141510\tGO:0090200\tBP\tIDA\n+ENSG00000141510\tGO:0090399\tBP\tIMP\n+ENSG00000141510\tGO:0090403\tBP\tIMP\n+ENSG00000141510\tGO:0097193\tBP\tTAS\n+ENSG00000141510\tGO:0097252\tBP\tIDA\n+ENSG00000141510\tGO:0097718\tMF\tIPI\n+ENSG00000141510\tGO:1900119\tBP\tIMP\n+ENSG00000141510\tGO:1900740\tBP\tTAS\n+ENSG00000141510\tGO:1901796\tBP\tTAS\n+ENSG00000141510\tGO:1902749\tBP\tTAS\n+ENSG00000141510\tGO:1902895\tBP\tIDA\n+ENSG00000141510\tGO:1990440\tBP\tISS\n+ENSG00000141510\tGO:2000379\tBP\tIMP\n+ENSG00000141510\tGO:2001244\tBP\tIMP\n' |
b |
diff -r 000000000000 -r 442e2d79b05c test-data/out_rscript.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out_rscript.txt Wed Jan 03 15:25:26 2018 -0500 |
[ |
@@ -0,0 +1,34 @@ + +options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) + +# we need that to not crash galaxy with an UTF8 error on German LC settings. +loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") + +id_type <- "ENSEMBL" +organism <- "Hs" +output_cols <- "ENSEMBL,ENTREZID,SYMBOL,GENENAME" +file_has_header <- FALSE + +ids <- as.character(read.table("/tmp/tmpY5XREO/files/000/dataset_3.dat", header=file_has_header)[,1]) + +if(organism == "Hs"){ + suppressPackageStartupMessages(library(org.Hs.eg.db)) + db <- org.Hs.eg.db +} else if (organism == "Mm"){ + suppressPackageStartupMessages(library(org.Mm.eg.db)) + db <- org.Mm.eg.db +} else if (organism == "Dm"){ + suppressPackageStartupMessages(library(org.Dm.eg.db)) + db <- org.Dm.eg.db +} else if (organism == "Dr"){ + suppressPackageStartupMessages(library(org.Dr.eg.db)) + db <- org.Dr.eg.db +} else { + cat(paste("Organism type not supported", organism)) +} + +cols <- unlist(strsplit(output_cols, ",")) +result <- select(db, keys=ids, keytype=id_type, columns=cols) +write.table(result, file="/tmp/tmpY5XREO/files/000/dataset_4.dat", sep="\t", row.names=FALSE, quote=FALSE) + + \ No newline at end of file |