comparison gprofiler_snpense.xml @ 0:f83a08dff6f0 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gprofiler/ commit ed9b518a6aaf6a5aada47e39c039f6936e41b290"
author iuc
date Thu, 14 Nov 2019 06:01:29 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f83a08dff6f0
1 <?xml version="1.0"?>
2 <tool id="gprofiler_snpense" name="gProfiler SNPense" version="@VERSION@">
3 <description>maps SNP rs-codes to gene names, chromosomal coordinates and variant effects</description>
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="requirements"></expand>
8 <expand macro="version_command" />
9 <command detect_errors="aggressive">Rscript $script_file</command>
10 <configfiles>
11 <configfile name="script_file"><![CDATA[
12
13 options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
14 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
15
16 suppressPackageStartupMessages({
17 library("gprofiler2")
18 })
19
20 set_user_agent(paste(get_user_agent(), "galaxy"))
21 sessionInfo()
22
23 #if $tool_settings.base_url
24 set_base_url('${tool_settings.base_url}')
25 #end if
26
27 query <- scan('${input.file_name}', character(), quote = "")
28
29 response <- gsnpense( query
30 , filter_na = ${filter_na}
31 )
32
33 output <- response
34 output[['ensgs']] <- vapply(output[['ensgs']], paste, collapse = ",", character(1L))
35 output[['gene_names']] <- vapply(output[['gene_names']], paste, collapse = ",", character(1L))
36
37 output.colnames = append(colnames(output)[1:(length(colnames(output))-1)], colnames(output[['variants']]))
38 write.table(output, file='${output}', quote=FALSE, sep='\t', row.names = FALSE, col.names = output.colnames)
39
40 ]]></configfile>
41 </configfiles>
42 <inputs>
43 <param name="input" type="data" format="txt" label="Input is whitespace-separated list of SNP IDs to be translated (should start with prefix ’rs’)." />
44 <expand macro="filter_na" />
45 <expand macro="tool_settings"></expand>
46 </inputs>
47 <outputs>
48 <data name="output" format="tabular" label="${tool.name} on ${on_string}" />
49 </outputs>
50 <tests>
51 <test>
52 <param name="input" ftype="txt" value="example_snpense_query.txt" />
53 <param name="base_url" value="http://biit.cs.ut.ee/gprofiler_archive3/e94_eg41_p11" />
54 <output name="output" ftype="tabular" file="example_snpense_results.txt" sort="true" />
55 </test>
56 <test>
57 <param name="input" ftype="txt" value="example_snpense_query.txt" />
58 <param name="base_url" value="http://biit.cs.ut.ee/gprofiler_archive3/e94_eg41_p11" />
59 <param name="filter_na" value="T" />
60 <output name="output" ftype="tabular" file="example_snpense_results_2.txt" sort="true" />
61 </test>
62 </tests>
63
64 <help><![CDATA[
65
66 **What it does**
67 This tool wraps gprofiler2 R package which performs a request to g:Profiler g:SNPense tool through its API.
68 g:Profiler g:SNPense maps SNP rs identifiers to chromosome positions, genes and variant effects. Available only
69 for human SNPs.
70
71 -----
72
73 @REFERENCES@
74
75 ]]></help>
76 <expand macro="citations"></expand>
77 </tool>