Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from dictyBase/bug/obo-namespace
Bug/obo namespace closes #159
- Loading branch information
Showing
7 changed files
with
3,546 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM perl:5.20 | ||
MAINTAINER Siddhartha Basu <siddhartha-basu@northwestern.edu> | ||
|
||
ADD https://northwestern.box.com/shared/static/3n0wdp04075oyrnytznn9mzc3k9o92c1.rpm /rpms/ | ||
ADD https://northwestern.box.com/shared/static/o2gd3o70sik5liw43hiomusmu0262auw.rpm /rpms/ | ||
ADD https://northwestern.box.com/shared/static/nsflzsbm2xmcf46z1ybiustosqkdskbb.rpm /rpms/ | ||
|
||
RUN apt-get update && \ | ||
apt-get -y install alien libaio1 libdb-dev libexpat1-dev && \ | ||
mkdir -p /rpms && \ | ||
alien -i /rpms/*.rpm && \ | ||
echo '/usr/lib/oracle/11.2/client64/lib' > /etc/ld.so.conf.d/oracle.conf && \ | ||
echo 'export ORACLE_HOME=/usr/lib/oracle/11.2/client64' > /etc/profile.d/oracle.sh | ||
|
||
ENV ORACLE_HOME /usr/lib/oracle/11.2/client64/ | ||
ENV LD_LIBRARY_PATH /usr/lib/oracle/11.2/client64/lib/ | ||
|
||
ADD cpanfile /tmp/ | ||
RUN cd /tmp \ | ||
&& cpanm -n --quiet --installdeps . \ | ||
&& cpanm -n --quiet DBD::Oracle DBD::Pg Math::Base36 String::CamelCase LWP::Protocol::https \ | ||
&& rm -fr /rpms \ | ||
&& cpanm -n --quiet Child Dist::Zilla | ||
COPY dist.ini /usr/src/modware/ | ||
WORKDIR /usr/src/modware | ||
RUN dzil authordeps --missing | cpanm -n --quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
use Test::More qw/no_plan/; | ||
use Test::DatabaseRow; | ||
use FindBin qw($Bin); | ||
use Path::Class::Dir; | ||
use Test::Exception; | ||
use Test::Chado qw/:all/; | ||
use Test::Chado::Common qw/:all/; | ||
use Test::Chado::Cvterm qw/:all/; | ||
|
||
my $data_dir = Path::Class::Dir->new($Bin)->parent->subdir('test_data'); | ||
my $obo_fixture = $data_dir->subdir('preset')->file('cvprop.tar.bz2'); | ||
|
||
use_ok('Modware::Load'); | ||
|
||
subtest 'loading of obo file without default namespace' => sub { | ||
my $schema = chado_schema( custom_fixture => $obo_fixture ); | ||
my $dbmanager = get_dbmanager_instance(); | ||
local $Test::DatabaseRow::dbh = $dbmanager->dbh; | ||
my $loader = new_ok('Modware::Load'); | ||
local @ARGV = ( | ||
'obo2chado', '--dsn', | ||
$dbmanager->dsn, '--user', | ||
$dbmanager->user, '--password', | ||
$dbmanager->password, '--input', | ||
$data_dir->subdir('obo')->file('ro-filter.obo'), | ||
); | ||
push @ARGV, '--pg_schema', $dbmanager->schema_namespace | ||
if $dbmanager->can('schema_namespace'); | ||
|
||
lives_ok { $loader->run } "should load ro obo file"; | ||
has_cv( $schema, 'ro', 'cv namespace should match with ontology tag' ); | ||
has_dbxref( $schema, 'results_in_morphogenesis_of', | ||
'should have dbxref' ); | ||
has_cvterm( | ||
$schema, | ||
'results in morphogenesis of', | ||
'should have the cvterm' | ||
); | ||
|
||
my $sql = <<'SQL'; | ||
SELECT DBXREF.* from dbxref JOIN DB ON DBXREF.DB_ID=DB.DB_ID | ||
WHERE | ||
DBXREF.ACCESSION=? | ||
AND | ||
DB.NAME='ro-filter' | ||
SQL | ||
row_ok( | ||
sql => [$sql, $_], | ||
results => 1, | ||
description => 'should have term with db namespace from file path' | ||
) for qw/results_in_morphogenesis_of results_in_development_of results_in_formation_of/; | ||
|
||
drop_schema(); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.