Commit 8b733766 authored by Penom Nom's avatar Penom Nom
Browse files

update fastqc to add options to set threads (update pacbio_qc).

parent dbe58655
......@@ -141,4 +141,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{/block}
</div>
{include file='../modals.tpl'}
{include file='../../template/modals.tpl'}
......@@ -263,5 +263,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
{/if}
{include file='./modals.tpl'}
{include file='../template/modals.tpl'}
......@@ -163,5 +163,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
{/if}
{include file='./modals.tpl'}
{include file='../template/modals.tpl'}
......@@ -79,16 +79,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<div id="download_tree"></div>
</div>
{* Modal *}
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="myModalLabel"></h3>
</div>
<div id="myModalBody" class="modal-body"></div>
<div id="myModalFooter" class="modal-footer"></div>
</div>
</div>
</div>
{include file='../template/modals.tpl'}
......@@ -268,35 +268,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
</div>
{include file='../template/modals.tpl'}
{* Modal initialization *}
{* Global tmpl *}
<div id="ng6modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal-label-tmpl" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="modal-label-tmpl">Modal header</h3>
</div>
<div id="modal-body-tmpl" class="modal-body"></div>
<div id="modal-foot-tmpl" class="modal-footer"></div>
</div>
</div>
</div>
<!-- statusModal -->
<div id="statusModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="statusModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="statusModalLabel"></h3>
</div>
<div id="statusModalBody" class="modal-body"></div>
<div class="modal-footer">
<button id="refresh_workflow" class="btn btn-default"><i class="glyphicon glyphicon-refresh"></i> Refresh</button>
<button id="rerun_workflow" class="btn btn-primary"><i class="glyphicon glyphicon-cog"></i> ReRun</button>
</div>
</div>
</div>
</div>
......@@ -173,7 +173,7 @@ $(function () {
$.each(data, function(i, component) {
$.each(component, function(i, file) {
if (file.extension == '.gz'){
$("#myModal").modal('hide');
$("#setAndRunModal").modal('hide');
location.href = file.url;
return;
}
......@@ -202,7 +202,7 @@ $(function () {
wfName : "DownloadSymlink",
onRun : function(event, running_wf, $elementHeader, $elementBody, $elementFooter){
$("#myModalBody").html("<div class='tx-nG6-wait'> <strong>Please</strong> wait while your links are being created.</div>");
$("#setAndRunModalBody").html("<div class='tx-nG6-wait'> <strong>Please</strong> wait while your links are being created.</div>");
var cb = function(data){
var wfstatus = data.status
......@@ -216,7 +216,7 @@ $(function () {
$.each(component, function(filename, file) {
if (filename == 'output_list.txt'){
$.get(file.url, function(data){
$("#myModalBody").html([
$("#setAndRunModalBody").html([
'<div class="alert">',
' <p>',
' <strong>Success !</strong> You will find bellow the list of paths for all your datas.',
......@@ -239,7 +239,7 @@ $(function () {
});
},
error : function(jqXHR, textStatus, errorThrown){
$("#myModalBody").html([
$("#setAndRunModalBody").html([
'<div class="alert alert-danger">',
' <p><strong>Failed !</strong> to get outputs from ' + $("#server_url").val() + ' </p>',
'</div>',
......@@ -251,7 +251,7 @@ $(function () {
get_workflow_status($("#server_url").val() , running_wf.id, cb, errcb)
}
else {
$("#myModalBody").html([
$("#setAndRunModalBody").html([
'<div class="alert alert-danger">',
' <p><strong>Error !</strong> You process is <strong>', wfstatus, '</strong>.</p>',
' <p>', data.errors.msg.join('') ,'</p>',
......@@ -260,7 +260,7 @@ $(function () {
}
};
var errcb = makeErrorCallBackFunc(5, $("#server_url").val(), running_wf, cb, $("#myModalBody"))
var errcb = makeErrorCallBackFunc(5, $("#server_url").val(), running_wf, cb, $("#setAndRunModalBody"))
get_workflow_status($("#server_url").val() , running_wf.id, cb, errcb)
}
},
......@@ -273,7 +273,7 @@ $(function () {
'url_base' : location.href.replace(/index\.php.+/, "" ) + 'fileadmin'
},
onRun : function(event, running_wf, $elementHeader, $elementBody, $elementFooter){
$("#myModalBody").html("<div class='tx-nG6-wait'> <strong>Please</strong> wait while your urls are being created.</div>");
$("#setAndRunModalBody").html("<div class='tx-nG6-wait'> <strong>Please</strong> wait while your urls are being created.</div>");
var cb = function(data){
var wfstatus = data.status
if (wfstatus == "completed"){
......@@ -291,7 +291,7 @@ $(function () {
$.each(data.trim().split('\n'), function(i, path){
file_list.push(link_prefix + path);
});
$("#myModalBody").html([
$("#setAndRunModalBody").html([
'<div class="alert">',
' <p>',
' <strong>Success !</strong> You will find bellow the list of urls for your data.',
......@@ -314,7 +314,7 @@ $(function () {
});
},
error : function(jqXHR, textStatus, errorThrown){
$("#myModalBody").html([
$("#setAndRunModalBody").html([
'<div class="alert alert-danger">',
' <p><strong>Failed !</strong> to get outputs from ' + $("#server_url").val() + ' </p>',
'</div>',
......@@ -326,7 +326,7 @@ $(function () {
get_workflow_status($("#server_url").val() , running_wf.id, cb, errcb)
}
else {
$("#myModalBody").html([
$("#setAndRunModalBody").html([
'<div class="alert alert-danger">',
' <p><strong>Error !</strong> You process is <strong>', wfstatus, '</strong>.</p>',
' <p>', data.errors.msg.join('') ,'</p>',
......@@ -335,7 +335,7 @@ $(function () {
}
};
var errcb = makeErrorCallBackFunc(5, $("#server_url").val(), running_wf, cb, $("#myModalBody"))
var errcb = makeErrorCallBackFunc(5, $("#server_url").val(), running_wf, cb, $("#setAndRunModalBody"))
get_workflow_status($("#server_url").val() , running_wf.id, cb, errcb)
}
}
......@@ -499,8 +499,8 @@ $(function () {
$("#download_btn").click(function(){
var download_option = download_options[$("#available-download-types option:selected" ).attr('id')];
$('#myModalLabel').html("Loading");
$('#myModalFooter').html([
$('#setAndRunModalLabel').html("Loading");
$('#setAndRunModalFooter').html([
' <div class="btn-group">',
' <button id="close" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-remove"></i> Close</button>',
' </div>',
......@@ -513,24 +513,24 @@ $(function () {
$("#reset_workflow, #run_workflow").hide();
$("#close").show();
$('#myModalBody').html([
$('#setAndRunModalBody').html([
'<div >',
' <p id="wf-help" class="text-justify"></p><br/><br/>',
' <div id="wfform"><div class="tx-nG6-wait">Please wait</div></div>',
'</div>',
].join(''));
$('#myModal').modal();
$('#setAndRunModal').modal();
$('#wfform').on("loaded.wfform", function(event, workflow) {
$("#reset_workflow, #run_workflow").show();
$("#close").hide();
if(workflow){
$('#myModalLabel').html(workflow["name"]) ;
$('#setAndRunModalLabel').html(workflow["name"]) ;
$('#wf-help').html(workflow["help"]);
}
else{
$('#myModalBody').html('<div class="alert alert-warning"> <strong>Warning !</strong> The selected donwload type "' + download_option.label + '" is not available</div>');
$('#setAndRunModalBody').html('<div class="alert alert-warning"> <strong>Warning !</strong> The selected donwload type "' + download_option.label + '" is not available</div>');
}
});
......@@ -577,10 +577,10 @@ $(function () {
$("#close").show();
if ('onRun' in download_option){
download_option.onRun(event, running_wf, $('#myModalLabel'), $('#myModalBody'), $('#myModalFooter'));
download_option.onRun(event, running_wf, $('#setAndRunModalLabel'), $('#setAndRunModalBody'), $('#setAndRunModalFooter'));
}
else {
$("#myModalBody").html("<div class='alert alert-info'>Workflow started successfully</div>");
$("#setAndRunModalBody").html("<div class='alert alert-info'>Workflow started successfully</div>");
}
});
......
......@@ -143,14 +143,19 @@ $(function () {
serverURL: $("#server_url").val()
});
$("#refresh_workflow").click(function(){ $('#statusModalBody').wfstatus('reload'); });
$('#setAndRunModalFooter').html([
'<button id="refresh_workflow" class="btn btn-default"><i class="glyphicon glyphicon-refresh"></i> Refresh</button>',
'<button id="rerun_workflow" class="btn btn-primary"><i class="glyphicon glyphicon-cog"></i> ReRun</button>'
].join(''));
$("#refresh_workflow").click(function(){ $('#setAndRunModalBody').wfstatus('reload'); });
$("#wf_monitoring").on("select.activewf", function(event, workflow) {
$('#statusModalLabel').html(workflow["name"] + " <small>" + workflow["id"] + "</small>");
$('#statusModalBody').wfstatus({
$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["id"] + "</small>");
$('#setAndRunModalBody').wfstatus({
serverURL: $("#server_url").val(),
workflowID: workflow["id"]
});
$('#statusModal').modal();
$('#setAndRunModal').modal();
});
......
{*
Copyright (C) 2009 INRA
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*}
{* Modal initialization *}
{* Global tmpl *}
<div id="ng6modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal-label-tmpl" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="modal-label-tmpl">Modal header</h3>
</div>
<div id="modal-body-tmpl" class="modal-body"></div>
<div id="modal-foot-tmpl" class="modal-footer"></div>
</div>
</div>
</div>
{* setAndRunModal *}
<div id="setAndRunModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="setAndRunModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="setAndRunModalLabel"></h3>
</div>
<div id="setAndRunModalBody" class="modal-body"></div>
<div id="setAndRunModalFooter" class="modal-footer">
</div>
</div>
</div>
</div>
......@@ -29,7 +29,7 @@ from ng6.utils import Utils
class FastQC (Analysis):
def define_parameters(self, input_files, is_casava=False, no_group=False, archive_name=None):
def define_parameters(self, input_files, is_casava=False, no_group=False, archive_name=None, nb_threads = 3):
"""
@param input_files : paths
@param is_casava : True gathers all different files of one read of one sample (only with name on CASAVA 1.8+ format)
......@@ -40,6 +40,7 @@ class FastQC (Analysis):
self.add_parameter("is_casava", "True gathers all different files of one read of one sample (only with name on CASAVA 1.8+ format)", default=is_casava, type ='bool')
self.add_parameter("no_group", "True disables grouping of bases for reads >50bp", default=no_group, type='bool')
self.add_parameter("archive_name", "Archive name", default=archive_name)
self.add_parameter("nb_threads", "Number of threads for fastqc", default=nb_threads)
items = self.input_files
if self.is_casava :
......@@ -197,6 +198,6 @@ class FastQC (Analysis):
# Create cmd
[cmd_inputs_pattern, next_arg_number] = get_argument_pattern(file_group, 1)
fastqc = ShellFunction(self.get_exec_path("fastqc") + ' --extract --outdir ' + self.output_directory + ' ' + self.options + ' ' + cmd_inputs_pattern + ' > ${' + str(next_arg_number) + '} 2> ${' + str(next_arg_number+1) + '}', cmd_format='{EXE} {IN} {OUT}')
fastqc = ShellFunction(self.get_exec_path("fastqc") + ' -t ' + self.nb_threads + ' --extract --outdir ' + self.output_directory + ' ' + self.options + ' ' + cmd_inputs_pattern + ' > ${' + str(next_arg_number) + '} 2> ${' + str(next_arg_number+1) + '}', cmd_format='{EXE} {IN} {OUT}')
fastqc(inputs = file_group, outputs = [self.stdouts[output_pos], self.stderrs[output_pos]])
......@@ -28,12 +28,12 @@ class PacBioQualityCheck (NG6Workflow):
return "PacBio data loading and quality check"
def define_parameters(self, function="process"):
pass
self.add_parameter("nb_threads", "Number of threads to use for fastqc. Each thread will be allocated 250MB of memory.", default=3)
def process(self):
add_pacbio_raw_file = self.add_component("AddPacBioRawFiles", [self.runobj, self.get_all_reads()])
h5tofastq = self.add_component("H5toFastq", [self.get_all_reads()])
fastqc = self.add_component("FastQC", [h5tofastq.output_fastqs, False, False, "fastqc.tar.gz"], parent = h5tofastq)
fastqc = self.add_component("FastQC", [h5tofastq.output_fastqs, False, False, "fastqc.tar.gz", self.nb_threads], parent = h5tofastq)
self.add_component("RS_Subreads", [self.get_all_reads()])
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment