# HG changeset patch
# User proteore
# Date 1521558829 14400
# Node ID fc0118aa432a704eb2569bdd211c5fe08ed2307b
# Parent 867d47ff782c6221e2565c7bf9293581e835f6bb
planemo upload commit 5221e042cb207f593b144ed857106235b8f5fbde-dirty
diff -r 867d47ff782c -r fc0118aa432a prot_features.xml
--- a/prot_features.xml Wed Mar 14 12:04:32 2018 -0400
+++ b/prot_features.xml Tue Mar 20 11:13:49 2018 -0400
@@ -49,7 +49,16 @@
-
+
+
+
+
+
+
+
+
+
+
diff -r 867d47ff782c -r fc0118aa432a protein_features.R
--- a/protein_features.R Wed Mar 14 12:04:32 2018 -0400
+++ b/protein_features.R Tue Mar 20 11:13:49 2018 -0400
@@ -2,16 +2,16 @@
readfile = function(filename, header) {
if (header == "true") {
# Read only first line of the file as header:
- headers <- read.table(filename, nrows = 1, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE)
+ headers <- read.table(filename, nrows = 1, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE, quote = "")
#Read the data of the files (skipping the first row)
- file <- read.table(filename, skip = 1, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE)
+ file <- read.table(filename, skip = 1, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE, quote = "")
# Remove empty rows
file <- file[!apply(is.na(file) | file == "", 1, all), , drop=FALSE]
#And assign the header to the data
names(file) <- headers
}
else {
- file <- read.table(filename, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE)
+ file <- read.table(filename, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE, quote = "")
# Remove empty rows
file <- file[!apply(is.na(file) | file == "", 1, all), , drop=FALSE]
}
@@ -49,7 +49,7 @@
inputtype = args$inputtype
if (inputtype == "copypaste") {
- input = strsplit(args$input, " ")[[1]]
+ input = strsplit(args$input, "[ \t\n]+")[[1]]
}
else if (inputtype == "tabfile") {
filename = args$input
@@ -90,7 +90,7 @@
# Select user input protein ids in nextprot
if ((length(input[input %in% nextprot[,1]]))==0){
- write.table("None of the input ids are can be found in Nextprot",file=filename,sep="\t",quote=FALSE,col.names=TRUE,row.names=FALSE)
+ write.table("None of the input ids are can be found in Nextprot",file=output,sep="\t",quote=FALSE,col.names=TRUE,row.names=FALSE)
} else {
names = c()
res = matrix(nrow=length(input), ncol=0)
@@ -117,6 +117,7 @@
res = cbind(res, info)
}
}
+ --inputtype="tabfile" --input="Galaxy50-[ID_Converter_on_data_47].tabular" --header='true' --natlas="proteinatlas.csv" --column='c7' --select='Gene,Gene.description,Evidence,RNA.tissue.category,Reliability.IH,TPM.max.in.non.specific' --output="test.txt"
# Write output
if (inputtype == "copypaste") {