From b089e836608dfeefe89969ddcd7fe60bd47ef7e2 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sat, 26 Jul 2014 20:35:09 +0200 Subject: [PATCH] table --- sparql/extra/gwp/blast2.rq | 2 +- sparql/extra/gwp/gen_table.sh | 2 +- sparql/extra/gwp/gen_table2.rb | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sparql/extra/gwp/blast2.rq b/sparql/extra/gwp/blast2.rq index 6ecc8b4..4a9b2fb 100644 --- a/sparql/extra/gwp/blast2.rq +++ b/sparql/extra/gwp/blast2.rq @@ -28,7 +28,7 @@ <% end %> { -# :Mi_CDS_cluster00100_NP_001022867 :cluster :Mi_CDS_cluster00100 . +# :Mi_CDS_cluster00100_NP_001022867 gwp:cluster :Mi_CDS_cluster00100 . # :Mi_CDS_cluster00100_NP_001022867 a :blast_match . # :Mi_CDS_cluster00100_NP_001022867 rdf:label "Mi_CDS_cluster00100_NP_001022867" . # :Mi_CDS_cluster00100_NP_001022867 :homolog_species "Ce" . diff --git a/sparql/extra/gwp/gen_table.sh b/sparql/extra/gwp/gen_table.sh index dd9494c..f3b9733 100755 --- a/sparql/extra/gwp/gen_table.sh +++ b/sparql/extra/gwp/gen_table.sh @@ -14,4 +14,4 @@ for species in Bm Bx Ce Cb Gp Mi Mh Pi Pp Sr Ts ; do ./gen_table2.rb species=$species source=$source |egrep ^cat >> $fn done done -bio-table --merge tmp/* > table2.tsv +bio-table --merge tmp/*.tsv > table2.tsv diff --git a/sparql/extra/gwp/gen_table2.rb b/sparql/extra/gwp/gen_table2.rb index 35db21e..a171f8b 100755 --- a/sparql/extra/gwp/gen_table2.rb +++ b/sparql/extra/gwp/gen_table2.rb @@ -52,7 +52,7 @@ # Note that catH overlaps with catA and that catH is larger than all PSC(!) catH = csv_parse.call("env HASH=\"by_cluster=1,species=#{species},source1=#{TYPE}\" ../../../scripts/sparql-csv.sh blast2.rq").drop(1).flatten # ==== catH -assert(catH.size == 29,"Expect 29 was #{catH.size}") if do_assert +assert(catH.size == 36,"Expect 36 was #{catH.size}") if do_assert # ---- 2b. Annotate plantP only (&) # catH contains all ann PSC. So we can select those that @@ -123,7 +123,7 @@ minc_cluster_plantp = ann.keys.select { |k| ann[k].include?(:plant_pathogen) } p [:plantP, minc_cluster_plantp.size ] -assert(minc_cluster_plantp.size == 13) if do_assert +assert(minc_cluster_plantp.size == 9) if do_assert # ---- 2c and 2d. Annotated in ann! (&) @@ -140,16 +140,16 @@ # ==== we have catA orange and red! otherA = catA - plant_pathogenA p [:orange, otherA.size] -assert(otherA.size == 4,otherA.size.to_s) if do_assert +assert(otherA.size == 6,otherA.size.to_s) if do_assert # ---- Now we can have the unique PSC (catC green) (&) catC = all - catA - catH p [:unique_PSC, catC.size] -assert(catC.size == 14,"Was #{catC.size}") if do_assert +assert(catC.size == 7,"Was #{catC.size}") if do_assert assert(catA & catC == [],"There should be no overlap between catA and catC") catB = all - catA - catC -assert(catB.size == 21,catB.size) if do_assert +assert(catB.size == 28,catB.size) if do_assert # ---- Fetch conserved (catB) p '** all **********************'