Skip to content
Merged
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ type make
```bash
export TAG=`date +"%Y%m%d.%H%M"`
docker build --force-rm --no-cache --rm -t mgrast/v3-web:${TAG} https://raw.githubusercontent.com/MG-RAST/MG-RAST/master/dockerfiles/web/Dockerfile
skycore push mgrast/v3-web:${TAG}
```

### API server

```bash
export TAG=`date +"%Y%m%d.%H%M"`
docker build --force-rm --no-cache --rm -t mgrast/api:${TAG} https://raw.githubusercontent.com/MG-RAST/MG-RAST/master/dockerfiles/api/Dockerfile
skycore push mgrast/api:${TAG}
```

8 changes: 3 additions & 5 deletions dockerfiles/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ RUN apt-get install -y python-dev python-pip
RUN pip install gspread xlrd openpyxl lepl
RUN cd / && git clone https://github.com/MG-RAST/pipeline.git

# 3rd party dependencies
# 3rd party dependency: R
RUN mkdir -p /tools && \
apt-get install -y gcc wget r-base r-cran-nlme r-cran-ecodist && \
echo 'install.packages("matlab", repos = "http://cran.wustl.edu")' | R --no-save && \
echo 'source("http://bioconductor.org/biocLite.R"); biocLite("pcaMethods")' | R --no-save
RUN cd /tools && \
wget circos.ca/distribution/circos-0.67-7.tgz && \
tar zxvf circos-0.67-7.tgz && \
rm -f circos-0.67-7.tgz

# 3rd party dependency: FragGeneScan
RUN cd /tools && \
git clone https://github.com/wltrimbl/FGS.git FragGeneScan && \
cd FragGeneScan && \
Expand Down
2 changes: 1 addition & 1 deletion src/MGRAST/html/MGRAST-frontpage.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div id="top_nav_links"><a class= "nav_top" href="metagenomics.cgi?page=MetagenomeSearch"><img src='./Html/lupe.png' style='width: 20px; height: 20px;' title='Search'></a></div>
<br>
<div id="top_nav_links"><a class= "nav_top" href="metagenomics.cgi?page=DownloadMetagenome"><img src='./Html/mg-download.png' style='width: 20px; height: 20px;' title=Download></a></div>
<div id="top_nav_links"><a class= "nav_top" href="./Html/mgmain.html?mgpage=upload"><img src='./Html/mg-upload.png' style='width: 20px; height: 20px;' title='Upload'></a></div>
<div id="top_nav_links"><a class= "nav_top" href="./Html/mgmainv3.html?mgpage=upload"><img src='./Html/mg-upload.png' style='width: 20px; height: 20px;' title='Upload'></a></div>
<div id="top_nav_links"><a class= "nav_top" href="http://blog.metagenomics.anl.gov/howto/" target="blank"><img src='./Html/mg-help.png' style='width: 20px; height: 20px;' title='Support'></a></div>
<div id="top_nav_links"><a class= "nav_top" href="metagenomics.cgi?page=Contact"><img src='./Html/mg-contact.png' style='width: 20px; height: 20px;' title='Contact'></a></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/MGRAST/lib/Analysis.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sub new {
eval {
require Cache::Memcached;
Cache::Memcached->import();
$memd = new Cache::Memcached {'servers' => [$Conf::web_memcache || ''], 'debug' => 0, 'compress_threshold' => 10_000};
$memd = new Cache::Memcached {'servers' => $Conf::web_memcache, 'debug' => 0, 'compress_threshold' => 10_000};
};

# connect to database
Expand Down
7 changes: 3 additions & 4 deletions src/MGRAST/lib/WebPage/Analysis.pm
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ sub output {
relationships between functions (COG, NOG, SEED, subsystems, KEGG)
'>Hierarchical Classification</div>";
$tools .= "<div class='inactive_tool' style='padding-left:20px' onclick='choose_tool(\"annotation\");' name='tool_entry' id='annotation_tool' title='Report abundances using protein databases that include all functional labels'>All Annotations</div>";
$tools .= "<div class='category_tool'>Other</div>";
$tools .= "<div class='inactive_tool' style='padding-left:20px' onclick='choose_tool(\"recruitment_plot\");' name='tool_entry' id='recruitment_plot_tool' title='Recruits sequences to proteins in a reference genome
'>Recruitment Plot</div>";
#$tools .= "<div class='category_tool'>Other</div>";
#$tools .= "<div class='inactive_tool' style='padding-left:20px' onclick='choose_tool(\"recruitment_plot\");' name='tool_entry' id='recruitment_plot_tool' title='Recruits sequences to proteins in a reference genome'>Recruitment Plot</div>";

my $html = "<input type='hidden' id='metagenome' value='$metagenome'>".$application->component('ajax')->output."<table class='analysis'><tr><td class='tool'><div id='tool' class='tool'>".$tools."<div id='progress_div'></div></div></td><td class='select'><div id='select' class='select'>".$self->phylogeny_select."</div></td><td class='buff'></td></tr><tr><td colspan=3 class='display'><div id='display' class='display'>";

Expand Down Expand Up @@ -6513,7 +6512,7 @@ sub group_select {
my ($self) = @_;

my $user = $self->application->session->user;
my $memd = new Cache::Memcached {'servers' => [ $Conf::web_memcache || "kursk-2.mcs.anl.gov:11211" ], 'debug' => 0, 'compress_threshold' => 10_000, };
my $memd = new Cache::Memcached {'servers' => $Conf::web_memcache, 'debug' => 0, 'compress_threshold' => 10_000, };
my $cache_key = "analysis_groups_".($user ? $user->_id : "anonymous");
my $cdata = $memd->get($cache_key);

Expand Down
2 changes: 1 addition & 1 deletion src/MGRAST/lib/resources/resource.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sub new {
eval {
require Cache::Memcached;
Cache::Memcached->import();
$memd = new Cache::Memcached {'servers' => [$Conf::web_memcache || ''], 'debug' => 0, 'compress_threshold' => 10_000};
$memd = new Cache::Memcached {'servers' => $Conf::web_memcache, 'debug' => 0, 'compress_threshold' => 10_000};
};
my $url_id = get_url_id($params->{cgi}, $params->{resource}, $params->{rest_parameters}, $params->{json_rpc}, $params->{user});
my $agent = LWP::UserAgent->new;
Expand Down
25 changes: 16 additions & 9 deletions src/MGRAST/r/preprocessing.r
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,22 @@ MGRAST_preprocessing <<- function(file_in, # name of the input file (tab del
###### write the log transformed and centered data to a file
write.table(log2_cent_data, file=file_out, sep="\t", col.names = NA, row.names = TRUE, quote = FALSE)

# if (produce_fig == TRUE){ # optional - produce an out put image
if (produce_fig == TRUE){ # optional - produce an out put image
# suppressPackageStartupMessages(library(Cairo))
# CairoPNG(image_out, width = figure_width, height = figure_height, pointsize = 12, res = fiure_res , units = "px")
# split.screen(c(2,1))
# screen(1)
# boxplot(input_data, main = raw_data_boxplot_title, las=2)
# screen(2)
# boxplot(log2_cent_data, main = centered_data_boxplot_title, las=2)
# dev.off()
# }
# CairoPNG(image_out, width = figure_width, height = figure_height, pointsize = 12, res = fiure_res , units = "px")
png( # initialize the png
filename = image_out,
width = figure_width,
height = figure_height,
res = figure_res,
units = 'px'
)
split.screen(c(2,1))
screen(1)
boxplot(input_data, main = raw_data_boxplot_title, las=2)
screen(2)
boxplot(log2_cent_data, main = centered_data_boxplot_title, las=2)
dev.off()
}

}