Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/MGRAST/Templates/pipeline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<input>The input sequence data for this step is in the file 299.screen.passed.fna.</input>
<description>Coding regions within the sequences are predicted using FragGeneScan, an ab-initio prokaryotic gene calling algorithm. Using a hidden Markov model for coding regions and non-coding regions, this step identifies the most likely reading frame and translates nucleotide sequences into amino acids sequences. The predicted genes, possibly more than one per fragment, are called features.</description>
<output><file>The amino acid sequence FASTA formatted file 350.genecalling.coding.faa contains the predicted coding regions.</file></output>
<output><file>The nucleotide sequence FASTA formatted file 350.genecalling.coding.fna contains the predicted coding regions.</file></output>
</stage>
<stage num='425'>
<input>The input sequence data for this step is in the file 100.preprocess.passed.fna.</input>
Expand Down
23 changes: 3 additions & 20 deletions src/MGRAST/lib/WebPage/DownloadMetagenome.pm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ sub init {
$self->application->register_action($self, 'download', 'download');
$self->application->register_action($self, 'api_download', 'api_download');
$self->application->register_component('Table', 'project_table');
$self->application->register_component('Hover', 'download_project_info');
$self->application->register_component('Hover', 'download_info');
}

Expand Down Expand Up @@ -209,12 +208,6 @@ my $css_tmp = qq~
}
$down_info->add_tooltip('meta_down', 'Download metadata for this metagenome');
$download .= "&nbsp;&nbsp;&nbsp;<a onmouseover='hover(event,\"meta_down\",".$down_info->id.")' href='metagenomics.cgi?page=DownloadMetagenome&action=download_md&filename=$mfile'><img src='./Html/mg-download.png' style='height:15px;'/><small>metadata</small></a>";
if ($pid && $job->public) {
$down_info->add_tooltip('sub_down', 'Download submitted metagenome');
$down_info->add_tooltip('derv_down', 'Download all derived data for this metagenome');
$download .= "&nbsp;&nbsp;&nbsp;<a onmouseover='hover(event,\"sub_down\",".$down_info->id.")' target=_blank href='ftp://".$Conf::ftp_download."/projects/$pid/$mid/raw'><img src='./Html/mg-download.png' style='height:15px;'/><small>submitted</small></a>";
$download .= "&nbsp;&nbsp;&nbsp;<a onmouseover='hover(event,\"derv_down\",".$down_info->id.")' target=_blank href='ftp://".$Conf::ftp_download."/projects/$pid/$mid/processed'><img src='./Html/mg-download.png' style='height:15px;'/><small>analysis</small></a>";
}

$self->title("Metagenome Download");
$content .= $down_info->output()."<h1 style='display:inline;'>".$job->name." ($mid)</h1>".$download;
Expand Down Expand Up @@ -306,7 +299,7 @@ sub stage_download_info {
}

my $stats = exists($info->{statistics}) ? $info->{statistics} : {};
my $count = exists($stats->{bp_count}) ? format_number($stats->{bp_count})." reads" : '';
my $count = exists($stats->{sequence_count}) ? format_number($stats->{sequence_count})." reads" : '';
my $size = exists($info->{file_size}) ? sprintf("%.2f", ($info->{file_size} / (1024 * 1024)))."MB" : '';
my $desc = ($info->{data_type} eq 'sequence') ? $info->{file_format} : $info->{data_type};

Expand Down Expand Up @@ -583,9 +576,6 @@ sub public_project_download_table {
my $content = "" ; # "Public projects and metagenomes." ;

if ( scalar(@$projects) || scalar(@$public_projects) ) {
my $down_info = $application->component('download_project_info');
$down_info->add_tooltip('all_down', 'download all submitted and derived metagenome data for this project');
$down_info->add_tooltip('meta_down', 'download project metadata');

my $table = $application->component('project_table');
$table->items_per_page(25);
Expand All @@ -604,8 +594,7 @@ sub public_project_download_table {
{ name => 'PubMed ID', filter => 1, sortable => 1, visible => 0 },
{ name => 'Sequence&nbsp;type', filter => 1, sortable => 1, operator => 'combobox' },
{ name => '#&nbsp;Metagenomes', filter => 1, operators => [ 'equal' , 'less' , 'more' ], sortable => 1 },
{ name => 'Project&nbsp;size (Mbp)', filter => 1, operators => [ 'equal' , 'less' , 'more' ], sortable => 1},
{ name =>'Download' }
{ name => 'Project&nbsp;size (Mbp)', filter => 1, operators => [ 'equal' , 'less' , 'more' ], sortable => 1}
] );
my $data = [];
my $shown = {};
Expand All @@ -620,10 +609,6 @@ sub public_project_download_table {
my $formater = new Number::Format(-thousands_sep => ',');
my $all_mgids = $project->all_metagenome_ids;
my $pubmed_ids = join(",", sort @{$project->pubmed});
my $download = "<table><tr align='center'>
<td><a onmouseover='hover(event,\"all_down\",".$down_info->id.")' target=_blank href='ftp://".$Conf::ftp_download."/projects/$id'><img src='$Conf::cgi_url/Html/mg-download.png' height='15'/><small>metagenomes</small></a></td>
<td><a onmouseover='hover(event,\"meta_down\",".$down_info->id.")' href='ftp://".$Conf::ftp_download."/projects/$id/metadata.project-$id.xlsx'><img src='$Conf::cgi_url/Html/mg-download.png' height='15'/><small>metadata</small></a></td>
</tr></table>";

push @$data, [ $id,
join(" " , @$all_mgids) || '',
Expand All @@ -634,12 +619,10 @@ sub public_project_download_table {
$pubmed_ids ? "<a href='http://www.ncbi.nlm.nih.gov/pubmed/$pubmed_ids' target=_blank >$pubmed_ids</a>" : '',
join(", ", sort @{$project->sequence_types}) || 'Unknown',
scalar(@$all_mgids),
$formater->format_number(($project->bp_count_raw / 1000000), 0),
$download
$formater->format_number(($project->bp_count_raw / 1000000), 0)
];
}
$table->data($data);
$content .= $down_info->output;
$content .= $table->output();
}
return $content;
Expand Down
21 changes: 2 additions & 19 deletions src/MGRAST/lib/WebPage/MetagenomeProject.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ sub init {
$self->application->register_component('Table', 'project_table');
$self->application->register_component('Table', 'jobs_table');
$self->application->register_component('FilterSelect', 'job_fs');
$self->application->register_component('Hover', 'download_info');
$self->application->register_component('ListSelect', 'job_select');
$self->application->register_component('ListSelect', 'shared_job_select');
$self->application->register_component('ListSelect', 'public_job_select');
Expand Down Expand Up @@ -129,18 +128,9 @@ sub output {
if ($user && ($user->has_right(undef, 'edit', 'project', $project->id) || $user->has_star_right('edit', 'project'))) {
$self->{is_editor} = 1;
}

my $download = "";
my $down_info = $self->app->component('download_info');

my $proj_link = "http://metagenomics.anl.gov/linkin.cgi?project=".$self->{project_id};

if ($project->public) {
$down_info->add_tooltip('all_down', 'download all submitted and derived metagenome data for this project');
$down_info->add_tooltip('meta_down', 'download project metadata');
$download .= "&nbsp;&nbsp;&nbsp;<a onmouseover='hover(event,\"all_down\",".$down_info->id.")' target=_blank href='ftp://".$Conf::ftp_download."/projects/$id'><img src='./Html/mg-download.png' style='height:15px;'/><small>metagenomes</small></a>";
$download .= "&nbsp;&nbsp;&nbsp;<a onmouseover='hover(event,\"meta_down\",".$down_info->id.")' href='ftp://".$Conf::ftp_download."/projects/$id/metadata.project-$id.xlsx'><img src='./Html/mg-download.png' style='height:15px;'/><small>project metadata</small></a>";
}
$html .= $down_info->output()."<h1 style='display: inline;'>".$project->name.(($user and $user->has_right(undef, 'edit', 'user', '*')) ? " (ID ".$project->id.")": "")."</h1>".$download;
$html .= "<h1 style='display: inline;'>".$project->name.(($user and $user->has_right(undef, 'edit', 'user', '*')) ? " (ID ".$project->id.")": "")."</h1>";
$html .= "<p><table>";
$html .= "<tr><td><b>Visibility</b></td><td style='padding-left:15px;'>".($project->public ? 'Public' : 'Private')."</td></tr>";
$html .= "<tr><td><b>Static Link</b></td><td style='padding-left:15px;'><a href='$proj_link'>$proj_link</a></td></tr></table>";
Expand Down Expand Up @@ -519,15 +509,8 @@ sub job_list {
}
close FH;
}
my $download = "<table><tr align='center'>
<td><a href='metagenomics.cgi?page=MetagenomeProject&action=download_md&filetype=text&filename=$mfile'><img src='$Conf::cgi_url/Html/mg-download.png' alt='Download metadata for this metagenome' height='15'/><small>metadata</small></a></td>
<td><a target=_blank href='ftp://".$Conf::ftp_download."/projects/$proj_id/$mid/raw'><img src='$Conf::cgi_url/Html/mg-download.png' alt='Download submitted metagenome' height='15'/><small>submitted</small></a></td>
<td><a target=_blank href='ftp://".$Conf::ftp_download."/projects/$proj_id/$mid/processed'><img src='$Conf::cgi_url/Html/mg-download.png' alt='Download all derived data for this metagenome' height='15'/><small>analysis</small></a></td>
</tr></table>";
$row->[0] = "<a target=_blank href='?page=MetagenomeOverview&metagenome=$mid'>$mid</a>";
push @$row, $download if ($project->public);
}
push @$header, { name => 'Download' } if ($project->public);

my $ptable = $self->application->component('jobs_table');
$ptable->columns($header);
Expand Down