Mercurial > repos > proteore > proteore_id_converter
annotate id_converter_UniProt.R @ 14:659f1248f535 draft
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
author | proteore |
---|---|
date | Wed, 19 Sep 2018 04:45:04 -0400 |
parents | 0584344186eb |
children |
rev | line source |
---|---|
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
1 # Read file and return file content as data.frame |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
2 readfile = function(filename, header) { |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
3 if (header == "true") { |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
4 # Read only first line of the file as header: |
4
134949593a3b
planemo upload commit 4af7ac25de19ca10b1654820e909c647a2d337b2-dirty
proteore
parents:
0
diff
changeset
|
5 headers <- read.table(filename, nrows = 1, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE, quote = "") |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
6 #Read the data of the files (skipping the first row) |
4
134949593a3b
planemo upload commit 4af7ac25de19ca10b1654820e909c647a2d337b2-dirty
proteore
parents:
0
diff
changeset
|
7 file <- read.table(filename, skip = 1, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE, quote = "") |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
8 # Remove empty rows |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
9 file <- file[!apply(is.na(file) | file == "", 1, all), , drop=FALSE] |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
10 #And assign the header to the data |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
11 names(file) <- headers |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
12 } |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
13 else { |
4
134949593a3b
planemo upload commit 4af7ac25de19ca10b1654820e909c647a2d337b2-dirty
proteore
parents:
0
diff
changeset
|
14 file <- read.table(filename, header = FALSE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings=c("", "NA"), blank.lines.skip = TRUE, quote = "") |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
15 # Remove empty rows |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
16 file <- file[!apply(is.na(file) | file == "", 1, all), , drop=FALSE] |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
17 } |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
18 return(file) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
19 } |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
20 |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
21 # Mapping IDs using file built from |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
22 # - HUMAN_9606_idmapping_selected.tab |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
23 # Tarball downloaded from ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/idmapping/by_organism/ |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
24 # - nextprot_ac_list_all.txt |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
25 # Downloaded from ftp://ftp.nextprot.org/pub/current_release/ac_lists/ |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
26 # Available databases: |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
27 # UNIPROT_AC: Uniprot accession number (e.g. P31946) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
28 # UNIPROT_ID: Uniprot identifiers (e.g 1433B_HUMAN) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
29 # GeneID_EntrezGene: Entrez gene ID (serie of digit) (e.g. 7529) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
30 # RefSeq: RefSeq (NCBI) protein (e.g. NP_003395.1; NP_647539.1; XP_016883528.1) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
31 # GI_number: GI (NCBI GI number) ID (serie of digits) assigned to each sequence record processed by NCBI (e.g; 21328448; 377656701; 67464627; 78101741) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
32 # PDB: Protein DataBank Identifiers (e.g. 2BR9:A; 3UAL:A; 3UBW:A) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
33 # GO_ID: GOterms (Gene Ontology) Identifiers (e.g. GO:0070062; GO:0005925; GO:0042470; GO:0016020; GO:0005739; GO:0005634) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
34 # PIR: Protein Information Resource ID (e.g. S34755) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
35 # OMIM: OMIM (Online Mendelian Inheritance in Man database) ID (serie of digits) (e.g: 601289) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
36 # UniGene: Unigene Identifier (e.g. Hs.643544) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
37 # Ensembl_ENSG: Ensembl gene identifiers (e.g. ENSG00000166913) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
38 # Ensembl_ENST: Ensembl transcript identifiers (e.g. ENST00000353703; ENST00000372839) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
39 # Ensembl_ENSP: Ensembl protein identifiers (e.g. ENSP00000300161; ENSP00000361930) |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
40 |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
41 mapping = function() { |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
42 args <- commandArgs(TRUE) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
43 if(length(args)<1) { |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
44 args <- c("--help") |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
45 } |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
46 |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
47 # Help section |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
48 if("--help" %in% args) { |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
49 cat("Selection and Annotation HPA |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
50 Arguments: |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
51 --ref_file: path to reference file (id_mapping_file.txt) |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
52 --input_type: type of input (list of id or filename) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
53 --id_type: type of input IDs |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
54 --input: list of IDs (text or filename) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
55 --column_number: the column number which contains list of input IDs |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
56 --header: true/false if your file contains a header |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
57 --target_ids: target IDs to map to |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
58 --output: output filename \n") |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
59 q(save="no") |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
60 } |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
61 |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
62 # Parse arguments |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
63 parseArgs <- function(x) strsplit(sub("^--", "", x), "=") |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
64 argsDF <- as.data.frame(do.call("rbind", parseArgs(args))) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
65 args <- as.list(as.character(argsDF$V2)) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
66 names(args) <- argsDF$V1 |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
67 |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
68 input_id_type = args$id_type # Uniprot, ENSG.... |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
69 list_id_input_type = args$input_type # list or file |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
70 options = strsplit(args$target_ids, ",")[[1]] |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
71 output = args$output |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
72 id_mapping_file = args$ref_file |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
73 |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
74 # Extract input IDs |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
75 if (list_id_input_type == "list") { |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
76 print(args$input) |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
77 list_id = trimws(strsplit(args$input, ",")[[1]]) |
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
78 list_id = list_id[list_id != ""] #remove empty entry |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
79 # Remove isoform accession number (e.g. "-2") |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
80 list_id = gsub("-.+", "", list_id) |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
81 } else if (list_id_input_type == "file") { |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
82 filename = args$input |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
83 column_number = as.numeric(gsub("c", "" ,args$column_number)) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
84 header = args$header |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
85 file_all = readfile(filename, header) |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
86 list_id = trimws(gsub("[$,\xc2\xa0]","",sapply(strsplit(file_all[,column_number], ";"), "[", 1))) |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
87 # Remove isoform accession number (e.g. "-2") |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
88 list_id = gsub("-.+", "", list_id) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
89 } |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
90 |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
91 # Extract ID maps |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
92 id_map = read.table(id_mapping_file, header = TRUE, sep = "\t", stringsAsFactors = FALSE, fill = TRUE, na.strings = "", quote = "") |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
93 |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
94 names = c() |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
95 |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
96 # Map IDs |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
97 res = matrix(nrow=length(list_id), ncol=0) |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
98 |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
99 for (opt in options) { |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
100 names = c(names, opt) |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
101 mapped = id_map[match(list_id, id_map[input_id_type][,]),][opt][,] |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
102 res = cbind(res, matrix(mapped)) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
103 } |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
104 |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
105 # Write output |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
106 if (list_id_input_type == "list") { |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
107 res = cbind(as.matrix(list_id), res) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
108 names = c(input_id_type, names) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
109 colnames(res) = names |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
110 write.table(res, output, row.names = FALSE, sep = "\t", quote = FALSE) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
111 } |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
112 else if (list_id_input_type == "file") { |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
113 names(res) = options |
14
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
114 if (all(names(file_all) == file_all[1,1:length(names(file_all))])){ #if header of file is the same as the first line of file |
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
115 names(file_all)[column_number] = input_id_type |
659f1248f535
planemo upload commit 688c456ca57914a63c20eba942ec5fe81e896099-dirty
proteore
parents:
5
diff
changeset
|
116 } |
5
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
117 names = c(names(file_all), names) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
118 output_content = cbind(file_all, res) |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
119 colnames(output_content) = names |
0584344186eb
planemo upload commit 6e27a0eaf8172154128960497271e8f54341acd7-dirty
proteore
parents:
4
diff
changeset
|
120 write.table(output_content, output, row.names = FALSE, sep = "\t", quote = FALSE) |
0
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
121 } |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
122 } |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
123 |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
124 mapping() |
f2d0b13d9615
planemo upload commit 5774fd6a5a746f36f6bf4671a51a39ea2b978300-dirty
proteore
parents:
diff
changeset
|
125 |
4
134949593a3b
planemo upload commit 4af7ac25de19ca10b1654820e909c647a2d337b2-dirty
proteore
parents:
0
diff
changeset
|
126 #Rscript id_converter_UniProt.R "UniProt.AC" "test-data/UnipIDs.txt,c1,false" "file" "Ensembl_PRO,Ensembl,neXtProt_ID" "test-data/output.txt" ../../utils/mapping_file.txt |