# HG changeset patch # User Jan Kanis # Date 1404143516 -7200 # Node ID e780606b7c253702a75ca4bd670b99bbc888db3d # Parent 8b3c5d334a84b4d2c12ff6a9d63931dea75d4265 test new command line parameters, fix small bug diff -r 8b3c5d334a84 -r e780606b7c25 blast2html.py --- a/blast2html.py Mon Jun 30 17:31:26 2014 +0200 +++ b/blast2html.py Mon Jun 30 17:51:56 2014 +0200 @@ -386,7 +386,7 @@ for l in f.readlines(): if l.strip().startswith('#'): continue - line = l.split('\t') + line = l.rstrip('\n').split('\t') try: links[line[2]] = line[3] except IndexError: diff -r 8b3c5d334a84 -r e780606b7c25 test-data/blast xml example3.html --- a/test-data/blast xml example3.html Mon Jun 30 17:31:26 2014 +0200 +++ b/test-data/blast xml example3.html Mon Jun 30 17:51:56 2014 +0200 @@ -794,7 +794,7 @@ 100% 7.011e-08 100% - Subject_3 + Subject_3 @@ -811,13 +811,13 @@
- Gene Bank + Gene Bank

DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000

- Sequence ID: Subject_3 + Sequence ID: Subject_3 Length: 323 Number of Matches: 1

@@ -1030,7 +1030,7 @@ 100% 7.011e-08 100% - Subject_6 + Subject_6 @@ -1047,13 +1047,13 @@

AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000

- Sequence ID: Subject_6 + Sequence ID: Subject_6 Length: 2457 Number of Matches: 1

@@ -1502,7 +1502,7 @@ 85% 2.981e-06 100% - Subject_2 + Subject_2 @@ -1519,13 +1519,13 @@

AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3'UTR/plant_junction_region.|-9105899556052450000

- Sequence ID: Subject_2 + Sequence ID: Subject_2 Length: 1045 Number of Matches: 1

@@ -1686,7 +1686,7 @@ 100% 7.011e-08 100% - Subject_3 + Subject_3 @@ -1703,13 +1703,13 @@

DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000

- Sequence ID: Subject_3 + Sequence ID: Subject_3 Length: 323 Number of Matches: 1

@@ -1922,7 +1922,7 @@ 100% 7.011e-08 100% - Subject_6 + Subject_6 @@ -1939,13 +1939,13 @@

AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000

- Sequence ID: Subject_6 + Sequence ID: Subject_6 Length: 2457 Number of Matches: 1

@@ -2727,7 +2727,7 @@ 100% 9.338e-08 92% - Subject_7 + Subject_7 @@ -2744,13 +2744,13 @@

AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000

- Sequence ID: Subject_7 + Sequence ID: Subject_7 Length: 4180 Number of Matches: 1

@@ -2908,7 +2908,7 @@ 100% 9.338e-08 92% - Subject_8 + Subject_8 @@ -2925,13 +2925,13 @@

EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000

- Sequence ID: Subject_8 + Sequence ID: Subject_8 Length: 4983 Number of Matches: 1

@@ -3249,7 +3249,7 @@ 100% 6.629e-23 86% - Subject_7 + Subject_7 @@ -3266,13 +3266,13 @@

AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000

- Sequence ID: Subject_7 + Sequence ID: Subject_7 Length: 4180 Number of Matches: 1

@@ -3437,7 +3437,7 @@ 100% 6.629e-23 86% - Subject_8 + Subject_8 @@ -3454,13 +3454,13 @@

EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000

- Sequence ID: Subject_8 + Sequence ID: Subject_8 Length: 4983 Number of Matches: 1

diff -r 8b3c5d334a84 -r e780606b7c25 test-data/blast xml example4.html --- a/test-data/blast xml example4.html Mon Jun 30 17:31:26 2014 +0200 +++ b/test-data/blast xml example4.html Mon Jun 30 17:51:56 2014 +0200 @@ -557,7 +557,7 @@ 100% 1.513e-07 100% - 5 + 5
100% 1.513e-07 100% - 2 + 2 @@ -587,13 +587,13 @@

AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000

- Sequence ID: gnl|BL_ORD_ID|5 + Sequence ID: gnl|BL_ORD_ID|5 Length: 2457 Number of Matches: 1

@@ -629,13 +629,13 @@

DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000

- Sequence ID: gnl|BL_ORD_ID|2 + Sequence ID: gnl|BL_ORD_ID|2 Length: 323 Number of Matches: 1

@@ -846,7 +846,7 @@ 100% 1.513e-07 100% - 5 + 5
100% 1.513e-07 100% - 2 + 2
85% 9.334e-06 100% - 1 + 1 @@ -889,13 +889,13 @@

AB209952.1|GenBank|insert_GTS-40-3-2|Glycine_max_transgenic_cp4epsps_gene_for_5-enol-pyruvylshikimate-3-phospate_synthase_class_2_precursor,_complete_cds|-9105899556052450000

- Sequence ID: gnl|BL_ORD_ID|5 + Sequence ID: gnl|BL_ORD_ID|5 Length: 2457 Number of Matches: 1

@@ -931,13 +931,13 @@

DJ437711|GenBank|insert_MIR604|Corn_Event_MIR604,_Left_Border_region|-5751164067366620000

- Sequence ID: gnl|BL_ORD_ID|2 + Sequence ID: gnl|BL_ORD_ID|2 Length: 323 Number of Matches: 1

@@ -973,13 +973,13 @@

AJ308515.1|GenBank|insert_GTS-40-3-2|Synthetic_construct_for_NOS_3'UTR/plant_junction_region.|-9105899556052450000

- Sequence ID: gnl|BL_ORD_ID|1 + Sequence ID: gnl|BL_ORD_ID|1 Length: 1045 Number of Matches: 1

@@ -1204,7 +1204,7 @@ 88% 3.148e-06 95% - 7 + 7
88% 3.148e-06 95% - 6 + 6 @@ -1234,13 +1234,13 @@

EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000

- Sequence ID: gnl|BL_ORD_ID|7 + Sequence ID: gnl|BL_ORD_ID|7 Length: 4983 Number of Matches: 1

@@ -1276,13 +1276,13 @@

AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000

- Sequence ID: gnl|BL_ORD_ID|6 + Sequence ID: gnl|BL_ORD_ID|6 Length: 4180 Number of Matches: 1

@@ -1455,7 +1455,7 @@ 100% 3.564e-15 86% - 7 + 7
100% 3.564e-15 86% - 6 + 6 @@ -1485,13 +1485,13 @@

EUG|RIKILT|plasmid_pV-ZMBK07|plasmid_pV-ZMBK07|-2635190737607180000

- Sequence ID: gnl|BL_ORD_ID|7 + Sequence ID: gnl|BL_ORD_ID|7 Length: 4983 Number of Matches: 1

@@ -1530,13 +1530,13 @@

AY326434|GenBank|insert_MON810|Synthetic_construct_truncated_CRYIA(b)_(cryIA(b))_gene,_partial_CDS|-2635190737607180000

- Sequence ID: gnl|BL_ORD_ID|6 + Sequence ID: gnl|BL_ORD_ID|6 Length: 4180 Number of Matches: 1

diff -r 8b3c5d334a84 -r e780606b7c25 test-data/blastdb.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/blastdb.loc Mon Jun 30 17:51:56 2014 +0200 @@ -0,0 +1,39 @@ +#This is a sample file distributed with Galaxy that is used to define a +#list of nucleotide BLAST databases, using three columns tab separated +#(longer whitespace are TAB characters): +# +# +# +#The captions typically contain spaces and might end with the build date. +#It is important that the actual database name does not have a space in +#it, and that there are only two tabs on each line. +# +#So, for example, if your database is nt and the path to your base name +#is /depot/data2/galaxy/blastdb/nt/nt.chunk, then the blastdb.loc entry +#would look like this: +# +#nt_02_Dec_2009 nt 02 Dec 2009 /depot/data2/galaxy/blastdb/nt/nt.chunk +# +#and your /depot/data2/galaxy/blastdb/nt directory would contain all of +#your "base names" (e.g.): +# +#-rw-r--r-- 1 wychung galaxy 23437408 2008-04-09 11:26 nt.chunk.00.nhr +#-rw-r--r-- 1 wychung galaxy 3689920 2008-04-09 11:26 nt.chunk.00.nin +#-rw-r--r-- 1 wychung galaxy 251215198 2008-04-09 11:26 nt.chunk.00.nsq +#...etc... +# +#Your blastdb.loc file should include an entry per line for each "base name" +#you have stored. For example: +# +#nt_02_Dec_2009 nt 02 Dec 2009 /depot/data2/galaxy/blastdb/nt/nt.chunk +#wgs_30_Nov_2009 wgs 30 Nov 2009 /depot/data2/galaxy/blastdb/wgs/wgs.chunk +#test_20_Sep_2008 test 20 Sep 2008 /depot/data2/galaxy/blastdb/test/test +#...etc... +# +#You can download the NCBI provided protein databases like NT from here: +#ftp://ftp.ncbi.nlm.nih.gov/blast/db/ +# +#See also blastdb_p.loc which is for any protein BLAST database, and +#blastdb_d.loc which is for any protein domains databases (like CDD). + +EUginius_plasmid Euginius plasmid insert /opt/galaxy/blastdbs/EUginius_plasmid_insert http://example.com/example-genebank/{defline[0]}/ diff -r 8b3c5d334a84 -r e780606b7c25 test-data/refresh_test_results.sh --- a/test-data/refresh_test_results.sh Mon Jun 30 17:31:26 2014 +0200 +++ b/test-data/refresh_test_results.sh Mon Jun 30 17:51:56 2014 +0200 @@ -4,7 +4,8 @@ set -eu -for i in 1 2 3 4 -do - "$@" ../blast2html.py -i "blast xml example$i.xml" -o "blast xml example$i.html" -done +"$@" ../blast2html.py -i "blast xml example1.xml" -o "blast xml example1.html" +"$@" ../blast2html.py -i "blast xml example2.xml" -o "blast xml example2.html" +"$@" ../blast2html.py -i "blast xml example3.xml" -o "blast xml example3.html" --genelink-template 'http://example.com/example-genebank?id={fullid}' +"$@" ../blast2html.py -i "blast xml example4.xml" -o "blast xml example4.html" --db-config-dir . +