Question: Display data summary from R code in my galaxy tool
1
gravatar for Sara Mohammadi
2.0 years ago by
United States
Sara Mohammadi • 50 wrote:

I have created a galaxy tool, which get the gene expression data. I want to do some gene expression analysis on this data and display the summary of it. The output file data format which I saved is .tabular.

I do not know how to use this data in the same R code to do and display some statistics summary on it.

Thanks

ADD COMMENT • link • written 2.0 years ago by Sara Mohammadi • 50

Can you show us your code?

ADD REPLY • link written 2.0 years ago by Bjoern Gruening ♦ 5.1k

Thank you so much for your response,

Here is xml wrapper:

 <tool id="get_data" name="Get Study version="0.1.0">
    <description>Get a specific study</description>
     <command detect_errors="exit_code" interpreter="Rscript --vanilla">
        getData.R ${studyid} ${output}
      </command>
      <inputs>
        <param name="studyid" type="select" label="Study ID">
          <option value="SDY269">SDY269</option>
          <option value="SDY270">SDY270</option>
        </param>
      </inputs>
      <outputs>
        <data name="output" format="tabular" label="${studyid}" />
      </outputs>
      <help>
    Obtain a study expression matrix.
      </help>
    </tool>

and R code:

    library(methods)
library(ImmuneSpaceR)
library(Biobase)
library(dplyr)
args = commandArgs(trailingOnly=TRUE)
study.id <- args[1]
out.file <- args[2]
printstudy.id)
print(out.file)
sdy <- CreateConnection(study=study.id)
exprEset <- sdy$getGEMatrix(c("TIV_2008"))
expr <- exprs(exprEset)
print(dim(expr))
probes <- rownames(expr)
saveExpr <- cbind(probes, expr)
colnames(saveExpr) <- c("ProbeID", colnames(expr))
write.table(saveExpr, file=out.file, sep="\t", quote=FALSE, 
              row.names=FALSE, col.names=TRUE) 
    cat("\nSuccess\n")

I want to display the some other information like: dim(), column names, number of samples and other information in the same page as text after getting the data.

Thanks again,

ADD REPLY • link modified 2.0 years ago • written 2.0 years ago by Sara Mohammadi • 50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 169 users visited in the last hour