Mercurial > repos > melpetera > idchoice
changeset 1:bb19b1d15732 draft default tip
Uploaded
author | melpetera |
---|---|
date | Thu, 19 Dec 2019 05:29:57 -0500 |
parents | b7a6a88f518a |
children | |
files | IDchoice/.gitmodules IDchoice/IDchoice.xml IDchoice/IDchoice_script.R IDchoice/IDchoice_wrap.R IDchoice/README.md |
diffstat | 5 files changed, 43 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IDchoice/.gitmodules Thu Dec 19 05:29:57 2019 -0500 @@ -0,0 +1,3 @@ +[submodule "easyrlibrary-lib"] + path = easyrlibrary-lib + url = https://github.com/workflow4metabolomics/easyrlibrary-lib.git
--- a/IDchoice/IDchoice.xml Thu Oct 11 05:47:29 2018 -0400 +++ b/IDchoice/IDchoice.xml Thu Dec 19 05:29:57 2019 -0500 @@ -1,4 +1,4 @@ -<tool id="idchoice" name="ID choice" version="18.01"> +<tool id="idchoice" name="ID choice" version="19.12"> <description>Choosing a particular column in your metadata to be considered as Identifiers</description> <requirements> <requirement type="package" version="1.1_4">r-batch</requirement> @@ -106,9 +106,9 @@ | It should include a column containing your wanted IDs. | ----------- -Parameter ----------- +----------- +Parameters +----------- Which ID do you want to change? | This must be consistant with the metadata file you chose as input @@ -124,9 +124,9 @@ | ------------- -Output file ------------- +------------- +Output files +------------- ID_metadata | tabular output
--- a/IDchoice/IDchoice_script.R Thu Oct 11 05:47:29 2018 -0400 +++ b/IDchoice/IDchoice_script.R Thu Dec 19 05:29:57 2019 -0500 @@ -4,6 +4,7 @@ # User: Galaxy # # Starting date: 01-06-2017 # # V-0.1: First version of code # +# V-1.0: Code adjusted to user feedback # # # # # # Input files: dataMatrix ; Metadata file # @@ -46,6 +47,10 @@ table.check <- match2(DM,meta,metype) check.err(table.check) +# Keep metadata original order tracked ---------------------------------------- + +meta <- data.frame(meta,ori=1:nrow(meta)) + # Checking unicity of new IDs ---------------------------------------- @@ -67,11 +72,11 @@ }else{ #Making unique names - meta <- cbind(meta,newID=make.unique(meta[,numcol],sep="_"),ori=c(1:nrow(meta))) + meta <- cbind(meta,newID=make.unique(meta[,numcol],sep="_")) } }else{ #No unicity problem - meta <- cbind(meta,newID=meta[,numcol],ori=c(1:nrow(meta))) + meta <- cbind(meta,newID=meta[,numcol]) } @@ -92,12 +97,12 @@ # Changing IDs ------------------------------------------------------- -DM <- comb.data[,-c(1:(ncol(meta)-2),ncol(meta))] +DM <- comb.data[,-c(1:(ncol(meta)-1))] if(makeun=="no"){ comb.data <- comb.data[,c(numcol,which(colnames(meta)!=coloname))] meta <- comb.data[,c(1:(ncol(meta)-2))] }else{ - meta <- comb.data[,c(ncol(meta)-1,1:(ncol(meta)-2))] + meta <- comb.data[,c(ncol(meta),1:(ncol(meta)-2))] } #Transposing back the dataMatrix if necessary
--- a/IDchoice/IDchoice_wrap.R Thu Oct 11 05:47:29 2018 -0400 +++ b/IDchoice/IDchoice_wrap.R Thu Dec 19 05:29:57 2019 -0500 @@ -7,7 +7,8 @@ # User: Galaxy # # Original data: used with IDchoice_script.R # # Starting date: 01-06-2017 # -# V-1: Firt version of wrapper # +# V-1: First version of wrapper # +# V-2: Additional information in stdout # # # # # # Input files: dataMatrix ; Metadata file # @@ -31,8 +32,22 @@ if(length(args) < 7){ stop("NOT enough argument !!!") } +cat('\nJob starting time:\n',format(Sys.time(), "%a %d %b %Y %X"), +'\n\n--------------------------------------------------------------------', +'\nParameters used in "ID choice":\n\n') +print(args) +cat('--------------------------------------------------------------------\n\n') + + id.choice(args$dataMatrix_in, args$Metadata_in, args$metatype, args$col_name, args$makeunique, args$DM_out, args$meta_out) +cat('\n--------------------------------------------------------------------', +'\nInformation about R (version, Operating System, attached or loaded packages):\n\n') +sessionInfo() +cat('--------------------------------------------------------------------\n', +'\nJob ending time:\n',format(Sys.time(), "%a %d %b %Y %X")) + + #delete the parameters to avoid the passage to the next tool in .RData image rm(args)
--- a/IDchoice/README.md Thu Oct 11 05:47:29 2018 -0400 +++ b/IDchoice/README.md Thu Dec 19 05:29:57 2019 -0500 @@ -5,7 +5,7 @@ ----------- * **@name**: ID choice - * **@version**: 17.11 + * **@version**: 19.12 * **@authors**: Melanie Petera - PFEM ; INRA ; MetaboHUB * **@init date**: 2017/06/07 * **@main usage**: This tool is designed to make you choose a particular column in your metadata file to be considered as identifiers for your W4M-3-tables-format data. @@ -14,7 +14,7 @@ Context ----------- -This tool is one of the [Workflow4Metabolomics](http://workflow4metabolomics.org) Galaxy instance utilities. W4M is a French infrastructure providing software tools to process, analyse and annotate metabolomics data. +This tool is provided as one of the [Workflow4Metabolomics](http://workflow4metabolomics.org) Galaxy instance utilities. W4M is a French infrastructure providing software tools to process, analyse and annotate metabolomics data. User interface is based on the Galaxy platform (homepage: https://galaxyproject.org/). It is an open, web-based platform for data intensive biomedical research. Whether on the free public server or your own instance, you can perform, reproduce, and share complete analyses. @@ -28,7 +28,6 @@ * Submodule: [easyRlibrary](https://github.com/workflow4metabolomics/easyrlibrary-lib) (Required for internal input quality checks) ### Deploy: - * [get project data](https://github.com/workflow4metabolomics/idchoice) * How to get the submodule files: When pulling this module's Git repository, you may only obtain an empty folder for the needed submodule. You can initialise it then with the following command: @@ -37,13 +36,6 @@ ``` -Travis test ------------ - -[![Build Status](https://travis-ci.org/workflow4metabolomics/idchoice.svg?branch=master)](https://travis-ci.org/workflow4metabolomics/idchoice) -Test and Deploy with Confidence. Easily sync your GitHub projects with Travis CI and you'll be testing your code in minutes! - - Technical description ----------- @@ -58,3 +50,9 @@ ----------- * Help and support: support@workflow4metabolomics.org + + +License +----------- + + * Cea Cnrs Inria Logiciel Libre License, version 2.1 (CECILL-2.1)