# HG changeset patch # User proteore # Date 1551962958 18000 # Node ID 1e45ea50f14575f4b1db005513beb3b91ee7ca47 # Parent b6607b7e683f7fecc298fdb52e00363d3160c317 planemo upload commit 640429adac783e2354f5caf12d7b6b81b8ddf54f-dirty diff -r b6607b7e683f -r 1e45ea50f145 id_converter.py --- a/id_converter.py Mon Jan 28 11:08:47 2019 -0500 +++ b/id_converter.py Thu Mar 07 07:49:18 2019 -0500 @@ -44,6 +44,7 @@ for line in input_file : if line != [] and set(line) != {''}: line[nb_col] = re.sub(r"\s+","",line[nb_col]) + if line[nb_col] == "" : line[nb_col]='NA' if ";" in line[nb_col] : ids = line[nb_col].split(";") for id in ids : @@ -119,6 +120,7 @@ if args.input_type=="file" : args.column_number = nb_col_to_int(args.column_number) header = str2bool(args.header) + #Get ref file to build dictionary csv.field_size_limit(sys.maxsize) # to handle big files @@ -151,7 +153,7 @@ if args.input_type == "list" : ids = get_input_ids_from_string(args.input) elif args.input_type == "file" : - input_file, ids = get_input_ids_from_file(args.input,args.column_number,args.header) + input_file, ids = get_input_ids_from_file(args.input,args.column_number,header) #Mapping ids result_dict = map_to_dictionary(ids,ids_dictionary,args.id_type,target_ids) diff -r b6607b7e683f -r 1e45ea50f145 id_converter.xml --- a/id_converter.xml Mon Jan 28 11:08:47 2019 -0500 +++ b/id_converter.xml Thu Mar 07 07:49:18 2019 -0500 @@ -1,4 +1,4 @@ - + (Human, Mouse, Rat) @@ -20,8 +20,11 @@ #end if --target_ids="$species.idto.idtypeout" --output="$output" - --ref_file="$__tool_directory__/${ filter( lambda x: str( x[2] ) == str( $species.mapping_file ), $__app__.tool_data_tables['proteore_id_mapping'].get_fields() )[0][-1] }" - + #if "id_mapping" in str($species.mapping_file).split("/") + --ref_file="$species.mapping_file" + #else + --ref_file="$__tool_directory__/$species.mapping_file" + #end if ]]> @@ -48,17 +51,21 @@ - + + [c]{0,1}[0-9]+ + - - - - - + + + + + + + @@ -101,6 +108,9 @@ + + + @@ -140,6 +150,9 @@ + + + diff -r b6607b7e683f -r 1e45ea50f145 proteore_id_mapping_Human.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/proteore_id_mapping_Human.loc.sample Thu Mar 07 07:49:18 2019 -0500 @@ -0,0 +1,3 @@ +#This file lists the locations of reference file for id_converter tool +# +human_id_mapping_23-10-2018 Human (homo sapiens 23/10/2018) Human tool-data/human_id_mapping_23-10-2018.tsv diff -r b6607b7e683f -r 1e45ea50f145 proteore_id_mapping_Mouse.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/proteore_id_mapping_Mouse.loc.sample Thu Mar 07 07:49:18 2019 -0500 @@ -0,0 +1,3 @@ +#This file lists the locations of reference file for id_converter tool +# +mouse_id_mapping_23-10-2018 Mouse (Mus musculus 23/10/2018) Mouse tool-data/mouse_id_mapping_23-10-2018.tsv diff -r b6607b7e683f -r 1e45ea50f145 proteore_id_mapping_Rat.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/proteore_id_mapping_Rat.loc.sample Thu Mar 07 07:49:18 2019 -0500 @@ -0,0 +1,3 @@ +#This file lists the locations of reference file for id_converter tool +# +rat_id_mapping_23-10-2018 Rat (Rattus norvegicus 23/10/2018) Rat tool-data/rat_id_mapping_23-10-2018.tsv diff -r b6607b7e683f -r 1e45ea50f145 tool-data/proteore_id_mapping.loc.sample --- a/tool-data/proteore_id_mapping.loc.sample Mon Jan 28 11:08:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -#This file lists the locations of reference file for id_converter tool -# -human_id_mapping_23-10-2018 Human (homo sapiens) Human tool-data/human_id_mapping_23-10-2018.tsv -mouse_id_mapping_23-10-2018 Mouse (Mus musculus) Mouse tool-data/mouse_id_mapping_23-10-2018.tsv -rat_id_mapping_23-10-2018 Rat (Rattus norvegicus) Rat tool-data/rat_id_mapping_23-10-2018.tsv diff -r b6607b7e683f -r 1e45ea50f145 tool_data_table_conf.xml.sample --- a/tool_data_table_conf.xml.sample Mon Jan 28 11:08:47 2019 -0500 +++ b/tool_data_table_conf.xml.sample Thu Mar 07 07:49:18 2019 -0500 @@ -1,7 +1,15 @@ - - id, name, value, path - +
+ id, name, species, value + +
+ + id, name, species, value + +
+ + id, name, species, value +
\ No newline at end of file