biointerchange 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/.rspec +1 -0
- data/.travis.yml +12 -0
- data/Gemfile +17 -0
- data/LICENSE.txt +8 -0
- data/README.md +166 -0
- data/Rakefile +50 -0
- data/VERSION +1 -0
- data/bin/biointerchange +6 -0
- data/docs/exceptions_readme.txt +13 -0
- data/examples/BovineGenomeChrX.gff3.gz +0 -0
- data/examples/gb-2007-8-3-R40.xml +243 -0
- data/examples/pubannotation.json +1 -0
- data/generators/rdfxml.rb +104 -0
- data/lib/biointerchange/core.rb +195 -0
- data/lib/biointerchange/exceptions.rb +38 -0
- data/lib/biointerchange/genomics/gff3_feature.rb +82 -0
- data/lib/biointerchange/genomics/gff3_feature_set.rb +37 -0
- data/lib/biointerchange/genomics/gff3_rdf_ntriples.rb +107 -0
- data/lib/biointerchange/genomics/gff3_reader.rb +86 -0
- data/lib/biointerchange/gff3.rb +135 -0
- data/lib/biointerchange/reader.rb +25 -0
- data/lib/biointerchange/registry.rb +29 -0
- data/lib/biointerchange/sio.rb +7124 -0
- data/lib/biointerchange/sofa.rb +1566 -0
- data/lib/biointerchange/textmining/content.rb +69 -0
- data/lib/biointerchange/textmining/document.rb +36 -0
- data/lib/biointerchange/textmining/pdfx_xml_reader.rb +161 -0
- data/lib/biointerchange/textmining/process.rb +57 -0
- data/lib/biointerchange/textmining/pubannos_json_reader.rb +72 -0
- data/lib/biointerchange/textmining/text_mining_rdf_ntriples.rb +197 -0
- data/lib/biointerchange/textmining/text_mining_reader.rb +41 -0
- data/lib/biointerchange/writer.rb +23 -0
- data/lib/biointerchange.rb +3 -0
- data/spec/exceptions_spec.rb +27 -0
- data/spec/gff3_rdfwriter_spec.rb +67 -0
- data/spec/text_mining_pdfx_xml_reader_spec.rb +89 -0
- data/spec/text_mining_pubannos_json_reader_spec.rb +71 -0
- data/spec/text_mining_rdfwriter_spec.rb +57 -0
- data/web/about.html +89 -0
- data/web/biointerchange.js +133 -0
- data/web/bootstrap/css/bootstrap-responsive.css +1040 -0
- data/web/bootstrap/css/bootstrap-responsive.min.css +9 -0
- data/web/bootstrap/css/bootstrap.css +5624 -0
- data/web/bootstrap/css/bootstrap.min.css +9 -0
- data/web/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/web/bootstrap/img/glyphicons-halflings.png +0 -0
- data/web/bootstrap/js/bootstrap.js +2027 -0
- data/web/bootstrap/js/bootstrap.min.js +6 -0
- data/web/bootstrap/js/jquery-1.8.1.min.js +2 -0
- data/web/css/rdoc-style.css +5786 -0
- data/web/css/rdoc.css +716 -0
- data/web/images/BioInterchange300.png +0 -0
- data/web/index.html +109 -0
- data/web/service/rdfizer.fcgi +68 -0
- data/web/webservices.html +123 -0
- metadata +240 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
require 'rspec'
|
3
|
+
|
4
|
+
load 'lib/biointerchange/core.rb'
|
5
|
+
load 'lib/biointerchange/gff3.rb'
|
6
|
+
load 'lib/biointerchange/sofa.rb'
|
7
|
+
load 'lib/biointerchange/reader.rb'
|
8
|
+
load 'lib/biointerchange/writer.rb'
|
9
|
+
load 'lib/biointerchange/genomics/gff3_rdf_ntriples.rb'
|
10
|
+
load 'lib/biointerchange/genomics/gff3_feature_set.rb'
|
11
|
+
load 'lib/biointerchange/genomics/gff3_feature.rb'
|
12
|
+
|
13
|
+
describe BioInterchange::Genomics::RDFWriter do
|
14
|
+
describe 'serialization of GFF3 models' do
|
15
|
+
it 'empty document' do
|
16
|
+
istream, ostream = IO.pipe
|
17
|
+
BioInterchange::Genomics::RDFWriter.new(ostream).serialize(BioInterchange::Genomics::GFF3FeatureSet.new())
|
18
|
+
ostream.close
|
19
|
+
istream.read.lines.count.should eq(1)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'model with three features' do
|
23
|
+
istream, ostream = IO.pipe
|
24
|
+
set = BioInterchange::Genomics::GFF3FeatureSet.new()
|
25
|
+
feature = BioInterchange::Genomics::GFF3Feature.new(
|
26
|
+
'GRCh37.1',
|
27
|
+
'NCBI',
|
28
|
+
BioInterchange::SOFA.CDS,
|
29
|
+
32890598,
|
30
|
+
32890664,
|
31
|
+
0.1,
|
32
|
+
BioInterchange::Genomics::GFF3Feature::POSITIVE,
|
33
|
+
nil,
|
34
|
+
{ 'ID' => [ 'BRCA2' ], 'annotation' => [ 'manual' ] }
|
35
|
+
)
|
36
|
+
set.add(feature)
|
37
|
+
feature = BioInterchange::Genomics::GFF3Feature.new(
|
38
|
+
'GRCh37.1',
|
39
|
+
'NCBI',
|
40
|
+
BioInterchange::SOFA.modified_base,
|
41
|
+
32890599,
|
42
|
+
32890599,
|
43
|
+
0.8,
|
44
|
+
BioInterchange::Genomics::GFF3Feature::POSITIVE,
|
45
|
+
nil,
|
46
|
+
{ 'ID' => [ 'aModifiedBase' ], 'Parent' => [ 'BRCA2' ] }
|
47
|
+
)
|
48
|
+
set.add(feature)
|
49
|
+
feature = BioInterchange::Genomics::GFF3Feature.new(
|
50
|
+
'GRCh37.1',
|
51
|
+
'NCBI',
|
52
|
+
BioInterchange::SOFA.modified_base,
|
53
|
+
32890599,
|
54
|
+
32890599,
|
55
|
+
0.8,
|
56
|
+
BioInterchange::Genomics::GFF3Feature::POSITIVE,
|
57
|
+
nil,
|
58
|
+
{ 'Parent' => [ 'BRCA2', 'aModifiedBase' ] }
|
59
|
+
)
|
60
|
+
set.add(feature)
|
61
|
+
BioInterchange::Genomics::RDFWriter.new(ostream).serialize(set)
|
62
|
+
ostream.close
|
63
|
+
istream.read.lines.count.should be == 43
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
|
2
|
+
require 'rspec'
|
3
|
+
|
4
|
+
load 'lib/biointerchange/core.rb'
|
5
|
+
load 'lib/biointerchange/reader.rb'
|
6
|
+
load 'lib/biointerchange/textmining/text_mining_reader.rb'
|
7
|
+
load 'lib/biointerchange/textmining/pdfx_xml_reader.rb'
|
8
|
+
load 'lib/biointerchange/textmining/document.rb'
|
9
|
+
load 'lib/biointerchange/textmining/content.rb'
|
10
|
+
load 'lib/biointerchange/textmining/process.rb'
|
11
|
+
|
12
|
+
describe BioInterchange::TextMining::PdfxXmlReader do
|
13
|
+
describe 'deserialization of pdfx text-mining documents' do
|
14
|
+
|
15
|
+
describe 'IO check' do
|
16
|
+
before :all do
|
17
|
+
@reader = BioInterchange::TextMining::PdfxXmlReader.new("Test", "http://test.com", "00-00-0000", BioInterchange::TextMining::Process::UNSPECIFIED, "0.0")
|
18
|
+
end
|
19
|
+
it 'read pdfx from string' do
|
20
|
+
model = @reader.deserialize("<pdfx><job>text</job></pdfx>")
|
21
|
+
|
22
|
+
model.should be_an_instance_of BioInterchange::TextMining::Document
|
23
|
+
end
|
24
|
+
it 'read pdfx from file' do
|
25
|
+
model = @reader.deserialize(File.new('examples/gb-2007-8-3-R40.xml'))
|
26
|
+
|
27
|
+
model.should be_an_instance_of BioInterchange::TextMining::Document
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe 'generated model check' do
|
32
|
+
|
33
|
+
before :all do
|
34
|
+
reader = BioInterchange::TextMining::PdfxXmlReader.new("Test", "http://test.com", "00-00-0000", BioInterchange::TextMining::Process::UNSPECIFIED, "0.0")
|
35
|
+
|
36
|
+
@model = reader.deserialize("<pdfx><job>rspec_test</job><article><article-title>TITLE</article-title><abstract>ABSTRACT</abstract><body>BODY TEXT<section>SECTION LEVEL 1<section>SECTION LEVEL 2.1</section><section>SECTION LEVEL 2.2</section>END SECTION LEVEL 1</section></body></article></pdfx>")
|
37
|
+
|
38
|
+
#puts "Document Model: #{@model.uri}"
|
39
|
+
# @model.contents.each do |c|
|
40
|
+
# puts "\tContent: #{c.type}, #{c.offset}, #{c.length}"
|
41
|
+
#end
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'model is of type document' do
|
45
|
+
@model.should be_an_instance_of BioInterchange::TextMining::Document
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'document uri (job id read)' do
|
49
|
+
@model.uri.should eql "http://pdfx.cs.man.ac.uk/rspec_test"
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'document has content' do
|
53
|
+
@model.contents.size.should eql 7
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'document document' do
|
57
|
+
@model.contents[6].type.should eql BioInterchange::TextMining::Content::DOCUMENT and @model.contents[6].offset.should eql 0 and @model.contents[6].length.should eql 90
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'document title' do
|
61
|
+
@model.contents[0].type.should eql BioInterchange::TextMining::Content::TITLE and @model.contents[0].offset.should eql 0 and @model.contents[0].length.should eql 5
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'document abstract' do
|
65
|
+
@model.contents[1].type.should eql BioInterchange::TextMining::Content::ABSTRACT and @model.contents[1].offset.should eql 5 and @model.contents[1].length.should eql 8
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'document body' do
|
69
|
+
@model.contents[5].type.should eql BioInterchange::TextMining::Content::SECTION and @model.contents[5].offset.should eql 13 and @model.contents[5].length.should eql 77
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'document sections' do
|
73
|
+
@model.contents[2].type.should eql BioInterchange::TextMining::Content::SECTION and
|
74
|
+
@model.contents[2].offset.should eql 37 and
|
75
|
+
@model.contents[2].length.should eql 17 and
|
76
|
+
|
77
|
+
@model.contents[3].type.should eql BioInterchange::TextMining::Content::SECTION and
|
78
|
+
@model.contents[3].offset.should eql 54 and
|
79
|
+
@model.contents[3].length.should eql 17 and
|
80
|
+
|
81
|
+
@model.contents[4].type.should eql BioInterchange::TextMining::Content::SECTION and @model.contents[4].offset.should eql 22 and @model.contents[4].length.should eql 68
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
|
2
|
+
require 'rspec'
|
3
|
+
|
4
|
+
load 'lib/biointerchange/core.rb'
|
5
|
+
load 'lib/biointerchange/reader.rb'
|
6
|
+
load 'lib/biointerchange/textmining/text_mining_reader.rb'
|
7
|
+
load 'lib/biointerchange/textmining/pubannos_json_reader.rb'
|
8
|
+
load 'lib/biointerchange/textmining/document.rb'
|
9
|
+
load 'lib/biointerchange/textmining/content.rb'
|
10
|
+
load 'lib/biointerchange/textmining/process.rb'
|
11
|
+
|
12
|
+
describe BioInterchange::TextMining::PubannosJsonReader do
|
13
|
+
describe 'deserialization of pubannos json text-mining documents' do
|
14
|
+
|
15
|
+
describe 'IO check' do
|
16
|
+
before :all do
|
17
|
+
@reader = BioInterchange::TextMining::PubannosJsonReader.new("Test", "http://test.com", "00-00-0000", BioInterchange::TextMining::Process::UNSPECIFIED, "0.0")
|
18
|
+
end
|
19
|
+
it 'read json from string' do
|
20
|
+
model = @reader.deserialize('{"docurl":"http://example.org/test","text":""}')
|
21
|
+
|
22
|
+
model.should be_an_instance_of BioInterchange::TextMining::Document
|
23
|
+
end
|
24
|
+
it 'read json from file' do
|
25
|
+
model = @reader.deserialize(File.new('examples/pubannotation.json'))
|
26
|
+
|
27
|
+
model.should be_an_instance_of BioInterchange::TextMining::Document
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe 'generated model check' do
|
32
|
+
|
33
|
+
before :all do
|
34
|
+
reader = BioInterchange::TextMining::PubannosJsonReader.new("Test", "http://test.com", "00-00-0000", BioInterchange::TextMining::Process::UNSPECIFIED, "0.0")
|
35
|
+
|
36
|
+
@model = reader.deserialize('{ "name": "Peter Smith", "name_id": "<peter.smith@example.json>", "date": "2012-08-12", "version": "3", "docurl":"http://example.org/example_json", "text":"Some document text. With two annotations of type protein.\n", "catanns":[{"annset_id":1,"begin":0,"category":"Protein","doc_id":9,"end":10,"id":139},{"annset_id":1,"begin":20,"category":"Protein","doc_id":9,"end":42,"id":138}]}')
|
37
|
+
|
38
|
+
#puts "Document Model: #{@model.uri}"
|
39
|
+
# @model.contents.each do |c|
|
40
|
+
# puts "\tContent: #{c.type}, #{c.offset}, #{c.length}"
|
41
|
+
#end
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'model is of type document' do
|
45
|
+
@model.should be_an_instance_of BioInterchange::TextMining::Document
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'document uri (job id read)' do
|
49
|
+
@model.uri.should eql "http://example.org/example_json"
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'document has content' do
|
53
|
+
@model.contents.size.should eql 3
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'document document' do
|
57
|
+
@model.contents[0].type.should eql BioInterchange::TextMining::Content::DOCUMENT and @model.contents[0].offset.should eql 0 and @model.contents[0].length.should eql 58
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'document phrase' do
|
61
|
+
@model.contents[1].type.should eql BioInterchange::TextMining::Content::PHRASE and @model.contents[1].offset.should eql 0 and @model.contents[1].length.should eql 10 and
|
62
|
+
|
63
|
+
@model.contents[2].type.should eql BioInterchange::TextMining::Content::PHRASE and @model.contents[2].offset.should eql 20 and @model.contents[2].length.should eql 22
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
|
2
|
+
require 'rspec'
|
3
|
+
|
4
|
+
load 'lib/biointerchange/core.rb'
|
5
|
+
load 'lib/biointerchange/sio.rb'
|
6
|
+
load 'lib/biointerchange/reader.rb'
|
7
|
+
load 'lib/biointerchange/writer.rb'
|
8
|
+
load 'lib/biointerchange/textmining/text_mining_rdf_ntriples.rb'
|
9
|
+
load 'lib/biointerchange/textmining/document.rb'
|
10
|
+
load 'lib/biointerchange/textmining/content.rb'
|
11
|
+
load 'lib/biointerchange/textmining/process.rb'
|
12
|
+
|
13
|
+
describe BioInterchange::TextMining::RDFWriter do
|
14
|
+
describe 'serialization of text-mining documents' do
|
15
|
+
it 'empty document' do
|
16
|
+
istream, ostream = IO.pipe
|
17
|
+
BioInterchange::TextMining::RDFWriter.new(ostream).serialize(BioInterchange::TextMining::Document.new('http://example.org'))
|
18
|
+
ostream.close
|
19
|
+
istream.read.lines.count.should eq(1)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'document with two entities' do
|
23
|
+
istream, ostream = IO.pipe
|
24
|
+
document = BioInterchange::TextMining::Document.new('http://example.org')
|
25
|
+
content = BioInterchange::TextMining::Content.new(
|
26
|
+
3,
|
27
|
+
11,
|
28
|
+
BioInterchange::TextMining::Content::PHRASE,
|
29
|
+
BioInterchange::TextMining::Process.new(
|
30
|
+
'Peter Smith',
|
31
|
+
'peter.smith@some.example.address.org',
|
32
|
+
BioInterchange::TextMining::Process::MANUAL
|
33
|
+
)
|
34
|
+
)
|
35
|
+
content.setContext(document)
|
36
|
+
document.add(content)
|
37
|
+
content = BioInterchange::TextMining::Content.new(
|
38
|
+
42,
|
39
|
+
9,
|
40
|
+
BioInterchange::TextMining::Content::PHRASE,
|
41
|
+
BioInterchange::TextMining::Process.new(
|
42
|
+
'GENIA',
|
43
|
+
'http://www.nactem.ac.uk/GENIA/tagger',
|
44
|
+
BioInterchange::TextMining::Process::SOFTWARE,
|
45
|
+
{},
|
46
|
+
'2012-09-28'
|
47
|
+
)
|
48
|
+
)
|
49
|
+
content.setContext(document)
|
50
|
+
document.add(content)
|
51
|
+
BioInterchange::TextMining::RDFWriter.new(ostream).serialize(document)
|
52
|
+
ostream.close
|
53
|
+
istream.read.lines.count.should be > 1
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
data/web/about.html
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>BioInterchange</title>
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<meta name="description" content="BioInterchange about page">
|
8
|
+
<meta name="author" content="Joachim Baran">
|
9
|
+
|
10
|
+
<!-- Le styles -->
|
11
|
+
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
|
12
|
+
<style type="text/css">
|
13
|
+
body {
|
14
|
+
padding-top: 60px;
|
15
|
+
padding-bottom: 40px;
|
16
|
+
}
|
17
|
+
</style>
|
18
|
+
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
19
|
+
|
20
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
|
21
|
+
<!--[if lt IE 9]>
|
22
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
23
|
+
<![endif]-->
|
24
|
+
|
25
|
+
<!-- Le fav and touch icons -->
|
26
|
+
<!-- <link rel="shortcut icon" href="../assets/ico/favicon.ico"> -->
|
27
|
+
</head>
|
28
|
+
|
29
|
+
<body>
|
30
|
+
|
31
|
+
<div class="navbar navbar-inverse navbar-fixed-top">
|
32
|
+
<div class="navbar-inner">
|
33
|
+
<div class="container">
|
34
|
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
35
|
+
<span class="icon-bar"></span>
|
36
|
+
<span class="icon-bar"></span>
|
37
|
+
<span class="icon-bar"></span>
|
38
|
+
</a>
|
39
|
+
<a class="brand" href="index.html">BioInterchange</a>
|
40
|
+
<div class="nav-collapse collapse">
|
41
|
+
<ul class="nav">
|
42
|
+
<li><a href="index.html">Home</a></li>
|
43
|
+
<li class="active"><a href="about.html">About</a></li>
|
44
|
+
<!--
|
45
|
+
<li class="dropdown">
|
46
|
+
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
|
47
|
+
<ul class="dropdown-menu">
|
48
|
+
<li><a href="#">To</a></li>
|
49
|
+
<li><a href="#">Be</a></li>
|
50
|
+
<li><a href="#">Done</a></li>
|
51
|
+
<li><a href="#">Dude</a></li>
|
52
|
+
<li class="divider"></li>
|
53
|
+
<li class="nav-header">API</li>
|
54
|
+
<li><a href="#">API usage information</a></li>
|
55
|
+
<li><a href="#">Implementing new readers/writers</a></li>
|
56
|
+
</ul>
|
57
|
+
</li>
|
58
|
+
-->
|
59
|
+
</ul>
|
60
|
+
</div><!--/.nav-collapse -->
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div class="container">
|
66
|
+
|
67
|
+
<!-- Example row of columns -->
|
68
|
+
<div class="row">
|
69
|
+
<div class="span12">
|
70
|
+
<h2>About BioInterchange</h2>
|
71
|
+
<p>BioInterchange was conceived and designed during <a href="http://biosciencedbc.jp">NBDC</a>/<a href="http://dbcls.rois.ac.jp">DBCLS</a>'s <a href="http://2012.biohackathon.org">BioHackathon 2012</a>. Architecture and RDF serialization implementations were provided by <a href="http://joachimbaran.wordpress.com">Joachim Baran</a>, <a href="http://www.cs.man.ac.uk/~duckg">Geraint Duck</a> provided JSON and XML deserialization implementations and contributed to architecture decisions, guidance on ontology use and applications were given by <a href="http://compbio.ucdenver.edu/Hunter_lab/Cohen/index.shtml">Kevin B. Cohen</a> and <a href="http://dumontierlab.com">Michel Dumontier</a>, where Michel brought forward and extended the <a href="http://code.google.com/p/semanticscience/wiki/SIO">Semanticscience Integrated Ontology</a> (SIO).</p>
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<hr>
|
76
|
+
|
77
|
+
<footer>
|
78
|
+
<p>© <a href="https://github.com/BioInterchange/BioInterchange#contributors">The BioInterchange Contributors</a> 2012</p>
|
79
|
+
</footer>
|
80
|
+
|
81
|
+
</div> <!-- /container -->
|
82
|
+
|
83
|
+
<!-- Le javascript
|
84
|
+
================================================== -->
|
85
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
86
|
+
<!-- <script src="bootstrap/js/jquery-1.8.1.min.js"></script> -->
|
87
|
+
<script src="bootstrap/js/bootstrap.min.js"></script>
|
88
|
+
</body>
|
89
|
+
</html>
|
@@ -0,0 +1,133 @@
|
|
1
|
+
function generateRDF() {
|
2
|
+
if ($('#inputformat').val() == 'biointerchange.gff3' || $('#inputformat').val() == 'dbcls.catanns.json' || $('#inputformat').val() == 'uk.ac.man.pdfx') {
|
3
|
+
request = '{ "parameters" : "' + escape($('#metainput').val()) + '", "data" : "' + escape($('#maininput').val()) + '" }'
|
4
|
+
$.ajax({
|
5
|
+
type: 'POST',
|
6
|
+
url: 'service/rdfizer.fcgi',
|
7
|
+
data: request,
|
8
|
+
success: function(data) {
|
9
|
+
if ($('#output')[0].innerHTML.substring(0, 7) == '<i>RDF ')
|
10
|
+
$('#output').empty();
|
11
|
+
$('#output').append(data.replace(/</g, '<').replace(/>/g, '>'));
|
12
|
+
},
|
13
|
+
contentType: 'biointerchange/json',
|
14
|
+
dataType: 'text'
|
15
|
+
});
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
function selectDbclsCatannsJson() {
|
20
|
+
var outputFormats = $('#outputformat')[0];
|
21
|
+
for (var i = 0; i < outputFormats.length; i++)
|
22
|
+
if ($('#inputformat').val() == 'biointerchange.gff3') {
|
23
|
+
if (outputFormats[i].value == 'rdf.biointerchange.gff3') {
|
24
|
+
outputFormats[i].selected = true;
|
25
|
+
outputFormats[i].disabled = false;
|
26
|
+
} else {
|
27
|
+
outputFormats[i].selected = false;
|
28
|
+
outputFormats[i].disabled = true;
|
29
|
+
}
|
30
|
+
} else if ($('#inputformat').val() == 'dbcls.catanns.json') {
|
31
|
+
if (outputFormats[i].value == 'rdf.bh12.sio') {
|
32
|
+
outputFormats[i].selected = true;
|
33
|
+
outputFormats[i].disabled = false;
|
34
|
+
} else {
|
35
|
+
outputFormats[i].selected = false;
|
36
|
+
outputFormats[i].disabled = true;
|
37
|
+
}
|
38
|
+
} else if ($('#inputformat').val() == 'uk.ac.man.pdfx') {
|
39
|
+
if (outputFormats[i].value == 'rdf.bh12.sio') {
|
40
|
+
outputFormats[i].selected = true;
|
41
|
+
outputFormats[i].disabled = false;
|
42
|
+
} else {
|
43
|
+
outputFormats[i].selected = false;
|
44
|
+
outputFormats[i].disabled = true;
|
45
|
+
}
|
46
|
+
} else {
|
47
|
+
// Woopsie.
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
function pasteExample() {
|
52
|
+
if ($('#inputformat').val() == 'biointerchange.gff3') {
|
53
|
+
$('#metainput').val(
|
54
|
+
"{\n" +
|
55
|
+
" \"input\" : \"biointerchange.gff3\",\n" +
|
56
|
+
" \"output\" : \"rdf.biointerchange.gff3\",\n" +
|
57
|
+
" \"name\" : \"Peter Smith\",\n" +
|
58
|
+
" \"name_id\" : \"peter.smith@some.example.domain\",\n" +
|
59
|
+
" \"date\" : \"2012-07-19\"\n" +
|
60
|
+
"}\n"
|
61
|
+
);
|
62
|
+
$('#maininput').val(
|
63
|
+
"ChrX.38\tbovine_complete_cds_gmap_perfect\tgene\t15870\t16254\t.\t+\t.\tID=BC109609_ChrX.38\n" +
|
64
|
+
"ChrX.38\tbovine_complete_cds_gmap_perfect\tRNA\t15870\t16254\t.\t+\t.\tID=bovine_complete_cds_gmap_perfect_BC109609_ChrX.38;Parent=BC109609_ChrX.38\n" +
|
65
|
+
"ChrX.38\tbovine_complete_cds_gmap_perfect\tCDS\t15870\t16254\t.\t+\t0\tParent=bovine_complete_cds_gmap_perfect_BC109609_ChrX.38\n" +
|
66
|
+
"ChrX.38\tbovine_complete_cds_gmap_perfect\texon\t15870\t16254\t.\t+\t0\tParent=bovine_complete_cds_gmap_perfect_BC109609_ChrX.38\n"
|
67
|
+
);
|
68
|
+
} else if ($('#inputformat').val() == 'dbcls.catanns.json') {
|
69
|
+
$('#metainput').val(
|
70
|
+
"{\n" +
|
71
|
+
" \"input\" : \"dbcls.catanns.json\",\n" +
|
72
|
+
" \"output\" : \"rdf.bh12.sio\",\n" +
|
73
|
+
" \"name\" : \"Peter Smith\",\n" +
|
74
|
+
" \"name_id\" : \"peter.smith@some.example.domain\",\n" +
|
75
|
+
" \"date\" : \"2012-07-19\"\n" +
|
76
|
+
"}\n"
|
77
|
+
);
|
78
|
+
$('#maininput').val(
|
79
|
+
"{\n" +
|
80
|
+
" \"docurl\" : \"http://www.ncbi.nlm.nih.gov/pubmed/10096561\",\n" +
|
81
|
+
" \"text\" : \"Stimulation of CD40 on immunogenic human malignant melanomas augments their cytotoxic T lymphocyte-mediated lysis and induces apoptosis.\",\n" +
|
82
|
+
" \"catanns\" : [\n" +
|
83
|
+
" {\n" +
|
84
|
+
" \"annset_id\" : 1,\n" +
|
85
|
+
" \"begin\" : 15,\n" +
|
86
|
+
" \"category\" : \"Protein\",\n" +
|
87
|
+
" \"created_at\" : \"2012-07-18T06:11:50Z\",\n" +
|
88
|
+
" \"doc_id\" : 9,\n" +
|
89
|
+
" \"end\" : 19,\n" +
|
90
|
+
" \"id\" : 110,\n" +
|
91
|
+
" \"updated_at\" : \"2012-07-18T06:11:50Z\"\n" +
|
92
|
+
" }\n" +
|
93
|
+
" ]\n" +
|
94
|
+
"}\n"
|
95
|
+
);
|
96
|
+
} else if ($('#inputformat').val() == 'uk.ac.man.pdfx') {
|
97
|
+
$('#metainput').val(
|
98
|
+
"{\n" +
|
99
|
+
" \"input\" : \"uk.ac.man.pdfx\",\n" +
|
100
|
+
" \"output\" : \"rdf.bh12.sio\",\n" +
|
101
|
+
" \"name\" : \"Peter Smith\",\n" +
|
102
|
+
" \"name_id\" : \"peter.smith@some.example.domain\",\n" +
|
103
|
+
" \"date\" : \"2012-07-19\"\n" +
|
104
|
+
"}\n"
|
105
|
+
);
|
106
|
+
$('#maininput').val(
|
107
|
+
"<?xml version='1.0' encoding='UTF-8'?>\n" +
|
108
|
+
"<pdfx xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://pdfx.cs.man.ac.uk/static/article-schema.xsd\">\n" +
|
109
|
+
" <meta>\n" +
|
110
|
+
" <job>b85333761ae8955f8abcb6a067628f50faf58fc247d92e8aaa604991e28ccfe1</job>\n" +
|
111
|
+
" </meta>\n" +
|
112
|
+
" <article>\n" +
|
113
|
+
" <front class=\"DoCO:FrontMatter\">\n" +
|
114
|
+
" <region class=\"unknown\" id=\"1\">Volume et Galante 2007 Research al. 8, Issue 3, Article R40</region>\n" +
|
115
|
+
" <title-group>\n" +
|
116
|
+
" <article-title class=\"DoCO:Title\" id=\"2\">Sense-antisense pairs in mammals: functional and evolutionary</article-title>\n" +
|
117
|
+
" </title-group>\n" +
|
118
|
+
" <abstract class=\"DoCO:Abstract\" id=\"20\">Background: A significant number of genes in mammalian genomes are being found to have natural antisense transcripts (NATs). These sense-antisense (S-AS) pairs are believed to be involved in several cellular phenomena. Results: Here, we generated a catalog of S-AS pairs occurring in the human and mouse genomes by analyzing different sources of expressed sequences available in the public domain plus 122 massively parallel signature sequencing (MPSS) libraries from a variety of human and mouse tissues. Using this dataset of almost 20,000 S-AS pairs in both genomes we investigated, in a computational and experimental way, several putative roles that have been assigned to NATs, including gene expression regulation. Furthermore, these global analyses allowed us to better dissect and propose new roles for NATs. Surprisingly, we found that a significant fraction of NATs are artifacts produced by genomic priming during cDNA library construction. Conclusion: We propose an evolutionary and functional model in which alternative polyadenylation and retroposition account for the origin of a significant number of functional S-AS pairs in mammalian genomes.</abstract>\n" +
|
119
|
+
" </front>\n" +
|
120
|
+
" <body class=\"DoCO:BodyMatter\">\n" +
|
121
|
+
" <section class=\"deo:Results\">\n" +
|
122
|
+
" <h1 class=\"DoCO:SectionTitle\" id=\"34\" page=\"2\" column=\"2\">Results and discussion</h1>\n" +
|
123
|
+
" <region class=\"DoCO:TextChunk\" id=\"151\" page=\"2\" column=\"2\">Overall distribution of S-AS pairs in human and mouse genomes To identify transcripts that derive from opposite strands of the same locus, we used a modified version of an in-house knowledgebase previously described for humans [26-28]. This knowledgebase contains more than 6 million expressed sequences mapped onto the human genome sequence and clustered in approximately 111,000 groups. [...]</region>\n" +
|
124
|
+
" </section>\n" +
|
125
|
+
" </body>\n" +
|
126
|
+
" </article>\n" +
|
127
|
+
"</pdfx>\n"
|
128
|
+
);
|
129
|
+
} else {
|
130
|
+
$('#metainput').val('');
|
131
|
+
$('#maininput').val('');
|
132
|
+
}
|
133
|
+
}
|